diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt index dd2f366e28f469..a0db80097b12b5 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt @@ -44,7 +44,7 @@ class WildcardFragment : Fragment() { private lateinit var addressUpdateFragment: AddressUpdateFragment private val reportCallback = object : ReportCallback { - override fun onError(attributePath: ChipAttributePath, eventPath: ChipEventPath, ex: Exception) { + override fun onError(attributePath: ChipAttributePath?, eventPath: ChipEventPath?, ex: Exception) { if (attributePath != null) { Log.e(TAG, "Report error for $attributePath: $ex") diff --git a/examples/darwin-framework-tool/BUILD.gn b/examples/darwin-framework-tool/BUILD.gn index cd69f8fae84018..8d1bf2ea16b91a 100644 --- a/examples/darwin-framework-tool/BUILD.gn +++ b/examples/darwin-framework-tool/BUILD.gn @@ -112,10 +112,10 @@ executable("darwin-framework-tool") { "commands/common/MTRError_Utils.h", "commands/common/MTRLogging.h", "commands/pairing/Commands.h", - "commands/pairing/DeviceControllerDelegateBridge.mm", "commands/pairing/OpenCommissioningWindowCommand.h", "commands/pairing/OpenCommissioningWindowCommand.mm", "commands/pairing/PairingCommandBridge.mm", + "commands/pairing/PairingDelegateBridge.mm", "commands/payload/SetupPayloadParseCommand.mm", "commands/provider/Commands.h", "commands/provider/OTAProviderDelegate.mm", diff --git a/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h index c1212025fc624a..8cc84613e537f3 100644 --- a/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h @@ -74,14 +74,14 @@ class ClusterCommand : public ModelCommand { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); while (repeatCount--) { - [device invokeCommandWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] - clusterID:[NSNumber numberWithUnsignedInteger:clusterId] - commandID:[NSNumber numberWithUnsignedInteger:commandId] + [device invokeCommandWithEndpointId:[NSNumber numberWithUnsignedShort:endpointId] + clusterId:[NSNumber numberWithUnsignedInteger:clusterId] + commandId:[NSNumber numberWithUnsignedInteger:commandId] commandFields:commandFields timedInvokeTimeout:mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil - queue:callbackQueue + clientQueue: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 97b7c09806d200..e8387b8dda5b84 100644 --- a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm @@ -25,15 +25,31 @@ CHIP_ERROR ModelCommand::RunCommand() { + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip-tool.command", DISPATCH_QUEUE_SERIAL); + MTRDeviceController * commissioner = CurrentCommissioner(); ChipLogProgress(chipTool, "Sending command to node 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId)); - auto * device = [MTRBaseDevice deviceWithNodeID:@(mNodeId) controller:commissioner]; - CHIP_ERROR err = SendCommand(device, mEndPointId); + [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)); - return err; - } + 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 b8b50553f9988f..113dedb1a28eae 100644 --- a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h @@ -54,26 +54,24 @@ class ReadAttribute : public ModelCommand { { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRReadParams * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [device readAttributePathWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] - clusterID:[NSNumber numberWithUnsignedInteger:mClusterId] - attributeID:[NSNumber numberWithUnsignedInteger:mAttributeId] - params:params - queue:callbackQueue - completion:^( - NSArray *> * _Nullable values, NSError * _Nullable error) { - if (error != nil) { - LogNSError("Error reading attribute", error); - } - if (values) { - for (id item in values) { - NSLog(@"Response Item: %@", [item description]); - } - } - SetCommandExitStatus(error); - }]; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [device + readAttributeWithEndpointId:[NSNumber numberWithUnsignedShort:endpointId] + clusterId:[NSNumber numberWithUnsignedInteger:mClusterId] + attributeId:[NSNumber numberWithUnsignedInteger:mAttributeId] + params:params + clientQueue:callbackQueue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + if (error != nil) { + LogNSError("Error reading attribute", error); + } + if (values) { + for (id item in values) { + NSLog(@"Response Item: %@", [item description]); + } + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -126,22 +124,18 @@ class SubscribeAttribute : public ModelCommand { { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.autoResubscribe = mAutoResubscribe.Value(); - } - - [device subscribeAttributePathWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] - clusterID:[NSNumber numberWithUnsignedInteger:mClusterId] - attributeID:[NSNumber numberWithUnsignedInteger:mAttributeId] + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.autoResubscribe = mAutoResubscribe.HasValue() ? [NSNumber numberWithBool:mAutoResubscribe.Value()] : nil; + + [device subscribeAttributeWithEndpointId:[NSNumber numberWithUnsignedShort:endpointId] + clusterId:[NSNumber numberWithUnsignedInteger:mClusterId] + attributeId:[NSNumber numberWithUnsignedInteger:mAttributeId] + minInterval:[NSNumber numberWithUnsignedInteger:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInteger:mMaxInterval] params:params - queue:callbackQueue + clientQueue:callbackQueue reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { if (values) { for (id item in values) { @@ -198,17 +192,16 @@ class SubscribeEvent : public ModelCommand { { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.autoResubscribe = mAutoResubscribe.Value(); - } + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.autoResubscribe = mAutoResubscribe.HasValue() ? [NSNumber numberWithBool:mAutoResubscribe.Value()] : nil; [device subscribeWithQueue:callbackQueue + minInterval:mMinInterval + maxInterval:mMaxInterval params:params - clusterStateCacheContainer:nil + cacheContainer:nil attributeReportHandler:^(NSArray * value) { SetCommandExitStatus(CHIP_NO_ERROR); } diff --git a/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h index 6c74b9bdb6744e..826117f1ceea3c 100644 --- a/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h @@ -74,14 +74,14 @@ class WriteAttribute : public ModelCommand { { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); [device - writeAttributeWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] - clusterID:[NSNumber numberWithUnsignedInteger:clusterId] - attributeID:[NSNumber numberWithUnsignedInteger:attributeId] + writeAttributeWithEndpointId:[NSNumber numberWithUnsignedShort:endpointId] + clusterId:[NSNumber numberWithUnsignedInteger:clusterId] + attributeId:[NSNumber numberWithUnsignedInteger:attributeId] value:value timedWriteTimeout:mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil - queue:callbackQueue + clientQueue:callbackQueue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { if (error != nil) { LogNSError("Error writing attribute", error); diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm index e886eed2c56b0c..04b2962a0d33f5 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm @@ -111,15 +111,15 @@ mOTADelegate = [[OTAProviderDelegate alloc] init]; - auto factory = [MTRDeviceControllerFactory sharedInstance]; + auto factory = [MTRControllerFactory sharedInstance]; if (factory == nil) { ChipLogError(chipTool, "Controller factory is nil"); return CHIP_ERROR_INTERNAL; } - auto params = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + auto params = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; params.port = @(kListenPort); - params.shouldStartServer = YES; + params.startServer = YES; params.otaProviderDelegate = mOTADelegate; NSArray * paaCertResults; ReturnLogErrorOnFailure(GetPAACertsFromFolder(&paaCertResults)); @@ -127,10 +127,9 @@ params.paaCerts = paaCertResults; } - NSError * error; - if ([factory startControllerFactory:params error:&error] == NO) { + if ([factory startup:params] == NO) { ChipLogError(chipTool, "Controller factory startup failed"); - return MTRErrorToCHIPErrorCode(error); + return CHIP_ERROR_INTERNAL; } ReturnLogErrorOnFailure([gNocSigner createOrLoadKeys:storage]); @@ -139,19 +138,21 @@ constexpr const char * identities[] = { kIdentityAlpha, kIdentityBeta, kIdentityGamma }; for (size_t i = 0; i < ArraySize(identities); ++i) { - auto controllerParams = [[MTRDeviceControllerStartupParams alloc] initWithIPK:ipk fabricID:@(i + 1) nocSigner:gNocSigner]; + auto controllerParams = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:gNocSigner + fabricId:(i + 1) + ipk:ipk]; // We're not sure whether we're creating a new fabric or using an // existing one, so just try both. - auto controller = [factory createControllerOnExistingFabric:controllerParams error:&error]; + auto controller = [factory startControllerOnExistingFabric:controllerParams]; if (controller == nil) { // Maybe we didn't have this fabric yet. - controllerParams.vendorID = @(chip::VendorId::TestVendor1); - controller = [factory createControllerOnNewFabric:controllerParams error:&error]; + controllerParams.vendorId = @(chip::VendorId::TestVendor1); + controller = [factory startControllerOnNewFabric:controllerParams]; } if (controller == nil) { ChipLogError(chipTool, "Controller startup failure."); - return MTRErrorToCHIPErrorCode(error); + return CHIP_ERROR_INTERNAL; } mControllers[identities[i]] = controller; @@ -194,14 +195,16 @@ { StopCommissioners(); - auto factory = [MTRDeviceControllerFactory sharedInstance]; + auto factory = [MTRControllerFactory sharedInstance]; NSData * ipk = [gNocSigner getIPK]; constexpr const char * identities[] = { kIdentityAlpha, kIdentityBeta, kIdentityGamma }; for (size_t i = 0; i < ArraySize(identities); ++i) { - auto controllerParams = [[MTRDeviceControllerStartupParams alloc] initWithIPK:ipk fabricID:@(i + 1) nocSigner:gNocSigner]; + auto controllerParams = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:gNocSigner + fabricId:(i + 1) + ipk:ipk]; - auto controller = [factory createControllerOnExistingFabric:controllerParams error:nil]; + auto controller = [factory startControllerOnExistingFabric:controllerParams]; mControllers[identities[i]] = controller; } } @@ -213,7 +216,7 @@ mControllers.clear(); mCurrentController = nil; - [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; + [[MTRControllerFactory sharedInstance] shutdown]; } CHIP_ERROR CHIPCommandBridge::StartWaiting(chip::System::Clock::Timeout duration) diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.h b/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.h index d5f743d57673c5..c2f7ba220e9e50 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.h +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.h @@ -3,7 +3,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface CHIPToolPersistentStorageDelegate : NSObject +@interface CHIPToolPersistentStorageDelegate : NSObject - (nullable NSData *)storageDataForKey:(NSString *)key; - (BOOL)setStorageData:(NSData *)value forKey:(NSString *)key; - (BOOL)removeStorageDataForKey:(NSString *)key; diff --git a/examples/darwin-framework-tool/commands/pairing/Commands.h b/examples/darwin-framework-tool/commands/pairing/Commands.h index ffda27b9e3d348..164c952ffc2f4f 100644 --- a/examples/darwin-framework-tool/commands/pairing/Commands.h +++ b/examples/darwin-framework-tool/commands/pairing/Commands.h @@ -41,6 +41,12 @@ class PairCodeThread : public PairingCommandBridge PairCodeThread() : PairingCommandBridge("code-thread", PairingMode::Code, PairingNetworkType::Thread) {} }; +class PairWithIPAddress : public PairingCommandBridge +{ +public: + PairWithIPAddress() : PairingCommandBridge("ethernet", PairingMode::Ethernet, PairingNetworkType::Ethernet) {} +}; + class PairBleWiFi : public PairingCommandBridge { public: @@ -64,13 +70,10 @@ void registerCommandsPairing(Commands & commands) const char * clusterName = "Pairing"; commands_list clusterCommands = { - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), }; commands.Register(clusterName, clusterCommands); diff --git a/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm b/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm index 621010c1d16e8b..4c25000ed91b01 100644 --- a/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm +++ b/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm @@ -25,22 +25,24 @@ { mWorkQueue = dispatch_queue_create("com.chip.open_commissioning_window", DISPATCH_QUEUE_SERIAL); auto * controller = CurrentCommissioner(); - auto * device = [MTRBaseDevice deviceWithNodeID:@(mNodeId) controller:controller]; + auto * device = [MTRDevice deviceWithNodeID:mNodeId deviceController:controller]; auto * self = this; if (mCommissioningWindowOption == 0) { - auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:@(0) queue:mWorkQueue]; + auto * cluster = [[MTRClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mWorkQueue]; auto * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = @(mCommissioningWindowTimeoutMs); params.timedInvokeTimeoutMs = @(10000); [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable error) { - if (error == nil) { - self->SetCommandExitStatus(CHIP_NO_ERROR); - } else { - self->SetCommandExitStatus(MTRErrorToCHIPErrorCode(error)); - } - }]; + expectedValues:nil + expectedValueInterval:nil + completionHandler:^(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.h b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h index 1b098adba25937..cf736e0e193387 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h +++ b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h @@ -24,6 +24,7 @@ enum class PairingMode { None, Code, + Ethernet, Ble, }; @@ -63,6 +64,12 @@ class PairingCommandBridge : public CHIPCommandBridge case PairingMode::Code: AddArgument("payload", &mOnboardingPayload); break; + case PairingMode::Ethernet: + AddArgument("setup-pin-code", 0, 134217727, &mSetupPINCode); + AddArgument("discriminator", 0, 4096, &mDiscriminator); + AddArgument("device-remote-ip", &ipAddress); + AddArgument("device-remote-port", 0, UINT16_MAX, &mRemotePort); + break; case PairingMode::Ble: AddArgument("setup-pin-code", 0, 134217727, &mSetupPINCode); AddArgument("discriminator", 0, 4096, &mDiscriminator); @@ -77,8 +84,9 @@ class PairingCommandBridge : public CHIPCommandBridge private: void PairWithCode(NSError * __autoreleasing * error); void PairWithPayload(NSError * __autoreleasing * error); + void PairWithIPAddress(NSError * __autoreleasing * error); void Unpair(); - void SetUpDeviceControllerDelegate(); + void SetUpPairingDelegate(); const PairingMode mPairingMode; const PairingNetworkType mNetworkType; @@ -86,7 +94,9 @@ class PairingCommandBridge : public CHIPCommandBridge chip::ByteSpan mSSID; chip::ByteSpan mPassword; chip::NodeId mNodeId; + uint16_t mRemotePort; uint16_t mDiscriminator; uint32_t mSetupPINCode; char * mOnboardingPayload; + char * ipAddress; }; diff --git a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm index 8bbda27ef8d420..e8fca6ab8771f5 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm @@ -19,8 +19,8 @@ #import #include "../common/CHIPCommandBridge.h" -#include "DeviceControllerDelegateBridge.h" #include "PairingCommandBridge.h" +#include "PairingDelegateBridge.h" #include #import "MTRError_Utils.h" @@ -28,14 +28,14 @@ using namespace ::chip; using namespace ::chip::Controller; -void PairingCommandBridge::SetUpDeviceControllerDelegate() +void PairingCommandBridge::SetUpPairingDelegate() { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.pairing", DISPATCH_QUEUE_SERIAL); - CHIPToolDeviceControllerDelegate * deviceControllerDelegate = [[CHIPToolDeviceControllerDelegate alloc] init]; + CHIPToolPairingDelegate * pairing = [[CHIPToolPairingDelegate alloc] init]; MTRCommissioningParameters * params = [[MTRCommissioningParameters alloc] init]; MTRDeviceController * commissioner = CurrentCommissioner(); - [deviceControllerDelegate setDeviceID:mNodeId]; + [pairing setDeviceID:mNodeId]; switch (mNetworkType) { case PairingNetworkType::None: case PairingNetworkType::Ethernet: @@ -49,11 +49,11 @@ break; } - [deviceControllerDelegate setCommandBridge:this]; - [deviceControllerDelegate setParams:params]; - [deviceControllerDelegate setCommissioner:commissioner]; + [pairing setCommandBridge:this]; + [pairing setParams:params]; + [pairing setCommissioner:commissioner]; - [commissioner setDeviceControllerDelegate:deviceControllerDelegate queue:callbackQueue]; + [commissioner setPairingDelegate:pairing queue:callbackQueue]; } CHIP_ERROR PairingCommandBridge::RunCommand() @@ -66,6 +66,9 @@ case PairingMode::Code: PairWithPayload(&error); break; + case PairingMode::Ethernet: + PairWithIPAddress(&error); + break; case PairingMode::Ble: PairWithCode(&error); break; @@ -79,54 +82,75 @@ void PairingCommandBridge::PairWithCode(NSError * __autoreleasing * error) { - SetUpDeviceControllerDelegate(); - auto * payload = [[MTRSetupPayload alloc] initWithSetupPasscode:@(mSetupPINCode) discriminator:@(mDiscriminator)]; + SetUpPairingDelegate(); MTRDeviceController * commissioner = CurrentCommissioner(); - [commissioner setupCommissioningSessionWithPayload:payload newNodeID:@(mNodeId) error:error]; + [commissioner pairDevice:mNodeId discriminator:mDiscriminator setupPINCode:mSetupPINCode error:error]; } void PairingCommandBridge::PairWithPayload(NSError * __autoreleasing * error) { - NSString * onboardingPayload = [NSString stringWithUTF8String:mOnboardingPayload]; - SetUpDeviceControllerDelegate(); - auto * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:onboardingPayload error:error]; - if (payload == nil) { - return; - } + NSString * payload = [NSString stringWithUTF8String:mOnboardingPayload]; + + SetUpPairingDelegate(); + MTRDeviceController * commissioner = CurrentCommissioner(); + [commissioner pairDevice:mNodeId onboardingPayload:payload error:error]; +} + +void PairingCommandBridge::PairWithIPAddress(NSError * __autoreleasing * error) +{ + SetUpPairingDelegate(); MTRDeviceController * commissioner = CurrentCommissioner(); - [commissioner setupCommissioningSessionWithPayload:payload newNodeID:@(mNodeId) error:error]; + [commissioner pairDevice:mNodeId + address:[NSString stringWithUTF8String:ipAddress] + port:mRemotePort + setupPINCode:mSetupPINCode + error:error]; } void PairingCommandBridge::Unpair() { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip-tool.command", DISPATCH_QUEUE_SERIAL); MTRDeviceController * commissioner = CurrentCommissioner(); - auto * device = [MTRBaseDevice deviceWithNodeID:@(mNodeId) controller:commissioner]; - - ChipLogProgress(chipTool, "Attempting to unpair device %llu", mNodeId); - MTRBaseClusterOperationalCredentials * opCredsCluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(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); - }]; - }]; + [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 endpoint: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); + }]; + }]; + } + }]; } diff --git a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h b/examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.h similarity index 74% rename from examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h rename to examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.h index 334d2339536b15..e295e084725701 100644 --- a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h +++ b/examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.h @@ -20,15 +20,14 @@ #import -@class MTRDeviceController; - -@interface CHIPToolDeviceControllerDelegate : NSObject +@interface CHIPToolPairingDelegate : NSObject @property PairingCommandBridge * commandBridge; @property chip::NodeId deviceID; @property MTRDeviceController * commissioner; @property MTRCommissioningParameters * params; -- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError *)error; -- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError *)error; +- (void)onPairingComplete:(NSError *)error; +- (void)onPairingDeleted:(NSError *)error; +- (void)onCommissioningComplete:(NSError *)error; @end diff --git a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm b/examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.mm similarity index 72% rename from examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm rename to examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.mm index dc53280b2d2553..1a58f255df30df 100644 --- a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.mm @@ -16,35 +16,35 @@ * */ -#include "DeviceControllerDelegateBridge.h" +#include "PairingDelegateBridge.h" #import -@interface CHIPToolDeviceControllerDelegate () +@interface CHIPToolPairingDelegate () @end -@implementation CHIPToolDeviceControllerDelegate -- (void)onStatusUpdate:(MTRCommissioningStatus)status +@implementation CHIPToolPairingDelegate +- (void)onStatusUpdate:(MTRPairingStatus)status { NSLog(@"Pairing Status Update: %tu", status); switch (status) { - case MTRCommissioningStatusSuccess: + case MTRPairingStatusSuccess: ChipLogProgress(chipTool, "Secure Pairing Success"); ChipLogProgress(chipTool, "CASE establishment successful"); break; - case MTRCommissioningStatusFailed: + case MTRPairingStatusFailed: ChipLogError(chipTool, "Secure Pairing Failed"); _commandBridge->SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE); break; - case MTRCommissioningStatusDiscoveringMoreDevices: + case MTRPairingStatusDiscoveringMoreDevices: ChipLogProgress(chipTool, "Secure Pairing Discovering More Devices"); break; - case MTRCommissioningStatusUnknown: + case MTRPairingStatusUnknown: ChipLogError(chipTool, "Uknown Pairing Status"); break; } } -- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError *)error +- (void)onPairingComplete:(NSError *)error { if (error != nil) { ChipLogProgress(chipTool, "PASE establishment failed"); @@ -54,14 +54,19 @@ - (void)controller:(MTRDeviceController *)controller commissioningSessionEstabli ChipLogProgress(chipTool, "Pairing Success"); ChipLogProgress(chipTool, "PASE establishment successful"); NSError * commissionError; - [_commissioner commissionNodeWithID:@(_deviceID) commissioningParams:_params error:&commissionError]; + [_commissioner commissionDevice:_deviceID commissioningParams:_params error:&commissionError]; if (commissionError != nil) { _commandBridge->SetCommandExitStatus(commissionError); return; } } -- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError *)error +- (void)onPairingDeleted:(NSError *)error +{ + _commandBridge->SetCommandExitStatus(error, "Pairing Delete"); +} + +- (void)onCommissioningComplete:(NSError *)error { _commandBridge->SetCommandExitStatus(error, "Pairing Commissioning Complete"); } diff --git a/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm b/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm index e1448eeaeceb5d..9d7423322508ac 100644 --- a/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm +++ b/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm @@ -61,7 +61,7 @@ NSString * codeString = [NSString stringWithCString:mCode encoding:NSASCIIStringEncoding]; NSError * error; MTRSetupPayload * payload; - payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:codeString error:&error]; + payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:codeString error:&error]; if (error) { LogNSError("Error: ", error); return CHIP_ERROR_INTERNAL; @@ -78,33 +78,37 @@ NSLog(@"ProductID: %@", payload.productID); NSLog(@"Custom flow: %tu (%@)", payload.commissioningFlow, CustomFlowString(payload.commissioningFlow)); { - if (payload.discoveryCapabilities == MTRDiscoveryCapabilitiesUnknown) { + if (payload.rendezvousInformation == nil) { NSLog(@"Capabilities: UNKNOWN"); } else { NSMutableString * humanFlags = [[NSMutableString alloc] init]; - auto value = payload.discoveryCapabilities; - if (value & MTRDiscoveryCapabilitiesSoftAP) { - [humanFlags appendString:@"SoftAP"]; - } - if (value & MTRDiscoveryCapabilitiesBLE) { - if (!humanFlags) { - [humanFlags appendString:@", "]; + auto value = [payload.rendezvousInformation unsignedLongValue]; + if (value == MTRDiscoveryCapabilitiesNone) { + [humanFlags appendString:@"NONE"]; + } else { + if (value & MTRDiscoveryCapabilitiesSoftAP) { + [humanFlags appendString:@"SoftAP"]; } - [humanFlags appendString:@"BLE"]; - } - if (value & MTRDiscoveryCapabilitiesOnNetwork) { - if (!humanFlags) { - [humanFlags appendString:@", "]; + if (value & MTRDiscoveryCapabilitiesBLE) { + if (!humanFlags) { + [humanFlags appendString:@", "]; + } + [humanFlags appendString:@"BLE"]; + } + if (value & MTRDiscoveryCapabilitiesOnNetwork) { + if (!humanFlags) { + [humanFlags appendString:@", "]; + } + [humanFlags appendString:@"ON NETWORK"]; } - [humanFlags appendString:@"ON NETWORK"]; } NSLog(@"Capabilities: 0x%02lX (%@)", static_cast(value), humanFlags); } } NSLog(@"Discriminator: %@", payload.discriminator); - NSLog(@"Passcode: %@", payload.setupPasscode); + NSLog(@"Passcode: %@", payload.setUpPINCode); if (payload.serialNumber) { NSLog(@"SerialNumber: %@", payload.serialNumber); @@ -116,8 +120,8 @@ return CHIP_ERROR_INTERNAL; } for (const MTROptionalQRCodeInfo * info : optionalVendorData) { - bool isTypeString = (info.infoType == MTROptionalQRCodeInfoTypeString); - bool isTypeInt32 = (info.infoType == MTROptionalQRCodeInfoTypeInt32); + bool isTypeString = [info.infoType isEqual:@(MTROptionalQRCodeInfoTypeString)]; + bool isTypeInt32 = [info.infoType isEqual:@(MTROptionalQRCodeInfoTypeInt32)]; VerifyOrReturnError(isTypeString || isTypeInt32, CHIP_ERROR_INVALID_ARGUMENT); if (isTypeString) { diff --git a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.h b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.h index 40c02ecbad0eec..80ec40be778db4 100644 --- a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.h +++ b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.h @@ -24,7 +24,7 @@ typedef NS_ENUM(uint8_t, UserConsentState) { OTAProviderUserUnknown = 0x03, }; -@interface DeviceSoftwareVersionModelData : MTROTASoftwareUpdateProviderClusterQueryImageParams +@interface DeviceSoftwareVersionModelData : MTROtaSoftwareUpdateProviderClusterQueryImageParams @property BOOL softwareVersionValid; @property (strong, nonatomic, nullable) NSNumber * cDVersionNumber; @property (strong, nonatomic, nullable) NSNumber * minApplicableSoftwareVersion; @@ -32,7 +32,7 @@ typedef NS_ENUM(uint8_t, UserConsentState) { @property (strong, nonatomic, nullable) NSString * otaURL; @end -@interface DeviceSoftwareVersionModel : MTROTASoftwareUpdateProviderClusterQueryImageResponseParams +@interface DeviceSoftwareVersionModel : MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams @property (strong, nonatomic, nullable) DeviceSoftwareVersionModelData * deviceModelData; - (NSComparisonResult)CompareSoftwareVersions:(DeviceSoftwareVersionModel * _Nullable)otherObject; @end @@ -40,28 +40,28 @@ typedef NS_ENUM(uint8_t, UserConsentState) { @interface OTAProviderDelegate : NSObject - (void)handleQueryImageForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller - params:(MTROTASoftwareUpdateProviderClusterQueryImageParams * _Nonnull)params - completion:(void (^_Nonnull)(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completion; + params:(MTROtaSoftwareUpdateProviderClusterQueryImageParams * _Nonnull)params + completionHandler:(void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)handleApplyUpdateRequestForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller - params:(MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams * _Nonnull)params - completion: - (void (^_Nonnull)(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completion; + params:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams * _Nonnull)params + completionHandler: + (void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)handleNotifyUpdateAppliedForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller - params:(MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams * _Nonnull)params - completion:(MTRStatusCompletion _Nonnull)completion; + params:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams * _Nonnull)params + completionHandler:(StatusCompletion _Nonnull)completionHandler; @property (strong, nonatomic, nullable) NSArray * candidates; @property (strong, nonatomic, nullable) DeviceSoftwareVersionModel * selectedCandidate; @property (strong, nonatomic, nullable) NSNumber * nodeID; -@property (nonatomic, readwrite) MTROTASoftwareUpdateProviderOTAQueryStatus queryImageStatus; +@property (nonatomic, readwrite) MTROtaSoftwareUpdateProviderOTAQueryStatus queryImageStatus; @property (nonatomic, readwrite) UserConsentState userConsentState; -@property (nonatomic, readwrite) MTROTASoftwareUpdateProviderOTAApplyUpdateAction action; +@property (nonatomic, readwrite) MTROtaSoftwareUpdateProviderOTAApplyUpdateAction action; @property (nonatomic, readwrite, nullable) NSNumber * delayedActionTime; @property (nonatomic, readwrite, nullable) NSNumber * timedInvokeTimeoutMs; @property (nonatomic, readwrite, nullable) NSNumber * userConsentNeeded; diff --git a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm index 68eef16bfc31fe..9c56fad14efafc 100644 --- a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm +++ b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm @@ -35,35 +35,35 @@ - (instancetype)init { if (self = [super init]) { _selectedCandidate = [[DeviceSoftwareVersionModel alloc] init]; - _action = MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed; + _action = MTROtaSoftwareUpdateProviderOTAApplyUpdateActionProceed; _userConsentState = OTAProviderUserUnknown; _delayedActionTime = nil; _timedInvokeTimeoutMs = nil; _userConsentNeeded = nil; - _queryImageStatus = MTROTASoftwareUpdateProviderOTAQueryStatusNotAvailable; + _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable; } return self; } - (void)handleQueryImageForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller - params:(MTROTASoftwareUpdateProviderClusterQueryImageParams * _Nonnull)params - completion:(void (^_Nonnull)(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completion + params:(MTROtaSoftwareUpdateProviderClusterQueryImageParams * _Nonnull)params + completionHandler:(void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { auto isBDXProtocolSupported = - [params.protocolsSupported containsObject:@(MTROTASoftwareUpdateProviderOTADownloadProtocolBDXSynchronous)]; + [params.protocolsSupported containsObject:@(MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXSynchronous)]; if (!isBDXProtocolSupported) { - _selectedCandidate.status = @(MTROTASoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported); - completion(_selectedCandidate, nil); + _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported); + completionHandler(_selectedCandidate, nil); return; } auto hasCandidate = [self SelectOTACandidate:params.vendorId rPID:params.productId rSV:params.softwareVersion]; if (!hasCandidate) { NSLog(@"Unable to select OTA Image."); - _selectedCandidate.status = @(MTROTASoftwareUpdateProviderOTAQueryStatusNotAvailable); - completion(_selectedCandidate, nil); + _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable); + completionHandler(_selectedCandidate, nil); return; } @@ -75,18 +75,18 @@ - (void)handleQueryImageForNodeID:(NSNumber * _Nonnull)nodeID _selectedCandidate.userConsentNeeded = _userConsentNeeded; NSLog(@"User Consent Needed: %@", _selectedCandidate.userConsentNeeded); } - completion(_selectedCandidate, nil); + completionHandler(_selectedCandidate, nil); } - (void)handleApplyUpdateRequestForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller - params:(MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams * _Nonnull)params - completion: - (void (^_Nonnull)(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completion + params:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams * _Nonnull)params + completionHandler: + (void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * applyUpdateResponseParams = - [[MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams alloc] init]; + MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * applyUpdateResponseParams = + [[MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams alloc] init]; applyUpdateResponseParams.action = @(_action); if (_delayedActionTime) { applyUpdateResponseParams.delayedActionTime = _delayedActionTime; @@ -95,22 +95,22 @@ - (void)handleApplyUpdateRequestForNodeID:(NSNumber * _Nonnull)nodeID applyUpdateResponseParams.timedInvokeTimeoutMs = _timedInvokeTimeoutMs; } - completion(applyUpdateResponseParams, nil); + completionHandler(applyUpdateResponseParams, nil); } - (void)handleNotifyUpdateAppliedForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller - params:(MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams * _Nonnull)params - completion:(MTRStatusCompletion _Nonnull)completion + params:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams * _Nonnull)params + completionHandler:(StatusCompletion _Nonnull)completionHandler { - completion(nil); + completionHandler(nil); } - (void)handleBDXTransferSessionBeginForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller fileDesignator:(NSString * _Nonnull)fileDesignator offset:(NSNumber * _Nonnull)offset - completion:(void (^)(NSError * error))completion + completionHandler:(void (^)(NSError * error))completionHandler { 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) }]; - completion(error); + completionHandler(error); return; } @@ -131,7 +131,7 @@ - (void)handleBDXTransferSessionBeginForNodeID:(NSNumber * _Nonnull)nodeID auto error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" code:MTRErrorCodeGeneralError userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(errorString, nil) }]; - completion(error); + completionHandler(error); return; } @@ -141,14 +141,14 @@ - (void)handleBDXTransferSessionBeginForNodeID:(NSNumber * _Nonnull)nodeID auto error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" code:MTRErrorCodeGeneralError userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(errorString, nil) }]; - completion(error); + completionHandler(error); return; } _mFileHandle = handle; _mFileOffset = offset; _mFileEndOffset = @(endOffset); - completion(nil); + completionHandler(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 - completion:(void (^)(NSData * _Nullable data, BOOL isEOF))completion + completionHandler:(void (^)(NSData * _Nullable data, BOOL isEOF))completionHandler { 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)); - completion(nil, NO); + completionHandler(nil, NO); return; } NSData * data = [_mFileHandle readDataUpToLength:[blockSize unsignedLongValue] error:&error]; if (error != nil) { NSLog(@"Error reading file %@", _mFileHandle); - completion(nil, NO); + completionHandler(nil, NO); return; } BOOL isEOF = offset + [blockSize unsignedLongValue] >= [_mFileEndOffset unsignedLongLongValue]; - completion(data, isEOF); + completionHandler(data, isEOF); } - (void)SetOTAFilePath:(const char *)path diff --git a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm index 6ec41eff9d9a5b..1c8caa56089ca4 100644 --- a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm +++ b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm @@ -39,7 +39,7 @@ } NSError * error; - return [MTROTAHeader headerFromData:[NSData dataWithBytes:buffer.data() length:buffer.size()] error:&error]; + return [MTROTAHeaderParser headerFromData:[NSData dataWithBytes:buffer.data() length:buffer.size()] error:&error]; } // Parses the JSON filepath and extracts DeviceSoftwareVersionModel parameters @@ -161,14 +161,14 @@ static bool ParseJsonFileAndPopulateCandidates( { CHIP_ERROR error = CHIP_NO_ERROR; if (action == 0) { - mOTADelegate.action = MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed; - ChipLogDetail(chipTool, "Successfully set action to: MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed"); + mOTADelegate.action = MTROtaSoftwareUpdateProviderOTAApplyUpdateActionProceed; + ChipLogDetail(chipTool, "Successfully set action to: MTROtaSoftwareUpdateProviderOTAApplyUpdateActionProceed"); } else if (action == 1) { - mOTADelegate.action = MTROTASoftwareUpdateProviderOTAApplyUpdateActionAwaitNextAction; - ChipLogDetail(chipTool, "Successfully set action to: MTROTASoftwareUpdateProviderOTAApplyUpdateActionAwaitNextAction"); + mOTADelegate.action = MTROtaSoftwareUpdateProviderOTAApplyUpdateActionAwaitNextAction; + ChipLogDetail(chipTool, "Successfully set action to: MTROtaSoftwareUpdateProviderOTAApplyUpdateActionAwaitNextAction"); } else if (action == 2) { - mOTADelegate.action = MTROTASoftwareUpdateProviderOTAApplyUpdateActionDiscontinue; - ChipLogDetail(chipTool, "Successfully set action to: MTROTASoftwareUpdateProviderOTAApplyUpdateActionDiscontinue"); + mOTADelegate.action = MTROtaSoftwareUpdateProviderOTAApplyUpdateActionDiscontinue; + ChipLogDetail(chipTool, "Successfully set action to: MTROtaSoftwareUpdateProviderOTAApplyUpdateActionDiscontinue"); } else { ChipLogError(chipTool, "Only accepts the following: 0 (Proceed), 1 (Await Next Action), 2 (Discontinue)"); error = CHIP_ERROR_INTERNAL; @@ -179,18 +179,18 @@ static bool ParseJsonFileAndPopulateCandidates( { CHIP_ERROR error = CHIP_NO_ERROR; if (status == 0) { - mOTADelegate.queryImageStatus = MTROTASoftwareUpdateProviderOTAQueryStatusUpdateAvailable; - ChipLogDetail(chipTool, "Successfully set status to: MTROTASoftwareUpdateProviderOTAQueryStatusUpdateAvailable"); + mOTADelegate.queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable; + ChipLogDetail(chipTool, "Successfully set status to: MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable"); } else if (status == 1) { - mOTADelegate.queryImageStatus = MTROTASoftwareUpdateProviderOTAQueryStatusBusy; - ChipLogDetail(chipTool, "Successfully set status to: MTROTASoftwareUpdateProviderOTAQueryStatusBusy"); + mOTADelegate.queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusBusy; + ChipLogDetail(chipTool, "Successfully set status to: MTROtaSoftwareUpdateProviderOTAQueryStatusBusy"); } else if (status == 2) { - mOTADelegate.queryImageStatus = MTROTASoftwareUpdateProviderOTAQueryStatusNotAvailable; - ChipLogDetail(chipTool, "Successfully set status to: MTROTASoftwareUpdateProviderOTAQueryStatusNotAvailable"); + mOTADelegate.queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable; + ChipLogDetail(chipTool, "Successfully set status to: MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable"); } else if (status == 4) { - mOTADelegate.queryImageStatus = MTROTASoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported; + mOTADelegate.queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported; ChipLogDetail( - chipTool, "Successfully set status to: MTROTASoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported"); + chipTool, "Successfully set status to: MTROtaSoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported"); } else { ChipLogError(chipTool, "Only accepts the following: 0 (Available), 1 (Busy), 2 (Not Available), 3 (Not Supported)"); error = CHIP_ERROR_INTERNAL; diff --git a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h index 3873ea8fafa29f..14cd1eef4d4b94 100644 --- a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h +++ b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h @@ -43,14 +43,15 @@ const char * getScriptsFolder() { return basePath; } constexpr const char * kDefaultKey = "default"; -@interface TestDeviceControllerDelegate : NSObject +@interface TestPairingDelegate : NSObject @property TestCommandBridge * commandBridge; @property chip::NodeId deviceId; @property BOOL active; // Whether to pass on notifications to the commandBridge -- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status; -- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError * _Nullable)error; -- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError * _Nullable)error; +- (void)onStatusUpdate:(MTRPairingStatus)status; +- (void)onPairingComplete:(NSError * _Nullable)error; +- (void)onPairingDeleted:(NSError * _Nullable)error; +- (void)onCommissioningComplete:(NSError * _Nullable)error; - (instancetype)init NS_UNAVAILABLE; - (instancetype)initWithTestCommandBridge:(TestCommandBridge *)commandBridge; @@ -69,7 +70,7 @@ class TestCommandBridge : public CHIPCommandBridge, public: TestCommandBridge(const char * _Nonnull commandName) : CHIPCommandBridge(commandName) - , mDeviceControllerDelegate([[TestDeviceControllerDelegate alloc] initWithTestCommandBridge:this]) + , mPairingDelegate([[TestPairingDelegate alloc] initWithTestCommandBridge:this]) { AddArgument("delayInMs", 0, UINT64_MAX, &mDelayInMs); AddArgument("PICS", &mPICSFilePath); @@ -155,10 +156,9 @@ class TestCommandBridge : public CHIPCommandBridge, SetIdentity(identity); - // Invalidate our existing CASE session; otherwise trying to work with - // our device will just reuse it without establishing a new CASE - // session when a reboot is done on the server, and then our next - // interaction will time out. + // Invalidate our existing CASE session; otherwise getConnectedDevice + // will just hand it right back to us without establishing a new CASE + // session when a reboot is done on the server. if (value.expireExistingSession.ValueOr(true)) { if (GetDevice(identity) != nil) { [GetDevice(identity) invalidateCASESession]; @@ -166,10 +166,17 @@ class TestCommandBridge : public CHIPCommandBridge, } } - mConnectedDevices[identity] = [MTRBaseDevice deviceWithNodeID:@(value.nodeId) controller:controller]; - dispatch_async(mCallbackQueue, ^{ - NextTest(); - }); + [controller getBaseDevice:value.nodeId + queue:mCallbackQueue + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + if (error != nil) { + SetCommandExitStatus(error); + return; + } + + mConnectedDevices[identity] = device; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -182,19 +189,15 @@ class TestCommandBridge : public CHIPCommandBridge, SetIdentity(identity); - [controller setDeviceControllerDelegate:mDeviceControllerDelegate queue:mCallbackQueue]; - [mDeviceControllerDelegate setDeviceId:value.nodeId]; - [mDeviceControllerDelegate setActive:YES]; + [controller setPairingDelegate:mPairingDelegate queue:mCallbackQueue]; + [mPairingDelegate setDeviceId:value.nodeId]; + [mPairingDelegate setActive:YES]; NSString * payloadStr = [[NSString alloc] initWithBytes:value.payload.data() length:value.payload.size() encoding:NSUTF8StringEncoding]; NSError * err; - auto * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:payloadStr error:&err]; - if (err != nil) { - return MTRErrorToCHIPErrorCode(err); - } - BOOL ok = [controller setupCommissioningSessionWithPayload:payload newNodeID:@(value.nodeId) error:&err]; + BOOL ok = [controller pairDevice:value.nodeId onboardingPayload:payloadStr error:&err]; if (ok == YES) { return CHIP_NO_ERROR; } @@ -231,9 +234,7 @@ class TestCommandBridge : public CHIPCommandBridge, VerifyOrReturn(commissioner != nil, Exit("No current commissioner")); NSError * commissionError = nil; - [commissioner commissionNodeWithID:@(nodeId) - commissioningParams:[[MTRCommissioningParameters alloc] init] - error:&commissionError]; + [commissioner commissionDevice:nodeId commissioningParams:[[MTRCommissioningParameters alloc] init] error:&commissionError]; CHIP_ERROR err = MTRErrorToCHIPErrorCode(commissionError); if (err != CHIP_NO_ERROR) { Exit("Failed to kick off commissioning", err); @@ -520,7 +521,7 @@ class TestCommandBridge : public CHIPCommandBridge, } private: - TestDeviceControllerDelegate * _Nonnull mDeviceControllerDelegate; + TestPairingDelegate * _Nonnull mPairingDelegate; // Set of our connected devices, keyed by identity. std::map mConnectedDevices; @@ -528,13 +529,13 @@ class TestCommandBridge : public CHIPCommandBridge, NS_ASSUME_NONNULL_BEGIN -@implementation TestDeviceControllerDelegate -- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status +@implementation TestPairingDelegate +- (void)onStatusUpdate:(MTRPairingStatus)status { if (_active) { - if (status == MTRCommissioningStatusSuccess) { + if (status == MTRPairingStatusSuccess) { NSLog(@"Secure pairing success"); - } else if (status == MTRCommissioningStatusFailed) { + } else if (status == MTRPairingStatusFailed) { _active = NO; NSLog(@"Secure pairing failed"); _commandBridge->OnStatusUpdate(chip::app::StatusIB(chip::Protocols::InteractionModel::Status::Failure)); @@ -542,7 +543,7 @@ NS_ASSUME_NONNULL_BEGIN } } -- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError * _Nullable)error +- (void)onPairingComplete:(NSError * _Nullable)error { if (_active) { if (error != nil) { @@ -556,7 +557,14 @@ NS_ASSUME_NONNULL_BEGIN } } -- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError * _Nullable)error +- (void)onPairingDeleted:(NSError * _Nullable)error +{ + if (_active) { + _commandBridge->PairingDeleted(); + } +} + +- (void)onCommissioningComplete:(NSError * _Nullable)error { if (_active) { _active = NO; diff --git a/examples/darwin-framework-tool/templates/commands.zapt b/examples/darwin-framework-tool/templates/commands.zapt index 31053445a66935..2b11f4097496fd 100644 --- a/examples/darwin-framework-tool/templates/commands.zapt +++ b/examples/darwin-framework-tool/templates/commands.zapt @@ -46,8 +46,8 @@ public: ChipLogProgress(chipTool, "Sending cluster ({{asHex parent.code 8}}) command ({{asHex code 8}}) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseCluster{{asUpperCamelCase clusterName preserveAcronyms=true}} alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTR{{asUpperCamelCase clusterName preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Params alloc] init]; + MTRBaseCluster{{asUpperCamelCase clusterName}} * cluster = [[MTRBaseCluster{{asUpperCamelCase clusterName}} alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + __auto_type * params = [[MTR{{asUpperCamelCase clusterName}}Cluster{{asUpperCamelCase name}}Params alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; {{#chip_cluster_command_arguments}} {{>decodable_value target=(concat "params." (asStructPropertyName label)) source=(concat "mRequest." (asLowerCamelCase label)) cluster=parent.clusterName type=type depth=0}} @@ -56,9 +56,9 @@ public: uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster {{asLowerCamelCase name}}WithParams:params completion: + [cluster {{asLowerCamelCase name}}WithParams:params completionHandler: {{#if hasSpecificResponse}} - ^(MTR{{asUpperCamelCase clusterName preserveAcronyms=true}}Cluster{{asUpperCamelCase responseName}}Params * _Nullable values, NSError * _Nullable error) { + ^(MTR{{asUpperCamelCase clusterName}}Cluster{{asUpperCamelCase responseName}}Params * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); {{else}} ^(NSError * _Nullable error) { @@ -90,8 +90,7 @@ private: {{/chip_cluster_commands}} {{#chip_server_cluster_attributes}} -{{#*inline "cluster"}}Cluster{{asUpperCamelCase parent.name preserveAcronyms=true}}{{/inline}} -{{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} +{{#*inline "attribute"}}Attribute{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}}{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeList")}}DeviceList{{else}}{{asUpperCamelCase name}}{{/if}}{{else}}{{asUpperCamelCase name}}{{/if}}{{/inline}} /* * Attribute {{asUpperCamelCase name}} @@ -112,23 +111,21 @@ public: ChipLogProgress(chipTool, "Sending cluster ({{asHex parent.code 8}}) ReadAttribute ({{asHex code 8}}) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBase{{>cluster}} alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseCluster{{asUpperCamelCase parent.name}} * cluster = [[MTRBaseCluster{{asUpperCamelCase parent.name}} alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; {{#if_is_fabric_scoped_struct type}} - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; {{/if_is_fabric_scoped_struct}} - [cluster read{{>attribute}}With + [cluster readAttribute{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}}{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeList")}}DeviceList{{else}}{{asUpperCamelCase name}}{{/if}}{{else}}{{asUpperCamelCase name}}{{/if}}With {{~#if_is_fabric_scoped_struct type~}} - Params:params completion: + Params:params completionHandler: {{~else~}} - Completion: + CompletionHandler: {{~/if_is_fabric_scoped_struct~}} ^({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error) { - NSLog(@"{{asUpperCamelCase parent.name preserveAcronyms=true}}.{{asUpperCamelCase name preserveAcronyms=true}} response %@", [value description]); + NSLog(@"{{asUpperCamelCase parent.name}}.{{asUpperCamelCase name}} response %@", [value description]); if (error != nil) { - LogNSError("{{asUpperCamelCase parent.name preserveAcronyms=true}} {{asUpperCamelCase name preserveAcronyms=true}} read Error", error); + LogNSError("{{asUpperCamelCase parent.name}} {{asUpperCamelCase name}} read Error", error); } SetCommandExitStatus(error); }]; @@ -164,8 +161,8 @@ public: { ChipLogProgress(chipTool, "Sending cluster ({{asHex parent.code 8}}) WriteAttribute ({{asHex code 8}}) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBase{{>cluster}} alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseCluster{{asUpperCamelCase parent.name}} * cluster = [[MTRBaseCluster{{asUpperCamelCase parent.name}} alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; {{#if_chip_complex}} @@ -179,9 +176,9 @@ public: {{asObjectiveCType type parent.name}} value = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:mValue]; {{/if_chip_complex}} - [cluster write{{>attribute}}WithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttribute{{asUpperCamelCase name}}WithValue:value params:params completionHandler:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("{{asUpperCamelCase parent.name preserveAcronyms=true}} {{asUpperCamelCase name preserveAcronyms=true}} write Error", error); + LogNSError("{{asUpperCamelCase parent.name}} {{asUpperCamelCase name}} write Error", error); } SetCommandExitStatus(error); }]; @@ -218,18 +215,16 @@ public: { ChipLogProgress(chipTool, "Sending cluster ({{asHex parent.code 8}}) ReportAttribute ({{asHex code 8}}) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBase{{>cluster}} alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribe{{>attribute}}WithParams:params + MTRBaseCluster{{asUpperCamelCase parent.name}} * cluster = [[MTRBaseCluster{{asUpperCamelCase parent.name}} alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribe{{>attribute}}WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^(){ mSubscriptionEstablished=YES; } reportHandler:^({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error) { - NSLog(@"{{asUpperCamelCase parent.name preserveAcronyms=true}}.{{asUpperCamelCase name preserveAcronyms=true}} response %@", [value description]); + NSLog(@"{{asUpperCamelCase parent.name}}.{{asUpperCamelCase name}} response %@", [value description]); SetCommandExitStatus(error); }]; diff --git a/examples/darwin-framework-tool/templates/tests/commands.zapt b/examples/darwin-framework-tool/templates/tests/commands.zapt index adfa4662f7b1c5..2d1f547489bc4c 100644 --- a/examples/darwin-framework-tool/templates/tests/commands.zapt +++ b/examples/darwin-framework-tool/templates/tests/commands.zapt @@ -10,8 +10,6 @@ #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 ffed4b28869735..3dfed3dd87c1bb 100644 --- a/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt +++ b/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt @@ -126,8 +126,6 @@ class {{filename}}: public TestCommandBridge {{#*inline "testCommand"}}Test{{asUpperCamelCase label}}_{{index}}{{/inline}} CHIP_ERROR {{>testCommand}}() { - {{#*inline "cluster"}}{{asUpperCamelCase cluster preserveAcronyms=true}}{{/inline}} - {{#*inline "attribute"}}{{asUpperCamelCase attribute preserveAcronyms=true}}{{/inline}} {{#if (isTestOnlyCluster cluster)}} {{asEncodableType}} value; {{#chip_tests_item_parameters}} @@ -136,19 +134,19 @@ class {{filename}}: public TestCommandBridge return {{command}}("{{identity}}", value); {{else}} MTRBaseDevice * device = GetDevice("{{identity}}"); - __auto_type * cluster = [[MTRBaseCluster{{>cluster}} alloc] initWithDevice:device endpoint:@({{endpoint}}) queue:mCallbackQueue]; + MTRBaseCluster{{asUpperCamelCase cluster}} * cluster = [[MTRBaseCluster{{asUpperCamelCase cluster}} alloc] initWithDevice:device endpoint:{{endpoint}} queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); {{#if isCommand}} {{#if commandObject.arguments.length}} - __auto_type * params = [[MTR{{>cluster}}Cluster{{asUpperCamelCase command preserveAcronyms=true}}Params alloc] init]; + __auto_type * params = [[MTR{{asUpperCamelCase cluster}}Cluster{{asUpperCamelCase command}}Params alloc] init]; {{/if}} {{#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 completion{{else}}Completion{{/if}}: + [cluster {{asLowerCamelCase command}}With{{#if commandObject.arguments.length}}Params:params completionHandler{{else}}CompletionHandler{{/if}}: {{#if commandObject.hasSpecificResponse}} - ^(MTR{{>cluster}}Cluster{{asUpperCamelCase commandObject.responseName}}Params * _Nullable values, NSError * _Nullable err) { + ^(MTR{{asUpperCamelCase cluster}}Cluster{{asUpperCamelCase commandObject.responseName}}Params * _Nullable values, NSError * _Nullable err) { {{else}} ^(NSError * _Nullable err) { {{/if}} @@ -156,9 +154,11 @@ class {{filename}}: public TestCommandBridge {{#chip_tests_item_parameters}} {{asObjectiveCBasicType type}} {{asLowerCamelCase name}}Argument = {{asTypedLiteral definedValue type}}; {{/chip_tests_item_parameters}} - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) maxInterval:@(maxIntervalArgument)]; - [cluster subscribeAttribute{{>attribute}}WithParams:params - subscriptionEstablished:^{ + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + [cluster subscribeAttribute{{asUpperCamelCase attribute}}WithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] + maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] + params:params + subscriptionEstablished:^{ VerifyOrReturn(testSendCluster{{parent.filename}}_{{waitForReport.index}}_{{asUpperCamelCase waitForReport.command}}_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); NextTest(); } @@ -167,14 +167,14 @@ class {{filename}}: public TestCommandBridge {{> subscribeDataCallback }} = ^({{asObjectiveCClass attributeObject.type cluster forceList=attributeObject.isArray}} * _Nullable value, NSError * _Nullable err) { {{else if isReadAttribute}} {{#if_is_fabric_scoped_struct attributeObject.type}} - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = {{fabricFiltered}}; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:{{fabricFiltered}}]; {{/if_is_fabric_scoped_struct}} - [cluster readAttribute{{>attribute}}With + [cluster readAttribute{{#if (isStrEqual (asUpperCamelCase cluster) "Descriptor")}}{{#if (isStrEqual (asUpperCamelCase attribute) "DeviceTypeList")}}DeviceList{{else}}{{asUpperCamelCase attribute}}{{/if}}{{else}}{{asUpperCamelCase attribute}}{{/if}}With {{~#if_is_fabric_scoped_struct attributeObject.type~}} - Params:params completion: + Params:params completionHandler: {{~else~}} - Completion: + CompletionHandler: {{~/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{{>attribute}}WithValue:{{#chip_tests_item_parameters}}{{asLowerCamelCase name}}Argument{{/chip_tests_item_parameters}} completion:^(NSError * _Nullable err) { + [cluster writeAttribute{{asUpperCamelCase attribute}}WithValue:{{#chip_tests_item_parameters}}{{asLowerCamelCase name}}Argument{{/chip_tests_item_parameters}} completionHandler:^(NSError * _Nullable err) { {{/if}} NSLog(@"{{label}} Error: %@", err); diff --git a/scripts/build/build/target.py b/scripts/build/build/target.py index b31de44d514b20..de5de5fbd74718 100644 --- a/scripts/build/build/target.py +++ b/scripts/build/build/target.py @@ -47,6 +47,9 @@ from typing import Any, Dict, List, Iterable, Optional +report_rejected_parts = True + + @dataclass(init=False) class TargetPart: # SubTarget/Modifier name @@ -78,14 +81,16 @@ def ExceptIfRe(self, expr: str): def Accept(self, full_input: str): if self.except_if_re: if self.except_if_re.search(full_input): - # likely nothing will match when we get such an error - logging.error(f"'{self.name}' does not support '{full_input}' due to rule EXCEPT IF '{self.except_if_re.pattern}'") + if report_rejected_parts: + # likely nothing will match when we get such an error + logging.error(f"'{self.name}' does not support '{full_input}' due to rule EXCEPT IF '{self.except_if_re.pattern}'") return False if self.only_if_re: if not self.only_if_re.search(full_input): - # likely nothing will match when we get such an error - logging.error(f"'{self.name}' does not support '{full_input}' due to rule ONLY IF '{self.only_if_re.pattern}'") + if report_rejected_parts: + # likely nothing will match when we get such an error + logging.error(f"'{self.name}' does not support '{full_input}' due to rule ONLY IF '{self.only_if_re.pattern}'") return False return True diff --git a/scripts/build/build_examples.py b/scripts/build/build_examples.py index b95a006c18458f..5f8a7ef2a5c7bd 100755 --- a/scripts/build/build_examples.py +++ b/scripts/build/build_examples.py @@ -162,6 +162,7 @@ def cmd_generate(context): def cmd_targets(context, expand): for target in build.targets.BUILD_TARGETS: if expand: + build.target.report_rejected_parts = False for s in target.AllVariants(): print(s) else: diff --git a/scripts/tests/chiptest/lsan-mac-suppressions.txt b/scripts/tests/chiptest/lsan-mac-suppressions.txt index 8d1bd5719713ee..fad4a1e0971248 100644 --- a/scripts/tests/chiptest/lsan-mac-suppressions.txt +++ b/scripts/tests/chiptest/lsan-mac-suppressions.txt @@ -19,8 +19,19 @@ leak:drbg_bytes # TODO: OpenSSL ERR_get_state seems to leak. leak:ERR_get_state +# TODO: BLE initialization allocates some UUIDs and strings that seem to leak. +leak:[BleConnection initWithDiscriminator:] +leak:[CBXpcConnection initWithDelegate:queue:options:sessionType:] + +# TODO: Figure out how we are managing to leak NSData while using ARC! +leak:[CHIPToolKeypair signMessageECDSA_RAW:] + +# TODO: Figure out how we are managing to leak NSData while using ARC, though +# this may just be a leak deep inside the CFPreferences stuff somewhere. +leak:[CHIPToolPersistentStorageDelegate storageDataForKey:] + # TODO: https://github.com/project-chip/connectedhomeip/issues/22333 -leak:[MTRBaseCluster* subscribeAttribute*WithParams:subscriptionEstablished:reportHandler:] +leak:[MTRBaseCluster* subscribeAttribute*WithMinInterval:maxInterval:params:subscriptionEstablished:reportHandler:] #TODO: Figure out why nw_path_monitor_create leaks. The leak can be reproduced using: # -- testFile.cpp diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 5677b25dc1b160..968f1bd6e7d683 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -227,22 +227,21 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) { setOnOffValue(endpoint, (currentLevel.Value() != state->minLevel)); } - else + + if (state->storedLevel != INVALID_STORED_LEVEL) { - if (state->storedLevel != INVALID_STORED_LEVEL) + uint8_t storedLevel8u = (uint8_t) state->storedLevel; + status = Attributes::CurrentLevel::Set(endpoint, storedLevel8u); + if (status != EMBER_ZCL_STATUS_SUCCESS) { - uint8_t storedLevel8u = (uint8_t) state->storedLevel; - status = Attributes::CurrentLevel::Set(endpoint, storedLevel8u); - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - emberAfLevelControlClusterPrintln("ERR: writing current level %x", status); - } - else - { - updateCoupledColorTemp(endpoint); - } + emberAfLevelControlClusterPrintln("ERR: writing current level %x", status); + } + else + { + updateCoupledColorTemp(endpoint); } } + writeRemainingTime(endpoint, 0); } else @@ -1070,16 +1069,15 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new // time period OnOffTransitionTime." if (useOnLevel) { - // If OnLevel is defined, don't revert to stored level. - moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, transitionTime, 0xFF, 0xFF, - INVALID_STORED_LEVEL); + moveToLevelHandler(endpoint, Commands::MoveToLevelWithOnOff::Id, minimumLevelAllowedForTheDevice, transitionTime, 0xFF, + 0xFF, INVALID_STORED_LEVEL); } else { // If OnLevel is not defined, set the CurrentLevel to the stored level. - moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, transitionTime, 0xFF, 0xFF, - temporaryCurrentLevelCache.Value()); + moveToLevelHandler(endpoint, Commands::MoveToLevelWithOnOff::Id, minimumLevelAllowedForTheDevice, transitionTime, 0xFF, + 0xFF, temporaryCurrentLevelCache.Value()); } } } diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index 03eff53c5a0978..832e5d7aae982a 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -187,15 +187,19 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, chip::Comman { emberAfOnOffClusterLevelControlEffectCallback(endpoint, newValue); } -#endif - - // write the new on/off value - status = Attributes::OnOff::Set(endpoint, newValue); - if (status != EMBER_ZCL_STATUS_SUCCESS) + else { - emberAfOnOffClusterPrintln("ERR: writing on/off %x", status); - return status; +#endif + // write the new on/off value + status = Attributes::OnOff::Set(endpoint, newValue); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfOnOffClusterPrintln("ERR: writing on/off %x", status); + return status; + } +#ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL } +#endif } #ifdef EMBER_AF_PLUGIN_SCENES @@ -241,7 +245,7 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint) EmberAfStatus status = getOnOffValueForStartUp(endpoint, onOffValueForStartUp); if (status == EMBER_ZCL_STATUS_SUCCESS) { - status = setOnOffValue(endpoint, onOffValueForStartUp, false); + status = setOnOffValue(endpoint, onOffValueForStartUp, true); } #ifdef EMBER_AF_PLUGIN_MODE_SELECT diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 1d7b65e802735c..a3803a8cfbd58c 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -107,6 +107,9 @@ void emberAfEndpointConfigure(void) { uint16_t ep; + static_assert(FIXED_ENDPOINT_COUNT <= std::numeric_limits::max(), + "FIXED_ENDPOINT_COUNT must not exceed the size of the endpoint data type"); + #if !defined(EMBER_SCRIPTED_TEST) uint16_t fixedEndpoints[] = FIXED_ENDPOINT_ARRAY; uint16_t fixedDeviceTypeListLengths[] = FIXED_DEVICE_TYPE_LENGTHS; diff --git a/src/app/util/config.h b/src/app/util/config.h index 0cff1448866473..bb85dcc6b30949 100644 --- a/src/app/util/config.h +++ b/src/app/util/config.h @@ -31,8 +31,6 @@ #include #endif -#include // For GENERATED_TOKEN_LOADER/SAVER macros - // ******************************************************************* // pre-defined Devices // diff --git a/src/app/zap-templates/app-templates.json b/src/app/zap-templates/app-templates.json index 553b0574c864ef..05dfde001ff3f2 100644 --- a/src/app/zap-templates/app-templates.json +++ b/src/app/zap-templates/app-templates.json @@ -69,11 +69,6 @@ "name": "ZCL gen_config header", "output": "gen_config.h" }, - { - "path": "templates/app/gen_tokens.zapt", - "name": "ZCL gen_tokens header", - "output": "gen_tokens.h" - }, { "path": "templates/app/CHIPClientCallbacks.zapt", "name": "CHIP Client Callbacks header", diff --git a/src/app/zap-templates/partials/header.zapt b/src/app/zap-templates/partials/header.zapt index af63f7f6443bd8..fbed9690c1f3da 100644 --- a/src/app/zap-templates/partials/header.zapt +++ b/src/app/zap-templates/partials/header.zapt @@ -15,6 +15,4 @@ * limitations under the License. */ -{{#unless excludeZapComment}} // THIS FILE IS GENERATED BY ZAP -{{/unless}} diff --git a/src/app/zap-templates/templates/app/gen_tokens.zapt b/src/app/zap-templates/templates/app/gen_tokens.zapt deleted file mode 100644 index 718a7d770178fd..00000000000000 --- a/src/app/zap-templates/templates/app/gen_tokens.zapt +++ /dev/null @@ -1,28 +0,0 @@ -{{> header}} - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.h b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.h index fbdcff4df3c79e..e4f114bc4ab869 100644 --- a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.h +++ b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.h @@ -25,8 +25,6 @@ extern NSString * const kNetworkSSIDDefaultsKey; extern NSString * const kNetworkPasswordDefaultsKey; extern NSString * const kFabricIdKey; -typedef void (^DeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NSError * _Nullable error); - MTRDeviceController * _Nullable InitializeMTR(void); MTRDeviceController * _Nullable MTRRestartController(MTRDeviceController * controller); id _Nullable MTRGetDomainValueForKey(NSString * domain, NSString * key); @@ -38,12 +36,12 @@ uint64_t MTRGetLastPairedDeviceId(void); void MTRSetNextAvailableDeviceID(uint64_t id); void MTRSetDevicePaired(uint64_t id, BOOL paired); BOOL MTRIsDevicePaired(uint64_t id); -BOOL MTRGetConnectedDevice(DeviceConnectionCallback completionHandler); -BOOL MTRGetConnectedDeviceWithID(uint64_t deviceId, DeviceConnectionCallback completionHandler); +BOOL MTRGetConnectedDevice(MTRDeviceConnectionCallback completionHandler); +BOOL MTRGetConnectedDeviceWithID(uint64_t deviceId, MTRDeviceConnectionCallback completionHandler); void MTRUnpairDeviceWithID(uint64_t deviceId); MTRBaseDevice * _Nullable MTRGetDeviceBeingCommissioned(void); -@interface CHIPToolPersistentStorageDelegate : NSObject +@interface CHIPToolPersistentStorageDelegate : NSObject - (nullable NSData *)storageDataForKey:(NSString *)key; - (BOOL)setStorageData:(NSData *)value forKey:(NSString *)key; - (BOOL)removeStorageDataForKey:(NSString *)key; diff --git a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m index 8ecbda4a4b884e..3440a251b98bbe 100644 --- a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m +++ b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m @@ -76,9 +76,9 @@ void MTRSetNextAvailableDeviceID(uint64_t id) static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ CHIPToolPersistentStorageDelegate * storage = [[CHIPToolPersistentStorageDelegate alloc] init]; - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - if (![factory startControllerFactory:factoryParams error:nil]) { + __auto_type * factory = [MTRControllerFactory sharedInstance]; + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + if (![factory startup:factoryParams]) { return; } @@ -87,14 +87,14 @@ void MTRSetNextAvailableDeviceID(uint64_t id) return; } - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:keys.ipk fabricID:@(1) nocSigner:keys]; - params.vendorID = @(kTestVendorId); + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:keys fabricId:1 ipk:keys.ipk]; + params.vendorId = @(kTestVendorId); // We're not sure whether we have a fabric configured already; try as if // we did, and if not fall back to creating a new one. - sController = [factory createControllerOnExistingFabric:params error:nil]; + sController = [factory startControllerOnExistingFabric:params]; if (sController == nil) { - sController = [factory createControllerOnNewFabric:params error:nil]; + sController = [factory startControllerOnNewFabric:params]; } }); @@ -113,9 +113,9 @@ void MTRSetNextAvailableDeviceID(uint64_t id) [controller shutdown]; NSLog(@"Starting up the stack"); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:keys.ipk fabricID:@(1) nocSigner:keys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:keys fabricId:1 ipk:keys.ipk]; - sController = [[MTRDeviceControllerFactory sharedInstance] createControllerOnExistingFabric:params error:nil]; + sController = [[MTRControllerFactory sharedInstance] startControllerOnExistingFabric:params]; return sController; } @@ -129,21 +129,20 @@ uint64_t MTRGetLastPairedDeviceId(void) return deviceId; } -BOOL MTRGetConnectedDevice(DeviceConnectionCallback completionHandler) +BOOL MTRGetConnectedDevice(MTRDeviceConnectionCallback completionHandler) { - InitializeMTR(); + MTRDeviceController * controller = InitializeMTR(); // Let's use the last device that was paired uint64_t deviceId = MTRGetLastPairedDeviceId(); - - return MTRGetConnectedDeviceWithID(deviceId, completionHandler); + return [controller getBaseDevice:deviceId queue:dispatch_get_main_queue() completionHandler:completionHandler]; } MTRBaseDevice * MTRGetDeviceBeingCommissioned(void) { NSError * error; MTRDeviceController * controller = InitializeMTR(); - MTRBaseDevice * device = [controller deviceBeingCommissionedWithNodeID:@(MTRGetLastPairedDeviceId()) error:&error]; + MTRBaseDevice * device = [controller getDeviceBeingCommissioned:MTRGetLastPairedDeviceId() error:&error]; if (error) { NSLog(@"Error retrieving device being commissioned for deviceId %llu", MTRGetLastPairedDeviceId()); return nil; @@ -151,16 +150,11 @@ BOOL MTRGetConnectedDevice(DeviceConnectionCallback completionHandler) return device; } -BOOL MTRGetConnectedDeviceWithID(uint64_t deviceId, DeviceConnectionCallback completionHandler) +BOOL MTRGetConnectedDeviceWithID(uint64_t deviceId, MTRDeviceConnectionCallback completionHandler) { MTRDeviceController * controller = InitializeMTR(); - // We can simplify this now that devices can be gotten sync, but for now just do the async dispatch. - dispatch_async(dispatch_get_main_queue(), ^{ - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(deviceId) controller:controller]; - completionHandler(device, nil); - }); - return YES; + return [controller getBaseDevice:deviceId queue:dispatch_get_main_queue() completionHandler:completionHandler]; } BOOL MTRIsDevicePaired(uint64_t deviceId) @@ -186,37 +180,38 @@ void MTRUnpairDeviceWithID(uint64_t deviceId) } NSLog(@"Attempting to unpair device %llu", deviceId); MTRBaseClusterOperationalCredentials * opCredsCluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(0) queue:dispatch_get_main_queue()]; - [opCredsCluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - if (error) { - NSLog(@"Failed to get current fabric index for device %llu still removing from CHIPTool. %@", deviceId, error); - return; - } - MTROperationalCredentialsClusterRemoveFabricParams * params = - [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; - params.fabricIndex = value; - [opCredsCluster removeFabricWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error) { - if (error) { - NSLog(@"Failed to remove current fabric index %@ for device %llu. %@", - params.fabricIndex, deviceId, error); - return; - } - NSLog(@"Successfully unpaired deviceId %llu", deviceId); - }]; - }]; + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:dispatch_get_main_queue()]; + [opCredsCluster + readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + if (error) { + NSLog(@"Failed to get current fabric index for device %llu still removing from CHIPTool. %@", deviceId, error); + return; + } + MTROperationalCredentialsClusterRemoveFabricParams * params = + [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + params.fabricIndex = value; + [opCredsCluster removeFabricWithParams:params + completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error) { + if (error) { + NSLog(@"Failed to remove current fabric index %@ for device %llu. %@", + params.fabricIndex, deviceId, error); + return; + } + NSLog(@"Successfully unpaired deviceId %llu", deviceId); + }]; + }]; }); } @implementation CHIPToolPersistentStorageDelegate -// MARK: MTRStorage +// MARK: MTRPersistentStorageDelegate - (nullable NSData *)storageDataForKey:(NSString *)key { NSData * value = MTRGetDomainValueForKey(MTRToolDefaultsDomain, key); - NSLog(@"MTRStorage Get Value for Key: %@, value %@", key, value); + NSLog(@"MTRPersistentStorageDelegate Get Value for Key: %@, value %@", key, value); return value; } diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m index 6d08855a404b6b..b98e45ec0d8749 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m @@ -119,7 +119,7 @@ - (void)setupUI - (void)_clearTextFields { MTRDeviceController * chipController = InitializeMTR(); - _nodeIDTextField.text = [NSString stringWithFormat:@"%@", chipController.controllerNodeID]; + _nodeIDTextField.text = [NSString stringWithFormat:@"%@", chipController.controllerNodeId]; _endpointIDTextField.text = @"1"; _groupIDTextField.text = @"0"; _clusterIDTextField.text = @""; diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Enumeration/EnumerateViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Enumeration/EnumerateViewController.m index 881dc7b936da6d..8d6441fc078488 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Enumeration/EnumerateViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Enumeration/EnumerateViewController.m @@ -116,10 +116,10 @@ - (void)enumerate } MTRBaseClusterDescriptor * descriptorCluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device - endpoint:@(0) + endpoint:0 queue:dispatch_get_main_queue()]; NSLog(@"Reading parts list to get list of endpoints in use..."); - [descriptorCluster readAttributePartsListWithCompletion:^( + [descriptorCluster readAttributePartsListWithCompletionHandler:^( NSArray * _Nullable endpointsInUse, NSError * _Nullable error) { if (error) { NSString * resultLog = [[NSString alloc] initWithFormat:@"Unable to read parts list: Error: %@", error]; @@ -132,8 +132,10 @@ - (void)enumerate for (NSNumber * endpoint in endpointsInUse) { MTRBaseClusterDescriptor * descriptorCluster = - [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:endpoint queue:dispatch_get_main_queue()]; - [descriptorCluster readAttributeDeviceTypeListWithCompletion:^( + [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:[endpoint unsignedShortValue] + queue:dispatch_get_main_queue()]; + [descriptorCluster readAttributeDeviceListWithCompletionHandler:^( NSArray * _Nullable value, NSError * _Nullable error) { if (error) { NSString * resultLog = [[NSString alloc] @@ -146,7 +148,7 @@ - (void)enumerate [self updateResult:resultLog]; [descriptorCluster - readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + readAttributeServerListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { if (error) { NSString * resultLog = [[NSString alloc] initWithFormat:@"Unable to read server list for Endpoint:%@ Error: %@", endpoint, error]; diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m index 8aa6036e08523d..39f0f1a35977ee 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m @@ -221,17 +221,19 @@ - (void)fetchCommissionedFabricsNumber if (chipDevice) { MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:chipDevice - endpoint:@(0) + endpoint:0 queue:dispatch_get_main_queue()]; - [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - if (!error) { - self->_currentFabricIndex = value; - } - }]; - - [self updateResult:[NSString stringWithFormat:@"readAttributeCommissionedFabricsWithCompletion command sent."] - isError:NO]; - [cluster readAttributeCommissionedFabricsWithCompletion:^( + [cluster + readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + if (!error) { + self->_currentFabricIndex = value; + } + }]; + + [self + updateResult:[NSString stringWithFormat:@"readAttributeCommissionedFabricsWithCompletionHandler command sent."] + isError:NO]; + [cluster readAttributeCommissionedFabricsWithCompletionHandler:^( NSNumber * _Nullable commissionedFabrics, NSError * _Nullable error) { if (error) { dispatch_async(dispatch_get_main_queue(), ^{ @@ -268,32 +270,31 @@ - (void)fetchFabricsList if (chipDevice) { MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:chipDevice - endpoint:@(0) + endpoint:0 queue:dispatch_get_main_queue()]; [self updateResult:[NSString stringWithFormat:@"readAttributeFabrics command sent."] isError:NO]; MTRReadParams * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = NO; + params.fabricFiltered = @NO; [cluster readAttributeFabricsWithParams:params - completion:^(NSArray * _Nullable fabricsList, NSError * _Nullable error) { - if (error) { - dispatch_async(dispatch_get_main_queue(), ^{ - [self updateResult:[NSString - stringWithFormat: - @"readAttributeFabrics command failed: %@.", error] - isError:YES]; - }); - } else { - dispatch_async(dispatch_get_main_queue(), ^{ - [self updateResult:[NSString - stringWithFormat: - @"Command readAttributeFabrics command succeeded."] - isError:NO]; - }); - } - NSLog(@"Got back fabrics list: %@ error %@", fabricsList, error); - [self updateFabricsListUIWithFabrics:fabricsList error:error]; - }]; + completionHandler:^(NSArray * _Nullable fabricsList, NSError * _Nullable error) { + if (error) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self updateResult:[NSString + stringWithFormat:@"readAttributeFabrics command failed: %@.", + error] + isError:YES]; + }); + } else { + dispatch_async(dispatch_get_main_queue(), ^{ + [self updateResult:[NSString stringWithFormat: + @"Command readAttributeFabrics command succeeded."] + isError:NO]; + }); + } + NSLog(@"Got back fabrics list: %@ error %@", fabricsList, error); + [self updateFabricsListUIWithFabrics:fabricsList error:error]; + }]; } else { [self updateResult:[NSString stringWithFormat:@"Failed to establish a connection with the device"] isError:YES]; } @@ -331,7 +332,7 @@ - (IBAction)removeAllFabricsButtonPressed:(id)sender MTRBaseClusterOperationalCredentials * opCredsCluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:chipDevice - endpoint:@(0) + endpoint:0 queue:dispatch_get_main_queue()]; dispatch_group_t removeGroup = dispatch_group_create(); @@ -348,15 +349,13 @@ - (IBAction)removeAllFabricsButtonPressed:(id)sender dispatch_group_enter(removeGroup); [opCredsCluster removeFabricWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error) { - [self - updateResult:[NSString - stringWithFormat:@"Removed Fabric Index %@ with Error %@", - params.fabricIndex, error] - isError:error]; - dispatch_group_leave(removeGroup); - }]; + completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error) { + [self updateResult:[NSString stringWithFormat:@"Removed Fabric Index %@ with Error %@", + params.fabricIndex, error] + isError:error]; + dispatch_group_leave(removeGroup); + }]; } dispatch_group_notify(removeGroup, dispatch_get_main_queue(), ^{ // now we can remove ourselves @@ -365,16 +364,16 @@ - (IBAction)removeAllFabricsButtonPressed:(id)sender params.fabricIndex = self.currentFabricIndex; [opCredsCluster removeFabricWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error) { - if (!error) { - MTRSetDevicePaired(MTRGetLastPairedDeviceId(), NO); - } - [self updateResult:[NSString stringWithFormat: - @"Removed own Fabric Index %@ with Error %@", - params.fabricIndex, error] - isError:error]; - }]; + completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error) { + if (!error) { + MTRSetDevicePaired(MTRGetLastPairedDeviceId(), NO); + } + [self updateResult:[NSString + stringWithFormat:@"Removed own Fabric Index %@ with Error %@", + params.fabricIndex, error] + isError:error]; + }]; }); })) { [self updateResult:[NSString stringWithFormat:@"Waiting for connection with the device"] isError:NO]; @@ -405,7 +404,7 @@ - (IBAction)updateFabricLabelButtonPressed:(id)sender if (chipDevice) { MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:chipDevice - endpoint:@(0) + endpoint:0 queue:dispatch_get_main_queue()]; [self updateResult:[NSString stringWithFormat:@"updateFabricLabel command sent."] isError:NO]; __auto_type * params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; @@ -413,33 +412,34 @@ - (IBAction)updateFabricLabelButtonPressed:(id)sender [cluster updateFabricLabelWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable response, - NSError * _Nullable error) { - // TODO: UpdateFabricLabel can return errors - // via the NOCResponse response, but that - // seems like a spec bug that should be fixed - // in the spec. - if (error) { - NSLog(@"Error trying to updateFabricLabel %@", error); - dispatch_async(dispatch_get_main_queue(), ^{ - self->_updateFabricLabelTextField.text = @""; - [self updateResult:[NSString stringWithFormat: - @"Command updateFabricLabel failed with error %@", - error] - isError:YES]; - }); - } else { - NSLog(@"Successfully updated the label: %@", response); - dispatch_async(dispatch_get_main_queue(), ^{ - self->_updateFabricLabelTextField.text = @""; - [self updateResult:[NSString stringWithFormat:@"Command updateFabricLabel " - @"succeeded to update label to %@", - label] - isError:NO]; - [self fetchFabricsList]; - }); - } - }]; + completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable response, + NSError * _Nullable error) { + // TODO: UpdateFabricLabel can return errors + // via the NOCResponse response, but that + // seems like a spec bug that should be fixed + // in the spec. + if (error) { + NSLog(@"Error trying to updateFabricLabel %@", error); + dispatch_async(dispatch_get_main_queue(), ^{ + self->_updateFabricLabelTextField.text = @""; + [self updateResult:[NSString + stringWithFormat:@"Command updateFabricLabel failed with error %@", + error] + isError:YES]; + }); + } else { + NSLog(@"Successfully updated the label: %@", response); + dispatch_async(dispatch_get_main_queue(), ^{ + self->_updateFabricLabelTextField.text = @""; + [self updateResult:[NSString + stringWithFormat: + @"Command updateFabricLabel succeeded to update label to %@", + label] + isError:NO]; + [self fetchFabricsList]; + }); + } + }]; } else { [self updateResult:[NSString stringWithFormat:@"Failed to establish a connection with the device"] isError:YES]; } @@ -460,25 +460,24 @@ - (IBAction)removeFabricButtonPressed:(id)sender isError:NO]; MTRBaseClusterOperationalCredentials * opCredsCluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:chipDevice - endpoint:@(0) + endpoint:0 queue:dispatch_get_main_queue()]; MTROperationalCredentialsClusterRemoveFabricParams * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; params.fabricIndex = fabricIndex; [opCredsCluster removeFabricWithParams:params - completion:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - if (!error) { - if (fabricIndex == self.currentFabricIndex) { - MTRSetDevicePaired(MTRGetLastPairedDeviceId(), NO); - } - } - [self - updateResult:[NSString stringWithFormat:@"Finished removing fabric Index %@ with Error :%@", - fabricIndex, error] - isError:error]; - }]; + completionHandler:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + if (!error) { + if (fabricIndex == self.currentFabricIndex) { + MTRSetDevicePaired(MTRGetLastPairedDeviceId(), NO); + } + } + [self updateResult:[NSString stringWithFormat:@"Finished removing fabric Index %@ with Error :%@", + fabricIndex, error] + isError:error]; + }]; } else { [self updateResult:[NSString stringWithFormat:@"Failed to establish a connection with the device"] isError:YES]; } diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/MultiAdmin/MultiAdminViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/MultiAdmin/MultiAdminViewController.m index 276997846e65fb..1a4524faa0f481 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/MultiAdmin/MultiAdminViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/MultiAdmin/MultiAdminViewController.m @@ -199,6 +199,7 @@ - (IBAction)overrideControls:(id)sender - (IBAction)openPairingWindow:(id)sender { + NSUInteger setupPIN = [MTRSetupPayload generateRandomPIN]; [_deviceSelector forSelectedDevices:^(uint64_t deviceId) { if (MTRGetConnectedDeviceWithID(deviceId, ^(MTRBaseDevice * _Nullable chipDevice, NSError * _Nullable error) { if (chipDevice) { @@ -208,6 +209,9 @@ - (IBAction)openPairingWindow:(id)sender } int timeout = [timeoutStr intValue]; + NSString * output; + NSError * error; + MTRDeviceController * controller = InitializeMTR(); if ([self.useOnboardingTokenSwitch isOn]) { NSString * discriminatorStr = [self.discriminatorField text]; if (discriminatorStr.length == 0) { @@ -215,53 +219,26 @@ - (IBAction)openPairingWindow:(id)sender } NSInteger discriminator = [discriminatorStr intValue]; - __auto_type setupPasscode = [MTRSetupPayload generateRandomSetupPasscode]; - [chipDevice - openCommissioningWindowWithSetupPasscode:setupPasscode - discriminator:@(discriminator) - duration:@(timeout) - queue:dispatch_get_main_queue() - completion:^( - MTRSetupPayload * _Nullable payload, NSError * _Nullable error) { - NSString * _Nullable code = nil; - if (payload != nil) { - code = [payload manualEntryCode]; - } - - if (code != nil) { - NSString * result = - [@"Use Manual Code: " stringByAppendingString:code]; - [self updateResult:result]; - } else { - NSString * errorDesc; - if (error == nil) { - errorDesc = @"Failed to generate manual code"; - } else { - errorDesc = error.localizedDescription; - } - [self updateResult:[@"Failed in opening the pairing window" - stringByAppendingString:errorDesc]]; - } - }]; + output = [controller openPairingWindowWithPIN:deviceId + duration:timeout + discriminator:discriminator + setupPIN:setupPIN + error:&error]; + + if (output != nil) { + NSString * result = [@"Use Manual Code: " stringByAppendingString:output]; + [self updateResult:result]; + } else { + [self updateResult:@"Failed in opening the pairing window"]; + } } else { - __auto_type * cluster = - [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:chipDevice - endpoint:@(0) - queue:dispatch_get_main_queue()]; - __auto_type * params = - [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = @(timeout); - params.timedInvokeTimeoutMs = @(10000); - [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable error) { - if (error == nil) { - [self updateResult:@"Scan the QR code on the device"]; - } else { - NSString * errorString = [@"Error: " - stringByAppendingString:error.localizedDescription]; - [self updateResult:errorString]; - } - }]; + BOOL didSend = [controller openPairingWindow:deviceId duration:timeout error:&error]; + if (didSend) { + [self updateResult:@"Scan the QR code on the device"]; + } else { + NSString * errorString = [@"Error: " stringByAppendingString:error.localizedDescription]; + [self updateResult:errorString]; + } } } else { [self updateResult:[NSString stringWithFormat:@"Failed to establish a connection with the device"]]; diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/OnOffCluster/OnOffViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/OnOffCluster/OnOffViewController.m index 17065a90602be6..80aa3f22047eaa 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/OnOffCluster/OnOffViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/OnOffCluster/OnOffViewController.m @@ -240,9 +240,9 @@ - (IBAction)onButtonTapped:(id)sender if (MTRGetConnectedDeviceWithID(deviceId, ^(MTRBaseDevice * _Nullable chipDevice, NSError * _Nullable error) { if (chipDevice) { MTRBaseClusterOnOff * onOff = [[MTRBaseClusterOnOff alloc] initWithDevice:chipDevice - endpoint:@(endpoint) + endpoint:endpoint queue:dispatch_get_main_queue()]; - [onOff onWithCompletion:^(NSError * error) { + [onOff onWithCompletionHandler:^(NSError * error) { NSString * resultString = (error != nil) ? [NSString stringWithFormat:@"An error occurred: 0x%02lx", error.code] : @"On command success"; @@ -269,9 +269,9 @@ - (IBAction)offButtonTapped:(id)sender if (MTRGetConnectedDeviceWithID(deviceId, ^(MTRBaseDevice * _Nullable chipDevice, NSError * _Nullable error) { if (chipDevice) { MTRBaseClusterOnOff * onOff = [[MTRBaseClusterOnOff alloc] initWithDevice:chipDevice - endpoint:@(endpoint) + endpoint:endpoint queue:dispatch_get_main_queue()]; - [onOff offWithCompletion:^(NSError * error) { + [onOff offWithCompletionHandler:^(NSError * error) { NSString * resultString = (error != nil) ? [NSString stringWithFormat:@"An error occurred: 0x%02lx", error.code] : @"Off command success"; @@ -298,9 +298,9 @@ - (IBAction)toggleButtonTapped:(id)sender if (MTRGetConnectedDeviceWithID(deviceId, ^(MTRBaseDevice * _Nullable chipDevice, NSError * _Nullable error) { if (chipDevice) { MTRBaseClusterOnOff * onOff = [[MTRBaseClusterOnOff alloc] initWithDevice:chipDevice - endpoint:@(endpoint) + endpoint:endpoint queue:dispatch_get_main_queue()]; - [onOff toggleWithCompletion:^(NSError * error) { + [onOff toggleWithCompletionHandler:^(NSError * error) { NSString * resultString = (error != nil) ? [NSString stringWithFormat:@"An error occurred: 0x%02lx", error.code] : @"Toggle command success"; diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.h b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.h index 85a2f1f133f2f5..77d143c2c5a2bb 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.h +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.h @@ -21,6 +21,6 @@ #import @interface QRCodeViewController - : UIViewController + : UIViewController @end diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m index 7199f782d10bb4..e31e52b6bff618 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m @@ -419,7 +419,7 @@ - (void)viewDidLoad dispatch_queue_t callbackQueue = dispatch_queue_create("com.csa.matter.qrcodevc.callback", DISPATCH_QUEUE_SERIAL); self.chipController = InitializeMTR(); - [self.chipController setDeviceControllerDelegate:self queue:callbackQueue]; + [self.chipController setPairingDelegate:self queue:callbackQueue]; UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)]; [self.view addGestureRecognizer:tap]; @@ -489,8 +489,8 @@ - (void)setVendorIDOnAccessory } } -// MARK: MTRDeviceControllerDelegate -- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError * _Nullable)error +// MARK: MTRDevicePairingDelegate +- (void)onPairingComplete:(NSError * _Nullable)error { if (error != nil) { NSLog(@"Got pairing error back %@", error); @@ -506,9 +506,9 @@ - (void)controller:(MTRDeviceController *)controller commissioningSessionEstabli } else { MTRCommissioningParameters * params = [[MTRCommissioningParameters alloc] init]; params.deviceAttestationDelegate = [[CHIPToolDeviceAttestationDelegate alloc] initWithViewController:self]; - params.failSafeExpiryTimeout = @600; + params.failSafeExpiryTimeoutSecs = @600; NSError * error; - if (![controller commissionNodeWithID:@(deviceId) commissioningParams:params error:&error]) { + if (![controller commissionDevice:deviceId commissioningParams:params error:&error]) { NSLog(@"Failed to commission Device %llu, with error %@", deviceId, error); } } @@ -674,16 +674,16 @@ - (void)commissionWithSSID:(NSString *)ssid password:(NSString *)password params.wifiSSID = [ssid dataUsingEncoding:NSUTF8StringEncoding]; params.wifiCredentials = [password dataUsingEncoding:NSUTF8StringEncoding]; params.deviceAttestationDelegate = [[CHIPToolDeviceAttestationDelegate alloc] initWithViewController:self]; - params.failSafeExpiryTimeout = @600; + params.failSafeExpiryTimeoutSecs = @600; uint64_t deviceId = MTRGetNextAvailableDeviceID() - 1; - if (![controller commissionNodeWithID:@(deviceId) commissioningParams:params error:&error]) { + if (![controller commissionDevice:deviceId commissioningParams:params error:&error]) { NSLog(@"Failed to commission Device %llu, with error %@", deviceId, error); } } -- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError * _Nullable)error +- (void)onCommissioningComplete:(NSError * _Nullable)error { if (error != nil) { NSLog(@"Error retrieving device informations over Mdns: %@", error); @@ -706,10 +706,10 @@ - (void)updateUIFields:(MTRSetupPayload *)payload rawPayload:(nullable NSString } else { _manualCodeLabel.hidden = YES; _versionLabel.text = [NSString stringWithFormat:@"%@", payload.version]; - if (payload.discoveryCapabilities == MTRDiscoveryCapabilitiesUnknown) { + if (payload.rendezvousInformation == nil) { _rendezVousInformation.text = NOT_APPLICABLE_STRING; } else { - _rendezVousInformation.text = [NSString stringWithFormat:@"%lu", payload.discoveryCapabilities]; + _rendezVousInformation.text = [NSString stringWithFormat:@"%lu", [payload.rendezvousInformation unsignedLongValue]]; } if ([payload.serialNumber length] > 0) { self->_serialNumber.text = payload.serialNumber; @@ -719,7 +719,7 @@ - (void)updateUIFields:(MTRSetupPayload *)payload rawPayload:(nullable NSString } _discriminatorLabel.text = [NSString stringWithFormat:@"%@", payload.discriminator]; - _setupPinCodeLabel.text = [NSString stringWithFormat:@"%@", payload.setupPasscode]; + _setupPinCodeLabel.text = [NSString stringWithFormat:@"%@", payload.setUpPINCode]; // TODO: Only display vid and pid if present _vendorID.text = [NSString stringWithFormat:@"%@", payload.vendorID]; _productID.text = [NSString stringWithFormat:@"%@", payload.productID]; @@ -747,7 +747,7 @@ - (void)parseOptionalData:(MTRSetupPayload *)payload continue; } - BOOL isTypeString = (info.infoType == MTROptionalQRCodeInfoTypeString); + BOOL isTypeString = [info.infoType isEqualToNumber:[NSNumber numberWithInt:MTROptionalQRCodeInfoTypeString]]; if (!isTypeString) { return; } @@ -767,29 +767,26 @@ - (void)parseOptionalData:(MTRSetupPayload *)payload - (void)handleRendezVous:(MTRSetupPayload *)payload rawPayload:(NSString *)rawPayload { - if (payload.discoveryCapabilities == MTRDiscoveryCapabilitiesUnknown) { + if (payload.rendezvousInformation == nil) { NSLog(@"Rendezvous Default"); [self handleRendezVousDefault:rawPayload]; return; } - // Avoid SoftAP if we have other options. - if ((payload.discoveryCapabilities & MTRDiscoveryCapabilitiesOnNetwork) - || (payload.discoveryCapabilities & MTRDiscoveryCapabilitiesBLE)) { + // TODO: This is a pretty broken way to handle a bitmask. + switch ([payload.rendezvousInformation unsignedLongValue]) { + case MTRDiscoveryCapabilitiesNone: + case MTRDiscoveryCapabilitiesOnNetwork: + case MTRDiscoveryCapabilitiesBLE: + case MTRDiscoveryCapabilitiesAllMask: NSLog(@"Rendezvous Default"); [self handleRendezVousDefault:rawPayload]; - return; - } - - if (payload.discoveryCapabilities & MTRDiscoveryCapabilitiesSoftAP) { + break; + case MTRDiscoveryCapabilitiesSoftAP: NSLog(@"Rendezvous Wi-Fi"); [self handleRendezVousWiFi:[self getNetworkName:payload.discriminator]]; - return; + break; } - - // Just fall back on the default. - NSLog(@"Rendezvous Default"); - [self handleRendezVousDefault:rawPayload]; } - (NSString *)getNetworkName:(NSNumber *)discriminator @@ -803,7 +800,7 @@ - (void)_restartMatterStack { self.chipController = MTRRestartController(self.chipController); dispatch_queue_t callbackQueue = dispatch_queue_create("com.csa.matter.qrcodevc.callback", DISPATCH_QUEUE_SERIAL); - [self.chipController setDeviceControllerDelegate:self queue:callbackQueue]; + [self.chipController setPairingDelegate:self queue:callbackQueue]; } - (void)handleRendezVousDefault:(NSString *)payload @@ -814,18 +811,9 @@ - (void)handleRendezVousDefault:(NSString *)payload // restart the Matter Stack before pairing (for reliability + testing restarts) [self _restartMatterStack]; - __auto_type * setupPayload = [MTRSetupPayload setupPayloadWithOnboardingPayload:payload error:&error]; - if (setupPayload == nil) { - NSLog(@"Could not parse setup payload: %@", [error localizedDescription]); - return; - } - - ; - if ([self.chipController setupCommissioningSessionWithPayload:setupPayload newNodeID:@(deviceID) error:&error]) { + if ([self.chipController pairDevice:deviceID onboardingPayload:payload error:&error]) { deviceID++; MTRSetNextAvailableDeviceID(deviceID); - } else { - NSLog(@"Could not start commissioning session setup: %@", [error localizedDescription]); } } @@ -891,8 +879,9 @@ - (void)scannedQRCode:(NSString *)qrCode [self->_captureSession stopRunning]; [self->_session invalidateSession]; }); + MTRQRCodeSetupPayloadParser * parser = [[MTRQRCodeSetupPayloadParser alloc] initWithBase38Representation:qrCode]; NSError * error; - _setupPayload = [MTRSetupPayload setupPayloadWithOnboardingPayload:qrCode error:&error]; + _setupPayload = [parser populatePayload:&error]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ [self postScanningQRCodeState]; @@ -963,8 +952,9 @@ - (IBAction)enteredManualCode:(id)sender NSString * decimalString = _manualCodeTextField.text; [self manualCodeEnteredStartState]; + MTRManualSetupPayloadParser * parser = [[MTRManualSetupPayloadParser alloc] initWithDecimalStringRepresentation:decimalString]; NSError * error; - _setupPayload = [MTRSetupPayload setupPayloadWithOnboardingPayload:decimalString error:&error]; + _setupPayload = [parser populatePayload:&error]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, INDICATOR_DELAY), dispatch_get_main_queue(), ^{ [self displayManualCodeInSetupPayloadView:self->_setupPayload decimalString:decimalString withError:error]; }); @@ -1105,7 +1095,7 @@ - (instancetype)initWithViewController:(QRCodeViewController *)viewController return self; } -- (void)deviceAttestationFailedForController:(MTRDeviceController *)controller device:(void *)device error:(NSError * _Nonnull)error +- (void)deviceAttestation:(MTRDeviceController *)controller failedForDevice:(void *)device error:(NSError * _Nonnull)error { dispatch_async(dispatch_get_main_queue(), ^{ UIAlertController * alertController = [UIAlertController diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m index fe89ed71f7ed1e..6ee75f013459f0 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m @@ -192,10 +192,10 @@ - (void)readCurrentTemperature if (chipDevice) { MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:chipDevice - endpoint:@(1) + endpoint:1 queue:dispatch_get_main_queue()]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { if (error != nil) return; [self updateTempInUI:value.shortValue]; @@ -222,19 +222,19 @@ - (void)reportFromUserEnteredSettings if (MTRGetConnectedDevice(^(MTRBaseDevice * _Nullable chipDevice, NSError * _Nullable error) { if (chipDevice) { // Use a wildcard subscription - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalSeconds) - maxInterval:@(maxIntervalSeconds)]; [chipDevice subscribeWithQueue:dispatch_get_main_queue() - params:params - clusterStateCacheContainer:nil + minInterval:minIntervalSeconds + maxInterval:maxIntervalSeconds + params:nil + cacheContainer:nil attributeReportHandler:^(NSArray * _Nullable reports) { if (!reports) return; for (MTRAttributeReport * report in reports) { // These should be exposed by the SDK - if ([report.path.cluster isEqualToNumber:@(MTRClusterIDTypeTemperatureMeasurementID)] && + if ([report.path.cluster isEqualToNumber:@(MTRClusterTemperatureMeasurementID)] && [report.path.attribute - isEqualToNumber:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMeasuredValueID)]) { + isEqualToNumber:@(MTRClusterTemperatureMeasurementAttributeMeasuredValueID)]) { if (report.error != nil) { NSLog(@"Error reading temperature: %@", report.error); } else { diff --git a/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer+XPC.h b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer+XPC.h similarity index 81% rename from src/darwin/Framework/CHIP/MTRClusterStateCacheContainer+XPC.h rename to src/darwin/Framework/CHIP/MTRAttributeCacheContainer+XPC.h index 3252cd7a2f3a4c..9f7e8a1d21ebbc 100644 --- a/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer+XPC.h +++ b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer+XPC.h @@ -17,14 +17,14 @@ #import -#import "MTRClusterStateCacheContainer.h" +#import "MTRAttributeCacheContainer.h" NS_ASSUME_NONNULL_BEGIN -@interface MTRClusterStateCacheContainer (XPC) +@interface MTRAttributeCacheContainer (XPC) - (void)setXPCConnection:(MTRDeviceControllerXPCConnection *)xpcConnection - controllerID:(id)controllerID - deviceID:(NSNumber *)deviceID; + controllerId:(id)controllerId + deviceId:(uint64_t)deviceId; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.h b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.h new file mode 100644 index 00000000000000..31a09d5f4e4cd1 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.h @@ -0,0 +1,48 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class MTRSubscribeParams; + +@interface MTRAttributeCacheContainer : NSObject + +/** + * Reads an attribute with specific attribute path + * + * @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 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 CHIPDevice readAttributeWithEndpointId:clusterId:attributeId:clientQueue:completion method. + */ +- (void)readAttributeWithEndpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + clientQueue:(dispatch_queue_t)clientQueue + completion:(void (^)(NSArray *> * _Nullable values, + NSError * _Nullable error))completion; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer.mm b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.mm similarity index 55% rename from src/darwin/Framework/CHIP/MTRClusterStateCacheContainer.mm rename to src/darwin/Framework/CHIP/MTRAttributeCacheContainer.mm index ea8b53e0a31501..2ec0d10d4eac38 100644 --- a/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer.mm +++ b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.mm @@ -17,9 +17,9 @@ #import +#import "MTRAttributeCacheContainer_Internal.h" #import "MTRBaseDevice_Internal.h" #import "MTRCluster.h" -#import "MTRClusterStateCacheContainer_Internal.h" #import "MTRDeviceControllerXPCConnection.h" #import "MTRError.h" #import "MTRError_Internal.h" @@ -31,28 +31,28 @@ using namespace chip; -@implementation MTRClusterStateCacheContainer +@implementation MTRAttributeCacheContainer - (instancetype)init { if ([super init]) { - _cppClusterStateCache = nullptr; + _cppAttributeCache = nullptr; _shouldUseXPC = NO; } return self; } - (void)setXPCConnection:(MTRDeviceControllerXPCConnection *)xpcConnection - controllerID:(id)controllerID - deviceID:(NSNumber *)deviceID + controllerId:(id)controllerId + deviceId:(uint64_t)deviceId { self.xpcConnection = xpcConnection; - self.xpcControllerID = controllerID; - self.deviceID = deviceID; + self.xpcControllerId = controllerId; + self.deviceId = deviceId; self.shouldUseXPC = YES; } -static CHIP_ERROR AppendAttributeValueToArray( +static CHIP_ERROR AppendAttibuteValueToArray( const chip::app::ConcreteAttributePath & path, chip::app::ClusterStateCache * cache, NSMutableArray * array) { chip::TLV::TLVReader reader; @@ -78,14 +78,15 @@ static CHIP_ERROR AppendAttributeValueToArray( return err; } -- (void)readAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - queue:(dispatch_queue_t)queue - completion:(MTRDeviceResponseHandler)completion +- (void)readAttributeWithEndpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + clientQueue:(dispatch_queue_t)clientQueue + completion:(void (^)(NSArray *> * _Nullable values, + NSError * _Nullable error))completion { __auto_type completionHandler = ^(NSArray *> * _Nullable values, NSError * _Nullable error) { - dispatch_async(queue, ^{ + dispatch_async(clientQueue, ^{ completion(values, error); }); }; @@ -97,37 +98,37 @@ - (void)readAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); return; } - __auto_type controllerId = self.xpcControllerID; - NSNumber * nodeId = self.deviceID; - [xpcConnection getProxyHandleWithCompletion:^( - dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { - if (handle) { - [handle.proxy readClusterStateCacheWithController:controllerId - nodeID:nodeId - endpointID:endpointID - clusterID:clusterID - attributeID:attributeID - completion:^(id _Nullable values, NSError * _Nullable error) { - completion([MTRDeviceController decodeXPCResponseValues:values], error); - __auto_type handleRetainer = handle; - (void) handleRetainer; - }]; - } else { - MTR_LOG_ERROR("Attribute cache read failed due to XPC connection failure"); - completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); - } - }]; + __auto_type controllerId = self.xpcControllerId; + uint64_t nodeId = self.deviceId; + [xpcConnection + getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + if (handle) { + [handle.proxy readAttributeCacheWithController:controllerId + nodeId:nodeId + endpointId:endpointId + clusterId:clusterId + attributeId:attributeId + completion:^(id _Nullable values, NSError * _Nullable error) { + completion([MTRDeviceController decodeXPCResponseValues:values], error); + __auto_type handleRetainer = handle; + (void) handleRetainer; + }]; + } else { + MTR_LOG_ERROR("Attribute cache read failed due to XPC connection failure"); + completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + } + }]; return; } dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ - if (endpointID == nil && clusterID == nil) { + if (endpointId == nil && clusterId == nil) { MTR_LOG_ERROR("Error: currently read from attribute cache does not support wildcards for both endpoint and cluster"); completionHandler(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeInvalidArgument userInfo:nil]); return; } - if (!self.cppClusterStateCache) { + if (!self.cppAttributeCache) { MTR_LOG_ERROR("Error: No attribute cache available to read from"); completionHandler(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); return; @@ -135,41 +136,40 @@ - (void)readAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID NSMutableArray * result = [[NSMutableArray alloc] init]; CHIP_ERROR err = CHIP_NO_ERROR; - if (endpointID == nil) { - err = self.cppClusterStateCache->ForEachAttribute( - static_cast([clusterID unsignedLongValue]), [&](const app::ConcreteAttributePath & path) { - if (attributeID == nil - || static_cast([attributeID unsignedLongValue]) == path.mAttributeId) { - (void) AppendAttributeValueToArray(path, self.cppClusterStateCache, result); + if (endpointId == nil) { + err = self.cppAttributeCache->ForEachAttribute( + static_cast([clusterId unsignedLongValue]), [&](const app::ConcreteAttributePath & path) { + if (attributeId == nil + || static_cast([attributeId unsignedLongValue]) == path.mAttributeId) { + (void) AppendAttibuteValueToArray(path, self.cppAttributeCache, result); } return CHIP_NO_ERROR; }); - } else if (clusterID == nil) { - err = self.cppClusterStateCache->ForEachCluster( - static_cast([endpointID unsignedShortValue]), [&](chip::ClusterId enumeratedClusterId) { - (void) self.cppClusterStateCache->ForEachAttribute( - static_cast([endpointID unsignedShortValue]), enumeratedClusterId, - [&](const app::ConcreteAttributePath & path) { - if (attributeID == nil - || static_cast([attributeID unsignedLongValue]) == path.mAttributeId) { - (void) AppendAttributeValueToArray(path, self.cppClusterStateCache, result); + } else if (clusterId == nil) { + err = self.cppAttributeCache->ForEachCluster( + static_cast([endpointId unsignedShortValue]), [&](chip::ClusterId enumeratedClusterId) { + (void) self.cppAttributeCache->ForEachAttribute(static_cast([endpointId unsignedShortValue]), + enumeratedClusterId, [&](const app::ConcreteAttributePath & path) { + if (attributeId == nil + || static_cast([attributeId unsignedLongValue]) == path.mAttributeId) { + (void) AppendAttibuteValueToArray(path, self.cppAttributeCache, result); } return CHIP_NO_ERROR; }); return CHIP_NO_ERROR; }); - } else if (attributeID == nil) { - err = self.cppClusterStateCache->ForEachAttribute(static_cast([endpointID unsignedShortValue]), - static_cast([clusterID unsignedLongValue]), [&](const app::ConcreteAttributePath & path) { - (void) AppendAttributeValueToArray(path, self.cppClusterStateCache, result); + } else if (attributeId == nil) { + err = self.cppAttributeCache->ForEachAttribute(static_cast([endpointId unsignedShortValue]), + static_cast([clusterId unsignedLongValue]), [&](const app::ConcreteAttributePath & path) { + (void) AppendAttibuteValueToArray(path, self.cppAttributeCache, result); return CHIP_NO_ERROR; }); } else { app::ConcreteAttributePath path; - path.mEndpointId = static_cast([endpointID unsignedShortValue]); - path.mClusterId = static_cast([clusterID unsignedLongValue]); - path.mAttributeId = static_cast([attributeID unsignedLongValue]); - err = AppendAttributeValueToArray(path, self.cppClusterStateCache, result); + path.mEndpointId = static_cast([endpointId unsignedShortValue]); + path.mClusterId = static_cast([clusterId unsignedLongValue]); + path.mAttributeId = static_cast([attributeId unsignedLongValue]); + err = AppendAttibuteValueToArray(path, self.cppAttributeCache, result); } if (err == CHIP_NO_ERROR) { completionHandler(result, nil); diff --git a/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer_Internal.h b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer_Internal.h similarity index 84% rename from src/darwin/Framework/CHIP/MTRClusterStateCacheContainer_Internal.h rename to src/darwin/Framework/CHIP/MTRAttributeCacheContainer_Internal.h index 134040d42cf5f5..1ab45bc0778682 100644 --- a/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer_Internal.h +++ b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer_Internal.h @@ -17,19 +17,19 @@ #import -#import "MTRClusterStateCacheContainer.h" +#import "MTRAttributeCacheContainer.h" #import "MTRDeviceControllerOverXPC.h" #include NS_ASSUME_NONNULL_BEGIN -@interface MTRClusterStateCacheContainer () +@interface MTRAttributeCacheContainer () -@property (atomic, readwrite, nullable) chip::app::ClusterStateCache * cppClusterStateCache; -@property (nonatomic, readwrite, copy) NSNumber * deviceID; +@property (atomic, readwrite, nullable) chip::app::ClusterStateCache * cppAttributeCache; +@property (nonatomic, readwrite) uint64_t deviceId; @property (nonatomic, readwrite, weak, nullable) MTRDeviceControllerXPCConnection * xpcConnection; -@property (nonatomic, readwrite, strong, nullable) id xpcControllerID; +@property (nonatomic, readwrite, strong, nullable) id xpcControllerId; @property (atomic, readwrite) BOOL shouldUseXPC; @end diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.h b/src/darwin/Framework/CHIP/MTRBaseDevice.h index 66b851e0b97280..2c98ab9e968777 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.h @@ -17,8 +17,6 @@ #import -#import - @class MTRSetupPayload; NS_ASSUME_NONNULL_BEGIN @@ -92,7 +90,7 @@ typedef void (^MTRDeviceErrorHandler)(NSError * error); typedef void (^MTRDeviceResubscriptionScheduledHandler)(NSError * error, NSNumber * resubscriptionDelay); /** - * Handler for openCommissioningWindow. + * Handler for openCommissioningWindowWithSetupPasscode. */ typedef void (^MTRDeviceOpenCommissioningWindowHandler)(MTRSetupPayload * _Nullable payload, NSError * _Nullable error); @@ -115,24 +113,15 @@ extern NSString * const MTRNullValueType; extern NSString * const MTRStructureValueType; extern NSString * const MTRArrayValueType; -@class MTRClusterStateCacheContainer; +@class MTRAttributeCacheContainer; @class MTRReadParams; @class MTRSubscribeParams; -@class MTRDeviceController; @interface MTRBaseDevice : NSObject - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; -/** - * Create a device object with the given node id and controller. This - * will always succeed, even if there is no such node id on the controller's - * fabric, but attempts to actually use the MTRBaseDevice will fail - * (asynchronously) in that case. - */ -+ (instancetype)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller; - /** * Subscribe to receive attribute reports for everything (all endpoints, all * clusters, all attributes, all events) on the device. @@ -173,30 +162,25 @@ extern NSString * const MTRArrayValueType; * attempts fail. */ - (void)subscribeWithQueue:(dispatch_queue_t)queue - params:(MTRSubscribeParams *)params - clusterStateCacheContainer:(MTRClusterStateCacheContainer * _Nullable)clusterStateCacheContainer - attributeReportHandler:(MTRDeviceReportHandler _Nullable)attributeReportHandler - eventReportHandler:(MTRDeviceReportHandler _Nullable)eventReportHandler - errorHandler:(MTRDeviceErrorHandler)errorHandler - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduled; + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + params:(MTRSubscribeParams * _Nullable)params + cacheContainer:(MTRAttributeCacheContainer * _Nullable)attributeCacheContainer + attributeReportHandler:(MTRDeviceReportHandler _Nullable)attributeReportHandler + eventReportHandler:(MTRDeviceReportHandler _Nullable)eventReportHandler + errorHandler:(MTRDeviceErrorHandler)errorHandler + subscriptionEstablished:(dispatch_block_t _Nullable)subscriptionEstablishedHandler + resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduledHandler; /** - * Reads the given attribute path from the device. - * - * nil values for endpointID, clusterID, attributeID indicate wildcards - * (e.g. nil attributeID means "read all the attributes from the endpoint(s) and - * cluster(s) that match endpointID/clusterID"). - * - * A non-nil attributeID along with a nil clusterID will only succeed if the - * attribute ID is for a global attribute that applies to all clusters. + * Read attribute in a designated attribute path */ -- (void)readAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - params:(MTRReadParams * _Nullable)params - queue:(dispatch_queue_t)queue - completion:(MTRDeviceResponseHandler)completion; +- (void)readAttributeWithEndpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + params:(MTRReadParams * _Nullable)params + clientQueue:(dispatch_queue_t)clientQueue + completion:(MTRDeviceResponseHandler)completion; /** * Write to attribute in a designated attribute path @@ -208,15 +192,15 @@ extern NSString * const MTRArrayValueType; * * @param completion response handler will receive either values or error. * - * Received values are documented in the definition of - * MTRDeviceResponseHandler. + * Received values are an NSArray object with response-value element as described in + * readAttributeWithEndpointId:clusterId:attributeId:clientQueue:completion:. */ -- (void)writeAttributeWithEndpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - attributeID:(NSNumber *)attributeID +- (void)writeAttributeWithEndpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + attributeId:(NSNumber *)attributeId value:(id)value timedWriteTimeout:(NSNumber * _Nullable)timeoutMs - queue:(dispatch_queue_t)queue + clientQueue:(dispatch_queue_t)clientQueue completion:(MTRDeviceResponseHandler)completion; /** @@ -231,31 +215,26 @@ extern NSString * const MTRArrayValueType; * * @param completion response handler will receive either values or error. */ -- (void)invokeCommandWithEndpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - commandID:(NSNumber *)commandID +- (void)invokeCommandWithEndpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + commandId:(NSNumber *)commandId commandFields:(id)commandFields timedInvokeTimeout:(NSNumber * _Nullable)timeoutMs - queue:(dispatch_queue_t)queue + clientQueue:(dispatch_queue_t)clientQueue completion:(MTRDeviceResponseHandler)completion; /** - * Subscribes to the given attribute path on the device. - * - * nil values for endpointID, clusterID, attributeID indicate wildcards - * (e.g. nil attributeID means "read all the attributes from the endpoint(s) and - * cluster(s) that match endpointID/clusterID"). - * - * A non-nil attributeID along with a nil clusterID will only succeed if the - * attribute ID is for a global attribute that applies to all clusters. + * Subscribe an attribute in a designated attribute path */ -- (void)subscribeAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - params:(MTRSubscribeParams *)params - queue:(dispatch_queue_t)queue - reportHandler:(MTRDeviceResponseHandler)reportHandler - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished; +- (void)subscribeAttributeWithEndpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + minInterval:(NSNumber *)minInterval + maxInterval:(NSNumber *)maxInterval + params:(MTRSubscribeParams * _Nullable)params + clientQueue:(dispatch_queue_t)clientQueue + reportHandler:(MTRDeviceResponseHandler)reportHandler + subscriptionEstablished:(nullable void (^)(void))subscriptionEstablishedHandler; /** * Deregister all local report handlers for a remote device @@ -264,12 +243,12 @@ 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)deregisterReportHandlersWithQueue:(dispatch_queue_t)queue completion:(dispatch_block_t)completion; +- (void)deregisterReportHandlersWithClientQueue:(dispatch_queue_t)clientQueue completion:(void (^)(void))completion; /** * Open a commissioning window on the device. * - * On success, completion will be called with the MTRSetupPayload that + * On success, completion will be called on queue with the MTRSetupPayload that * can be used to commission the device. * * @param setupPasscode The setup passcode to use for the commissioning window. @@ -288,84 +267,61 @@ extern NSString * const MTRArrayValueType; @end -/** - * A path indicating a specific cluster on a device (i.e. without any - * wildcards). - */ -@interface MTRClusterPath : NSObject -@property (nonatomic, readonly, copy) NSNumber * endpoint; -@property (nonatomic, readonly, copy) NSNumber * cluster; +@interface MTRAttributePath : NSObject +@property (nonatomic, readonly, strong, nonnull) NSNumber * endpoint; +@property (nonatomic, readonly, strong, nonnull) NSNumber * cluster; +@property (nonatomic, readonly, strong, nonnull) NSNumber * attribute; -+ (instancetype)clusterPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID; ++ (instancetype)attributePathWithEndpointId:(NSNumber *)endpoint + clusterId:(NSNumber *)clusterId + attributeId:(NSNumber *)attributeId; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @end -/** - * A path indicating a specific attribute on a device (i.e. without any - * wildcards). - */ -@interface MTRAttributePath : MTRClusterPath -@property (nonatomic, readonly, copy) NSNumber * attribute; - -+ (instancetype)attributePathWithEndpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - attributeID:(NSNumber *)attributeID; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; -@end +@interface MTREventPath : NSObject +@property (nonatomic, readonly, strong, nonnull) NSNumber * endpoint; +@property (nonatomic, readonly, strong, nonnull) NSNumber * cluster; +@property (nonatomic, readonly, strong, nonnull) NSNumber * event; -/** - * A path indicating a specific event that can be emitted on a device - * (i.e. without any wildcards). There can be multiple instances of actual - * events for a given event path. - */ -@interface MTREventPath : MTRClusterPath -@property (nonatomic, readonly, copy) NSNumber * event; - -+ (instancetype)eventPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID eventID:(NSNumber *)eventID; ++ (instancetype)eventPathWithEndpointId:(NSNumber *)endpoint clusterId:(NSNumber *)clusterId eventId:(NSNumber *)eventId; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @end -/** - * A path indicating a specific command on a device (i.e. without any - * wildcards). - */ -@interface MTRCommandPath : MTRClusterPath -@property (nonatomic, readonly, copy) NSNumber * command; +@interface MTRCommandPath : NSObject +@property (nonatomic, readonly, strong, nonnull) NSNumber * endpoint; +@property (nonatomic, readonly, strong, nonnull) NSNumber * cluster; +@property (nonatomic, readonly, strong, nonnull) NSNumber * command; -+ (instancetype)commandPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID commandID:(NSNumber *)commandID; ++ (instancetype)commandPathWithEndpointId:(NSNumber *)endpoint clusterId:(NSNumber *)clusterId commandId:(NSNumber *)commandId; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @end @interface MTRAttributeReport : NSObject -@property (nonatomic, readonly, copy) MTRAttributePath * path; +@property (nonatomic, readonly, strong, nonnull) MTRAttributePath * path; // value is nullable because nullable attributes can have nil as value. -@property (nonatomic, readonly, copy, nullable) id value; +@property (nonatomic, readonly, strong, nullable) id value; // If this specific path resulted in an error, the error (in the // MTRInteractionErrorDomain or MTRErrorDomain) that corresponds to this // path. -@property (nonatomic, readonly, copy, nullable) NSError * error; +@property (nonatomic, readonly, strong, nullable) NSError * error; @end @interface MTREventReport : NSObject -@property (nonatomic, readonly, copy) MTREventPath * path; -@property (nonatomic, readonly, copy) NSNumber * eventNumber; // EventNumber type (uint64_t) -@property (nonatomic, readonly, copy) NSNumber * priority; // PriorityLevel type (uint8_t) -@property (nonatomic, readonly, copy) NSNumber * timestamp; // Timestamp type (uint64_t) -// An instance of one of the event payload interfaces. -@property (nonatomic, readonly, copy) id value; - +@property (nonatomic, readonly, strong, nonnull) MTREventPath * path; +@property (nonatomic, readonly, strong, nonnull) NSNumber * eventNumber; // chip::EventNumber type (uint64_t) +@property (nonatomic, readonly, strong, nonnull) NSNumber * priority; // chip::app::PriorityLevel type (uint8_t) +@property (nonatomic, readonly, strong, nonnull) NSNumber * timestamp; // chip::app::Timestamp.mValue type (uint64_t) +@property (nonatomic, readonly, strong, nullable) id value; // If this specific path resulted in an error, the error (in the // MTRInteractionErrorDomain or MTRErrorDomain) that corresponds to this // path. -@property (nonatomic, readonly, copy, nullable) NSError * error; +@property (nonatomic, readonly, strong, nullable) NSError * error; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index 18952f0efc690d..0a2a0083d0f34f 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -15,12 +15,12 @@ * limitations under the License. */ +#import "MTRAttributeCacheContainer_Internal.h" #import "MTRAttributeTLVValueDecoder_Internal.h" #import "MTRBaseDevice_Internal.h" #import "MTRBaseSubscriptionCallback.h" #import "MTRCallbackBridgeBase_internal.h" #import "MTRCluster.h" -#import "MTRClusterStateCacheContainer_Internal.h" #import "MTRError_Internal.h" #import "MTREventTLVValueDecoder_Internal.h" #import "MTRLogging.h" @@ -77,7 +77,7 @@ @interface MTRReadClientContainer : NSObject @property (nonatomic, readwrite) app::ReadClient * readClientPtr; @property (nonatomic, readwrite) app::AttributePathParams * pathParams; -@property (nonatomic, readwrite) uint64_t deviceID; +@property (nonatomic, readwrite) uint64_t deviceId; - (void)onDone; @end @@ -193,7 +193,7 @@ - (void)onDone Platform::Delete(_pathParams); _pathParams = nullptr; } - PurgeCompletedReadClientContainers(_deviceID); + PurgeCompletedReadClientContainers(_deviceId); } - (void)dealloc @@ -221,23 +221,16 @@ - (instancetype)initWithPASEDevice:(chip::DeviceProxy *)device controller:(MTRDe return self; } -- (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller +- (instancetype)initWithNodeID:(chip::NodeId)nodeID controller:(MTRDeviceController *)controller { if (self = [super init]) { _isPASEDevice = NO; - _nodeID = [nodeID unsignedLongLongValue]; + _nodeID = nodeID; _deviceController = controller; } return self; } -+ (instancetype)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller -{ - // Indirect through the controller to give it a chance to create an - // MTRBaseDeviceOverXPC instead of just an MTRBaseDevice. - return [controller baseDeviceForNodeID:nodeID]; -} - - (void)invalidateCASESession { if (self.isPASEDevice) { @@ -253,7 +246,7 @@ - (void)invalidateCASESession public: SubscriptionCallback(DataReportCallback attributeReportCallback, DataReportCallback eventReportCallback, ErrorCallback errorCallback, MTRDeviceResubscriptionScheduledHandler _Nullable resubscriptionScheduledHandler, - MTRSubscriptionEstablishedHandler _Nullable subscriptionEstablishedHandler, OnDoneHandler _Nullable onDoneHandler) + SubscriptionEstablishedHandler _Nullable subscriptionEstablishedHandler, OnDoneHandler _Nullable onDoneHandler) : MTRBaseSubscriptionCallback(attributeReportCallback, eventReportCallback, errorCallback, resubscriptionScheduledHandler, subscriptionEstablishedHandler, onDoneHandler) { @@ -267,13 +260,15 @@ - (void)invalidateCASESession } // anonymous namespace - (void)subscribeWithQueue:(dispatch_queue_t)queue - params:(MTRSubscribeParams *)params - clusterStateCacheContainer:(MTRClusterStateCacheContainer * _Nullable)clusterStateCacheContainer - attributeReportHandler:(MTRDeviceReportHandler _Nullable)attributeReportHandler - eventReportHandler:(MTRDeviceReportHandler _Nullable)eventReportHandler - errorHandler:(void (^)(NSError * error))errorHandler - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduled + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + params:(nullable MTRSubscribeParams *)params + cacheContainer:(MTRAttributeCacheContainer * _Nullable)attributeCacheContainer + attributeReportHandler:(nullable void (^)(NSArray * value))attributeReportHandler + eventReportHandler:(nullable void (^)(NSArray * value))eventReportHandler + errorHandler:(void (^)(NSError * error))errorHandler + subscriptionEstablished:(nullable void (^)(void))subscriptionEstablishedHandler + resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduledHandler { if (self.isPASEDevice) { // We don't support subscriptions over PASE. @@ -287,119 +282,117 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue params = [params copy]; [self.deviceController getSessionForNode:self.nodeID - 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(); - ReadPrepareParams readParams(session.Value()); - readParams.mMinIntervalFloorSeconds = [params.minInterval unsignedShortValue]; - readParams.mMaxIntervalCeilingSeconds = [params.maxInterval unsignedShortValue]; - readParams.mpAttributePathParamsList = attributePath.get(); - readParams.mAttributePathParamsListSize = 1; - readParams.mpEventPathParamsList = eventPath.get(); - readParams.mEventPathParamsListSize = 1; - readParams.mIsFabricFiltered = params.fabricFiltered; - readParams.mKeepSubscriptions = params.keepPreviousSubscriptions; - - std::unique_ptr clusterStateCache; - ReadClient::Callback * callbackForReadClient = nullptr; - OnDoneHandler onDoneHandler = nil; - - if (clusterStateCacheContainer) { - __weak MTRClusterStateCacheContainer * weakPtr = clusterStateCacheContainer; - onDoneHandler = ^{ - // This, like all manipulation of cppClusterStateCache, needs to run on the Matter - // queue. - MTRClusterStateCacheContainer * container = weakPtr; - if (container) { - container.cppClusterStateCache = 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 (clusterStateCacheContainer) { - clusterStateCache = std::make_unique(*callback.get()); - callbackForReadClient = &clusterStateCache->GetBufferedCallback(); - } else { - callbackForReadClient = &callback->GetBufferedCallback(); - } - - auto readClient = std::make_unique(InteractionModelEngine::GetInstance(), - exchangeManager, *callbackForReadClient, ReadClient::InteractionType::Subscribe); - - CHIP_ERROR err; - if (!params.autoResubscribe) { - 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 (clusterStateCacheContainer) { - clusterStateCacheContainer.cppClusterStateCache = clusterStateCache.get(); - // ClusterStateCache will be deleted when OnDone is called or an error is encountered as - // well. - callback->AdoptClusterStateCache(std::move(clusterStateCache)); - } - // Callback and ReadClient will be deleted when OnDone is called or an error is - // encountered. - callback->AdoptReadClient(std::move(readClient)); - callback.release(); - }]; + 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(); + 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 = [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(); + }]; } // Convert TLV data into data-value dictionary as described in MTRDeviceResponseHandler @@ -778,18 +771,18 @@ void OnDeallocatePaths(chip::app::ReadPrepareParams && aReadPrepareParams) overr Platform::UniquePtr mReadClient; }; -- (void)readAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - params:(MTRReadParams * _Nullable)params - queue:(dispatch_queue_t)queue - completion:(MTRDeviceResponseHandler)completion +- (void)readAttributeWithEndpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + attributeId:(NSNumber *)attributeId + params:(MTRReadParams * _Nullable)params + clientQueue:(dispatch_queue_t)clientQueue + completion:(MTRDeviceResponseHandler)completion { - endpointID = (endpointID == nil) ? nil : [endpointID copy]; - clusterID = (clusterID == nil) ? nil : [clusterID copy]; - attributeID = (attributeID == nil) ? nil : [attributeID copy]; + 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(queue, self, completion, + new MTRDataValueDictionaryCallbackBridge(clientQueue, self, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure) { auto successFn = chip::Callback::Callback::FromCancelable(success); @@ -823,14 +816,14 @@ new MTRDataValueDictionaryCallbackBridge(queue, self, completion, }; app::AttributePathParams attributePath; - if (endpointID) { - attributePath.mEndpointId = static_cast([endpointID unsignedShortValue]); + if (endpointId) { + attributePath.mEndpointId = static_cast([endpointId unsignedShortValue]); } - if (clusterID) { - attributePath.mClusterId = static_cast([clusterID unsignedLongValue]); + if (clusterId) { + attributePath.mClusterId = static_cast([clusterId unsignedLongValue]); } - if (attributeID) { - attributePath.mAttributeId = static_cast([attributeID unsignedLongValue]); + if (attributeId) { + attributePath.mAttributeId = static_cast([attributeId unsignedLongValue]); } app::InteractionModelEngine * engine = app::InteractionModelEngine::GetInstance(); CHIP_ERROR err = CHIP_NO_ERROR; @@ -838,7 +831,7 @@ new MTRDataValueDictionaryCallbackBridge(queue, self, completion, chip::app::ReadPrepareParams readParams(session); readParams.mpAttributePathParamsList = &attributePath; readParams.mAttributePathParamsListSize = 1; - readParams.mIsFabricFiltered = params.fabricFiltered; + readParams.mIsFabricFiltered = params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]; auto onDone = [resultArray, resultSuccess, resultFailure, context, successCb, failureCb]( BufferedReadAttributeCallback * callback) { @@ -887,15 +880,15 @@ new MTRDataValueDictionaryCallbackBridge(queue, self, completion, }); } -- (void)writeAttributeWithEndpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - attributeID:(NSNumber *)attributeID +- (void)writeAttributeWithEndpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + attributeId:(NSNumber *)attributeId value:(id)value timedWriteTimeout:(NSNumber * _Nullable)timeoutMs - queue:(dispatch_queue_t)queue + clientQueue:(dispatch_queue_t)clientQueue completion:(MTRDeviceResponseHandler)completion { - new MTRDataValueDictionaryCallbackBridge(queue, self, completion, + new MTRDataValueDictionaryCallbackBridge(clientQueue, self, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure) { auto successFn = chip::Callback::Callback::FromCancelable(success); @@ -948,9 +941,9 @@ new MTRDataValueDictionaryCallbackBridge(queue, self, completion, }; return chip::Controller::WriteAttribute(session, - static_cast([endpointID unsignedShortValue]), - static_cast([clusterID unsignedLongValue]), - static_cast([attributeID unsignedLongValue]), MTRDataValueDictionaryDecodableType(value), + static_cast([endpointId unsignedShortValue]), + static_cast([clusterId unsignedLongValue]), + static_cast([attributeId unsignedLongValue]), MTRDataValueDictionaryDecodableType(value), onSuccessCb, onFailureCb, (timeoutMs == nil) ? NullOptional : Optional([timeoutMs unsignedShortValue]), onDoneCb, NullOptional); }); @@ -1027,23 +1020,23 @@ void OnResponse(app::CommandSender * apCommandSender, const app::ConcreteCommand } } -- (void)invokeCommandWithEndpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - commandID:(NSNumber *)commandID +- (void)invokeCommandWithEndpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + commandId:(NSNumber *)commandId commandFields:(id)commandFields timedInvokeTimeout:(NSNumber * _Nullable)timeoutMs - queue:(dispatch_queue_t)queue + clientQueue:(dispatch_queue_t)clientQueue completion:(MTRDeviceResponseHandler)completion { - endpointID = (endpointID == nil) ? nil : [endpointID copy]; - clusterID = (clusterID == nil) ? nil : [clusterID copy]; - commandID = (commandID == nil) ? nil : [commandID copy]; + endpointId = (endpointId == nil) ? nil : [endpointId copy]; + clusterId = (clusterId == nil) ? nil : [clusterId copy]; + commandId = (commandId == nil) ? nil : [commandId copy]; // TODO: This is not going to deep-copy the NSArray instances in // commandFields. We need to do something smarter here. commandFields = (commandFields == nil) ? nil : [commandFields copy]; timeoutMs = (timeoutMs == nil) ? nil : [timeoutMs copy]; - new MTRDataValueDictionaryCallbackBridge(queue, self, completion, + new MTRDataValueDictionaryCallbackBridge(clientQueue, self, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure) { auto successFn = chip::Callback::Callback::FromCancelable(success); @@ -1075,9 +1068,9 @@ new MTRDataValueDictionaryCallbackBridge(queue, self, completion, } }; - app::CommandPathParams commandPath = { static_cast([endpointID unsignedShortValue]), 0, - static_cast([clusterID unsignedLongValue]), - static_cast([commandID unsignedLongValue]), (app::CommandPathFlags::kEndpointIdValid) }; + app::CommandPathParams commandPath = { static_cast([endpointId unsignedShortValue]), 0, + static_cast([clusterId unsignedLongValue]), + static_cast([commandId unsignedLongValue]), (app::CommandPathFlags::kEndpointIdValid) }; auto decoder = chip::Platform::MakeUnique( commandPath.mClusterId, commandPath.mCommandId, onSuccessCb, onFailureCb); @@ -1121,148 +1114,151 @@ new MTRDataValueDictionaryCallbackBridge(queue, self, completion, }); } -- (void)subscribeAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - params:(MTRSubscribeParams *)params - queue:(dispatch_queue_t)queue - reportHandler:(MTRDeviceResponseHandler)reportHandler - subscriptionEstablished:(MTRSubscriptionEstablishedHandler)subscriptionEstablished +- (void)subscribeAttributeWithEndpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + minInterval:(NSNumber *)minInterval + maxInterval:(NSNumber *)maxInterval + params:(MTRSubscribeParams * _Nullable)params + clientQueue:(dispatch_queue_t)clientQueue + reportHandler:(MTRDeviceResponseHandler)reportHandler + subscriptionEstablished:(SubscriptionEstablishedHandler)subscriptionEstablishedHandler { if (self.isPASEDevice) { // We don't support subscriptions over PASE. - dispatch_async(queue, ^{ + dispatch_async(clientQueue, ^{ reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]); }); return; } // Copy params before going async. - endpointID = (endpointID == nil) ? nil : [endpointID copy]; - clusterID = (clusterID == nil) ? nil : [clusterID copy]; - attributeID = (attributeID == nil) ? nil : [attributeID copy]; + endpointId = (endpointId == nil) ? nil : [endpointId copy]; + clusterId = (clusterId == nil) ? nil : [clusterId copy]; + attributeId = (attributeId == nil) ? nil : [attributeId copy]; + minInterval = (minInterval == nil) ? nil : [minInterval copy]; + maxInterval = (maxInterval == nil) ? nil : [maxInterval copy]; params = (params == nil) ? nil : [params copy]; [self.deviceController getSessionForNode:self.nodeID - 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([params.minInterval unsignedShortValue]); - readParams.mMaxIntervalCeilingSeconds = static_cast([params.maxInterval unsignedShortValue]); - readParams.mIsFabricFiltered = params.fabricFiltered; - readParams.mKeepSubscriptions = params.keepPreviousSubscriptions; - - 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.autoResubscribe) { - 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(); - }]; + 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(); + }]; } -- (void)deregisterReportHandlersWithQueue:(dispatch_queue_t)queue completion:(dispatch_block_t)completion +- (void)deregisterReportHandlersWithClientQueue:(dispatch_queue_t)clientQueue completion:(void (^)(void))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, queue, completion); + PurgeReadClientContainers(self.nodeID, clientQueue, completion); } namespace { @@ -1405,10 +1401,10 @@ - (void)openCommissioningWindowWithSetupPasscode:(NSNumber *)setupPasscode #ifdef DEBUG // This method is for unit testing only -- (void)failSubscribers:(dispatch_queue_t)queue completion:(void (^)(void))completion +- (void)failSubscribers:(dispatch_queue_t)clientQueue completion:(void (^)(void))completion { MTR_LOG_DEBUG("Causing failure in subscribers on purpose"); - CauseReadClientFailure(self.nodeID, queue, completion); + CauseReadClientFailure(self.nodeID, clientQueue, completion); } #endif @@ -1454,63 +1450,12 @@ + (id)CHIPEncodeAndDecodeNSObject:(id)object @end -@interface MTRClusterPath () -- (instancetype)initWithPath:(const ConcreteClusterPath &)path; -@end - -@implementation MTRClusterPath -- (instancetype)initWithPath:(const ConcreteClusterPath &)path +@implementation MTRAttributePath +- (instancetype)initWithPath:(const ConcreteDataAttributePath &)path { if (self = [super init]) { _endpoint = @(path.mEndpointId); _cluster = @(path.mClusterId); - } - return self; -} - -- (NSString *)description -{ - return [NSString stringWithFormat:@" endpoint %u cluster %u", (uint16_t) _endpoint.unsignedShortValue, - (uint32_t) _cluster.unsignedLongValue]; -} - -+ (instancetype)clusterPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID -{ - ConcreteClusterPath path(static_cast([endpointID unsignedShortValue]), - static_cast([clusterID unsignedLongValue])); - - return [[MTRClusterPath alloc] initWithPath:path]; -} - -- (BOOL)isEqualToClusterPath:(MTRClusterPath *)clusterPath -{ - return [_endpoint isEqualToNumber:clusterPath.endpoint] && [_cluster isEqualToNumber:clusterPath.cluster]; -} - -- (BOOL)isEqual:(id)object -{ - if (![object isKindOfClass:[self class]]) { - return NO; - } - return [self isEqualToClusterPath:object]; -} - -- (NSUInteger)hash -{ - return _endpoint.unsignedShortValue ^ _cluster.unsignedLongValue; -} - -- (id)copyWithZone:(NSZone *)zone -{ - return [MTRClusterPath clusterPathWithEndpointID:_endpoint clusterID:_cluster]; -} - -@end - -@implementation MTRAttributePath -- (instancetype)initWithPath:(const ConcreteDataAttributePath &)path -{ - if (self = [super initWithPath:path]) { _attribute = @(path.mAttributeId); } return self; @@ -1519,24 +1464,23 @@ - (instancetype)initWithPath:(const ConcreteDataAttributePath &)path - (NSString *)description { return [NSString stringWithFormat:@" endpoint %u cluster %u attribute %u", - (uint16_t) self.endpoint.unsignedShortValue, (uint32_t) self.cluster.unsignedLongValue, + (uint16_t) _endpoint.unsignedShortValue, (uint32_t) _cluster.unsignedLongValue, (uint32_t) _attribute.unsignedLongValue]; } -+ (instancetype)attributePathWithEndpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - attributeID:(NSNumber *)attributeID ++ (instancetype)attributePathWithEndpointId:(NSNumber *)endpoint clusterId:(NSNumber *)clusterId attributeId:(NSNumber *)attributeId { - ConcreteDataAttributePath path(static_cast([endpointID unsignedShortValue]), - static_cast([clusterID unsignedLongValue]), - static_cast([attributeID unsignedLongValue])); + ConcreteDataAttributePath path(static_cast([endpoint unsignedShortValue]), + static_cast([clusterId unsignedLongValue]), + static_cast([attributeId unsignedLongValue])); return [[MTRAttributePath alloc] initWithPath:path]; } - (BOOL)isEqualToAttributePath:(MTRAttributePath *)attributePath { - return [self isEqualToClusterPath:attributePath] && [_attribute isEqualToNumber:attributePath.attribute]; + return [_endpoint isEqualToNumber:attributePath.endpoint] && [_cluster isEqualToNumber:attributePath.cluster] && + [_attribute isEqualToNumber:attributePath.attribute]; } - (BOOL)isEqual:(id)object @@ -1549,63 +1493,57 @@ - (BOOL)isEqual:(id)object - (NSUInteger)hash { - return self.endpoint.unsignedShortValue ^ self.cluster.unsignedLongValue ^ _attribute.unsignedLongValue; + return _endpoint.unsignedShortValue ^ _cluster.unsignedLongValue ^ _attribute.unsignedLongValue; } - (id)copyWithZone:(NSZone *)zone { - return [MTRAttributePath attributePathWithEndpointID:self.endpoint clusterID:self.cluster attributeID:_attribute]; + return [MTRAttributePath attributePathWithEndpointId:_endpoint clusterId:_cluster attributeId:_attribute]; } @end @implementation MTREventPath - (instancetype)initWithPath:(const ConcreteEventPath &)path { - if (self = [super initWithPath:path]) { + if (self = [super init]) { + _endpoint = @(path.mEndpointId); + _cluster = @(path.mClusterId); _event = @(path.mEventId); } return self; } -+ (instancetype)eventPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID eventID:(NSNumber *)eventID ++ (instancetype)eventPathWithEndpointId:(NSNumber *)endpoint clusterId:(NSNumber *)clusterId eventId:(NSNumber *)eventId { - ConcreteEventPath path(static_cast([endpointID unsignedShortValue]), - static_cast([clusterID unsignedLongValue]), static_cast([eventID unsignedLongValue])); + ConcreteEventPath path(static_cast([endpoint unsignedShortValue]), + static_cast([clusterId unsignedLongValue]), static_cast([eventId unsignedLongValue])); return [[MTREventPath alloc] initWithPath:path]; } - -- (id)copyWithZone:(NSZone *)zone -{ - return [MTREventPath eventPathWithEndpointID:self.endpoint clusterID:self.cluster eventID:_event]; -} @end @implementation MTRCommandPath - (instancetype)initWithPath:(const ConcreteCommandPath &)path { - if (self = [super initWithPath:path]) { + if (self = [super init]) { + _endpoint = @(path.mEndpointId); + _cluster = @(path.mClusterId); _command = @(path.mCommandId); } return self; } -+ (instancetype)commandPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID commandID:(NSNumber *)commandID ++ (instancetype)commandPathWithEndpointId:(NSNumber *)endpoint clusterId:(NSNumber *)clusterId commandId:(NSNumber *)commandId { - ConcreteCommandPath path(static_cast([endpointID unsignedShortValue]), - static_cast([clusterID unsignedLongValue]), static_cast([commandID unsignedLongValue])); + ConcreteCommandPath path(static_cast([endpoint unsignedShortValue]), + static_cast([clusterId unsignedLongValue]), static_cast([commandId unsignedLongValue])); return [[MTRCommandPath alloc] initWithPath:path]; } - -- (id)copyWithZone:(NSZone *)zone -{ - return [MTRCommandPath commandPathWithEndpointID:self.endpoint clusterID:self.cluster commandID:_command]; -} @end @implementation MTRAttributeReport -- (instancetype)initWithPath:(const ConcreteDataAttributePath &)path value:(id _Nullable)value error:(NSError * _Nullable)error +- (instancetype)initWithPath:(const ConcreteDataAttributePath &)path value:(nullable id)value error:(nullable NSError *)error { if (self = [super init]) { _path = [[MTRAttributePath alloc] initWithPath:path]; @@ -1621,8 +1559,8 @@ - (instancetype)initWithPath:(const ConcreteEventPath &)path eventNumber:(NSNumber *)eventNumber priority:(NSNumber *)priority timestamp:(NSNumber *)timestamp - value:(id _Nullable)value - error:(NSError * _Nullable)error + value:(nullable id)value + error:(nullable NSError *)error { if (self = [super init]) { _path = [[MTREventPath alloc] initWithPath:path]; diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h index c6fb24742f648b..59a2a6e20f0e69 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h @@ -23,6 +23,8 @@ #include #include +@class MTRDeviceController; + NS_ASSUME_NONNULL_BEGIN @interface MTRBaseDevice () @@ -54,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign, readonly) chip::NodeId nodeID; /** - * Controllers are created via the MTRDeviceControllerFactory object. + * Controllers are created via the MTRControllerFactory object. */ - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -65,7 +67,7 @@ NS_ASSUME_NONNULL_BEGIN * the controller's fabric, but attempts to actually use the MTRBaseDevice will * fail (asynchronously) in that case. */ -- (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller; +- (instancetype)initWithNodeID:(chip::NodeId)nodeID controller:(MTRDeviceController *)controller; @end @@ -83,8 +85,8 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRAttributeReport () - (instancetype)initWithPath:(const chip::app::ConcreteDataAttributePath &)path - value:(id _Nullable)value - error:(NSError * _Nullable)error; + value:(nullable id)value + error:(nullable NSError *)error; @end @interface MTREventReport () @@ -92,8 +94,8 @@ NS_ASSUME_NONNULL_BEGIN eventNumber:(NSNumber *)eventNumber priority:(NSNumber *)priority timestamp:(NSNumber *)timestamp - value:(id _Nullable)value - error:(NSError * _Nullable)error; + value:(nullable id)value + error:(nullable NSError *)error; @end // Exported utility function diff --git a/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h b/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h index 69db80607ae15a..143759ad02268e 100644 --- a/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h +++ b/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h @@ -82,9 +82,9 @@ class MTRBaseSubscriptionCallback : public chip::app::ClusterStateCache::Callbac // We need to exist to get a ReadClient, so can't take this as a constructor argument. void AdoptReadClient(std::unique_ptr aReadClient) { mReadClient = std::move(aReadClient); } - void AdoptClusterStateCache(std::unique_ptr aClusterStateCache) + void AdoptAttributeCache(std::unique_ptr aAttributeCache) { - mClusterStateCache = std::move(aClusterStateCache); + mAttributeCache = std::move(aAttributeCache); } protected: @@ -150,7 +150,7 @@ class MTRBaseSubscriptionCallback : public chip::app::ClusterStateCache::Callbac // from OnDone or from an error callback but not both, by tracking whether // we have a queued-up deletion. std::unique_ptr mReadClient; - std::unique_ptr mClusterStateCache; + std::unique_ptr mAttributeCache; bool mHaveQueuedDeletion = false; OnDoneHandler _Nullable mOnDoneHandler = nil; }; diff --git a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h index 3ea7d4c0fb8260..a434ec889bf1cd 100644 --- a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h +++ b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h @@ -34,10 +34,8 @@ */ // TODO: ADD NS_ASSUME_NONNULL_BEGIN to this header. When that happens, note -// that in MTRActionBlock the two callback pointers are nonnull and the two -// arguments of ResponseHandler are both nullable. +// that in MTRActionBlock the two callback pointers are nonnull. -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); @@ -138,10 +136,10 @@ template class MTRCallbackBridge { LogRequestStart(); BOOL ok = [controller getSessionForNode:nodeID - completion:^(chip::Messaging::ExchangeManager * exchangeManager, - const chip::Optional & session, NSError * error) { - MaybeDoAction(exchangeManager, session, error); - }]; + completionHandler:^(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/MTRCertificates.h b/src/darwin/Framework/CHIP/MTRCertificates.h index d384c4486d17c0..976d15dc029688 100644 --- a/src/darwin/Framework/CHIP/MTRCertificates.h +++ b/src/darwin/Framework/CHIP/MTRCertificates.h @@ -20,9 +20,6 @@ #import -typedef NSData MTRCertificateDERBytes; -typedef NSData MTRCertificateTLVBytes; - NS_ASSUME_NONNULL_BEGIN @protocol MTRKeypair; @@ -30,55 +27,55 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRCertificates : NSObject /** - * Create a root (self-signed) X.509 DER encoded certificate that has the + * Generate a root (self-signed) X.509 DER encoded certificate that has the * right fields to be a valid Matter root certificate. * - * If issuerID is nil, a random issuer id is generated. Otherwise the provided + * If issuerId is nil, a random issuer id is generated. Otherwise the provided * issuer id is used. * - * If fabricID is not nil, it will be included in the subject DN of the + * If fabricId is not nil, it will be included in the subject DN of the * certificate. In this case it must be a valid Matter fabric id. * * On failure returns nil and if "error" is not null sets *error to the relevant * error. */ -+ (MTRCertificateDERBytes * _Nullable)createRootCertificate:(id)keypair - issuerID:(NSNumber * _Nullable)issuerID - fabricID:(NSNumber * _Nullable)fabricID - error:(NSError * __autoreleasing _Nullable * _Nullable)error; ++ (nullable NSData *)generateRootCertificate:(id)keypair + issuerId:(nullable NSNumber *)issuerId + fabricId:(nullable NSNumber *)fabricId + error:(NSError * __autoreleasing _Nullable * _Nullable)error; /** - * Create an intermediate X.509 DER encoded certificate that has the + * Generate an intermediate X.509 DER encoded certificate that has the * right fields to be a valid Matter intermediate certificate. * - * If issuerID is nil, a random issuer id is generated. Otherwise the provided + * If issuerId is nil, a random issuer id is generated. Otherwise the provided * issuer id is used. * - * If fabricID is not nil, it will be included in the subject DN of the + * If fabricId is not nil, it will be included in the subject DN of the * certificate. In this case it must be a valid Matter fabric id. * * On failure returns nil and if "error" is not null sets *error to the relevant * error. */ -+ (MTRCertificateDERBytes * _Nullable)createIntermediateCertificate:(id)rootKeypair - rootCertificate:(MTRCertificateDERBytes *)rootCertificate - intermediatePublicKey:(SecKeyRef)intermediatePublicKey - issuerID:(NSNumber * _Nullable)issuerID - fabricID:(NSNumber * _Nullable)fabricID - error:(NSError * __autoreleasing _Nullable * _Nullable)error; ++ (nullable NSData *)generateIntermediateCertificate:(id)rootKeypair + rootCertificate:(NSData *)rootCertificate + intermediatePublicKey:(SecKeyRef)intermediatePublicKey + issuerId:(nullable NSNumber *)issuerId + fabricId:(nullable NSNumber *)fabricId + error:(NSError * __autoreleasing _Nullable * _Nullable)error; /** - * Create an X.509 DER encoded certificate that has the + * Generate an X.509 DER encoded certificate that has the * right fields to be a valid Matter operational certificate. * * signingKeypair and signingCertificate are the root or intermediate that is * signing the operational certificate. * - * nodeID and fabricID are expected to be 64-bit unsigned integers. + * nodeId and fabricId are expected to be 64-bit unsigned integers. * - * nodeID must be a valid Matter operational node id. + * nodeId must be a valid Matter operational node id. * - * fabricID must be a valid Matter fabric id. + * fabricId must be a valid Matter fabric id. * * caseAuthenticatedTags may be nil to indicate no CASE Authenticated Tags * should be used. If caseAuthenticatedTags is not nil, it must have length at @@ -88,13 +85,13 @@ NS_ASSUME_NONNULL_BEGIN * On failure returns nil and if "error" is not null sets *error to the relevant * error. */ -+ (MTRCertificateDERBytes * _Nullable)createOperationalCertificate:(id)signingKeypair - signingCertificate:(MTRCertificateDERBytes *)signingCertificate - operationalPublicKey:(SecKeyRef)operationalPublicKey - fabricID:(NSNumber *)fabricID - nodeID:(NSNumber *)nodeID - caseAuthenticatedTags:(NSArray * _Nullable)caseAuthenticatedTags - error:(NSError * __autoreleasing _Nullable * _Nullable)error; ++ (nullable NSData *)generateOperationalCertificate:(id)signingKeypair + signingCertificate:(NSData *)signingCertificate + operationalPublicKey:(SecKeyRef)operationalPublicKey + fabricId:(NSNumber *)fabricId + nodeId:(NSNumber *)nodeId + caseAuthenticatedTags:(NSArray * _Nullable)caseAuthenticatedTags + error:(NSError * __autoreleasing _Nullable * _Nullable)error; /** * Check whether the given keypair's public key matches the given certificate's @@ -110,7 +107,7 @@ NS_ASSUME_NONNULL_BEGIN * of having the same public key and the same subject DN. Returns NO if public * keys or subject DNs cannot be extracted from the certificates. */ -+ (BOOL)isCertificate:(MTRCertificateDERBytes *)certificate1 equalTo:(MTRCertificateDERBytes *)certificate2; ++ (BOOL)isCertificate:(NSData *)certificate1 equalTo:(NSData *)certificate2; /** * Generate a PKCS#10 certificate signing request from a MTRKeypair. This can @@ -125,8 +122,8 @@ NS_ASSUME_NONNULL_BEGIN * On failure returns nil and if "error" is not null sets *error to the relevant * error. */ -+ (NSData * _Nullable)createCertificateSigningRequest:(id)keypair - error:(NSError * __autoreleasing _Nullable * _Nullable)error; ++ (nullable NSData *)generateCertificateSigningRequest:(id)keypair + error:(NSError * __autoreleasing _Nullable * _Nullable)error; /** * Convert the given X.509v3 DER encoded certificate to the Matter certificate @@ -136,7 +133,7 @@ NS_ASSUME_NONNULL_BEGIN * as a DER encoded X.509 certificate, or if the certificate cannot be * represented in the Matter certificate format). */ -+ (MTRCertificateTLVBytes * _Nullable)convertX509Certificate:(MTRCertificateDERBytes *)x509Certificate; ++ (nullable NSData *)convertX509Certificate:(NSData *)x509Certificate; @end diff --git a/src/darwin/Framework/CHIP/MTRCertificates.mm b/src/darwin/Framework/CHIP/MTRCertificates.mm index 66ffecfc770b49..285fe85b61fca7 100644 --- a/src/darwin/Framework/CHIP/MTRCertificates.mm +++ b/src/darwin/Framework/CHIP/MTRCertificates.mm @@ -31,17 +31,17 @@ @implementation MTRCertificates -+ (MTRCertificateDERBytes * _Nullable)createRootCertificate:(id)keypair - issuerID:(NSNumber * _Nullable)issuerID - fabricID:(NSNumber * _Nullable)fabricID - error:(NSError * __autoreleasing *)error ++ (nullable NSData *)generateRootCertificate:(id)keypair + issuerId:(nullable NSNumber *)issuerId + fabricId:(nullable NSNumber *)fabricId + error:(NSError * __autoreleasing *)error { NSLog(@"Generating root certificate"); [MTRMemory ensureInit]; NSData * rootCert = nil; - CHIP_ERROR err = MTROperationalCredentialsDelegate::GenerateRootCertificate(keypair, issuerID, fabricID, &rootCert); + CHIP_ERROR err = MTROperationalCredentialsDelegate::GenerateRootCertificate(keypair, issuerId, fabricId, &rootCert); if (error) { *error = [MTRError errorForCHIPErrorCode:err]; } @@ -53,12 +53,12 @@ + (MTRCertificateDERBytes * _Nullable)createRootCertificate:(id)keyp return rootCert; } -+ (MTRCertificateDERBytes * _Nullable)createIntermediateCertificate:(id)rootKeypair - rootCertificate:(MTRCertificateDERBytes *)rootCertificate - intermediatePublicKey:(SecKeyRef)intermediatePublicKey - issuerID:(NSNumber * _Nullable)issuerID - fabricID:(NSNumber * _Nullable)fabricID - error:(NSError * __autoreleasing *)error ++ (nullable NSData *)generateIntermediateCertificate:(id)rootKeypair + rootCertificate:(NSData *)rootCertificate + intermediatePublicKey:(SecKeyRef)intermediatePublicKey + issuerId:(nullable NSNumber *)issuerId + fabricId:(nullable NSNumber *)fabricId + error:(NSError * __autoreleasing *)error { NSLog(@"Generating intermediate certificate"); @@ -66,7 +66,7 @@ + (MTRCertificateDERBytes * _Nullable)createIntermediateCertificate:(id)signingKeypair - signingCertificate:(MTRCertificateDERBytes *)signingCertificate - operationalPublicKey:(SecKeyRef)operationalPublicKey - fabricID:(NSNumber *)fabricID - nodeID:(NSNumber *)nodeID - caseAuthenticatedTags:(NSArray * _Nullable)caseAuthenticatedTags - error:(NSError * __autoreleasing _Nullable * _Nullable)error ++ (nullable NSData *)generateOperationalCertificate:(id)signingKeypair + signingCertificate:(NSData *)signingCertificate + operationalPublicKey:(SecKeyRef)operationalPublicKey + fabricId:(NSNumber *)fabricId + nodeId:(NSNumber *)nodeId + caseAuthenticatedTags:(NSArray * _Nullable)caseAuthenticatedTags + error:(NSError * __autoreleasing _Nullable * _Nullable)error { NSLog(@"Generating operational certificate"); @@ -92,7 +92,7 @@ + (MTRCertificateDERBytes * _Nullable)createOperationalCertificate:(id)keypair matchesCertificate:(NSData *)certificate return certKeySpan.data_equal(keypairKeySpan); } -+ (BOOL)isCertificate:(MTRCertificateDERBytes *)certificate1 equalTo:(MTRCertificateDERBytes *)certificate2 ++ (BOOL)isCertificate:(NSData *)certificate1 equalTo:(NSData *)certificate2 { [MTRMemory ensureInit]; @@ -168,8 +168,8 @@ + (BOOL)isCertificate:(MTRCertificateDERBytes *)certificate1 equalTo:(MTRCertifi return subject1.IsEqual(subject2); } -+ (NSData * _Nullable)createCertificateSigningRequest:(id)keypair - error:(NSError * __autoreleasing _Nullable * _Nullable)error ++ (nullable NSData *)generateCertificateSigningRequest:(id)keypair + error:(NSError * __autoreleasing _Nullable * _Nullable)error { [MTRMemory ensureInit]; @@ -197,7 +197,7 @@ + (NSData * _Nullable)createCertificateSigningRequest:(id)keypair return nil; } -+ (MTRCertificateTLVBytes * _Nullable)convertX509Certificate:(MTRCertificateDERBytes *)x509Certificate ++ (nullable NSData *)convertX509Certificate:(NSData *)x509Certificate { chip::ByteSpan x509CertBytes = AsByteSpan(x509Certificate); diff --git a/src/darwin/Framework/CHIP/MTRCluster.h b/src/darwin/Framework/CHIP/MTRCluster.h index ad0041d92a8b1e..ce6dc57683c4c0 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.h +++ b/src/darwin/Framework/CHIP/MTRCluster.h @@ -17,8 +17,9 @@ #import -typedef void (^MTRStatusCompletion)(NSError * _Nullable error); -typedef void (^MTRSubscriptionEstablishedHandler)(void); +typedef void (^ResponseHandler)(id _Nullable value, NSError * _Nullable error); +typedef void (^StatusCompletion)(NSError * _Nullable error); +typedef void (^SubscriptionEstablishedHandler)(void); @class MTRBaseDevice; @@ -54,7 +55,8 @@ NS_ASSUME_NONNULL_BEGIN * from the sever to the client (for the status response and actual write * request) within the timeout window. * - * This value is specified in milliseconds. + * This value is specified in milliseconds + * */ @property (nonatomic, copy, nullable) NSNumber * timedWriteTimeout; @@ -66,6 +68,9 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, copy, nullable) NSNumber * dataVersion; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; + @end /** @@ -77,7 +82,8 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRReadParams : NSObject /** - * Whether the read/subscribe is fabric-filtered. The default is YES. + * Whether the read/subscribe is fabric-filtered. nil (the default value) is + * treated as YES. * * If YES, the read/subscribe is fabric-filtered and will only see things * associated with the fabric of the reader/subscriber. @@ -85,7 +91,10 @@ NS_ASSUME_NONNULL_BEGIN * If NO, the read/subscribe is not fabric-filtered and will see all * non-fabric-sensitive data for the given attribute path. */ -@property (nonatomic, assign) BOOL fabricFiltered; +@property (nonatomic, copy, nullable) NSNumber * fabricFiltered; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end @@ -99,18 +108,18 @@ NS_ASSUME_NONNULL_BEGIN /** * Whether the subscribe should allow previous subscriptions to stay in - * place. The default value is NO. + * place. nil (the default value) is treated as NO. * * If NO, the subscribe will cancel any existing subscriptions to the target * node when it sets up the new one. * * If YES, the subscribe will allow any previous subscriptions to remain. */ -@property (nonatomic, assign) BOOL keepPreviousSubscriptions; +@property (nonatomic, copy, nullable) NSNumber * keepPreviousSubscriptions; /** * Whether the subscription should automatically try to re-establish if it - * drops. The default value is YES. + * drops. nil (the default value) is treated as YES. * * If NO, loss of subscription will simply lead to an error report. Some * subscription APIs do not support this value. @@ -120,31 +129,11 @@ NS_ASSUME_NONNULL_BEGIN * called again. * */ -@property (nonatomic, assign) BOOL autoResubscribe; +@property (nonatomic, copy, nullable) NSNumber * autoResubscribe; -/** - * The minimum time, in seconds, between consecutive reports a server will send - * for this subscription. This can be used to rate-limit the subscription - * traffic. Any non-negative value is allowed, including 0. - */ -@property (nonatomic, copy) NSNumber * minInterval; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; -/** - * The suggested maximum time, in seconds, during which the server is allowed to - * send no reports at all for this subscription. Must be at least as large as - * minInterval. The server is allowed to use a larger time than this as the - * maxInterval it selects if it needs to (e.g. to meet its power budget). - */ -@property (nonatomic, copy) NSNumber * maxInterval; - -/** - * Initialize an MTRSubscribeParams. Must provide a minInterval and - * maxInterval; there are no default values for those. - */ -- (instancetype)initWithMinInterval:(NSNumber *)minInterval maxInterval:(NSNumber *)maxInterval; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRCluster.mm b/src/darwin/Framework/CHIP/MTRCluster.mm index 21b65d8c696467..480b80ade3ce00 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.mm +++ b/src/darwin/Framework/CHIP/MTRCluster.mm @@ -51,7 +51,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRWriteParams alloc] init]; other.timedWriteTimeout = self.timedWriteTimeout; @@ -65,12 +65,12 @@ @implementation MTRReadParams - (instancetype)init { if (self = [super init]) { - _fabricFiltered = YES; + _fabricFiltered = nil; } return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRReadParams alloc] init]; other.fabricFiltered = self.fabricFiltered; @@ -80,20 +80,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone @end @implementation MTRSubscribeParams -- (instancetype)initWithMinInterval:(NSNumber *)minInterval maxInterval:(NSNumber *)maxInterval +- (instancetype)init { if (self = [super init]) { - _keepPreviousSubscriptions = NO; - _autoResubscribe = YES; - _minInterval = [minInterval copy]; - _maxInterval = [maxInterval copy]; + _keepPreviousSubscriptions = nil; + _autoResubscribe = nil; } return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { - auto other = [[MTRSubscribeParams alloc] initWithMinInterval:self.minInterval maxInterval:self.maxInterval]; + auto other = [[MTRSubscribeParams alloc] init]; other.fabricFiltered = self.fabricFiltered; other.keepPreviousSubscriptions = self.keepPreviousSubscriptions; other.autoResubscribe = self.autoResubscribe; diff --git a/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer.h b/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer.h deleted file mode 100644 index e0003bc9165a8f..00000000000000 --- a/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer.h +++ /dev/null @@ -1,57 +0,0 @@ -/** - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@class MTRSubscribeParams; - -/** - * An object that holds a cluster state cache. It can be passed to - * MTRBaseDevice's subscribeWithQueue to fill the cache with data the - * subscription returns. Then reads can happen against the cache without going - * out to the network. - */ -@interface MTRClusterStateCacheContainer : NSObject - -/** - * Reads the given attribute path from the cluster state cache inside - * this cache container. - * - * @param endpointID endpoint ID of the attribute. nil means wildcard. - * @param clusterID cluster ID of the attribute nil means wildcard. - * @param attributeID attribute ID of the attribute. nil means wildcard. - * @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 the completion block - * of the MTRBaseDevice readAttributePathWithEndpointID:clusterID:attributeID:queue:completion method. - * - * @note: not all combinations of wildcards might be supported. - */ -- (void)readAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - queue:(dispatch_queue_t)queue - completion:(MTRDeviceResponseHandler)completion; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRCluster_internal.h b/src/darwin/Framework/CHIP/MTRCluster_internal.h index 1ea8e80b01237c..615b8eb732b48d 100644 --- a/src/darwin/Framework/CHIP/MTRCluster_internal.h +++ b/src/darwin/Framework/CHIP/MTRCluster_internal.h @@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRCluster () @property (readonly, nonatomic) dispatch_queue_t callbackQueue; -- (instancetype _Nullable)initWithQueue:(dispatch_queue_t)queue; +- (nullable instancetype)initWithQueue:(dispatch_queue_t)queue; - (chip::ByteSpan)asByteSpan:(NSData *)value; - (chip::CharSpan)asCharSpan:(NSString *)value; @end diff --git a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h index 5a5eeae69826f1..cbbb2a44a68d4a 100644 --- a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h +++ b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h @@ -22,34 +22,26 @@ NS_ASSUME_NONNULL_BEGIN @protocol MTRDeviceAttestationDelegate; /** - * Information that can be provided to commissionWithNodeID to commision devices. + * The class definition for the CHIPCommissioningParameters + * */ @interface MTRCommissioningParameters : NSObject /** - * The nonce to use when requesting a CSR for the node's operational - * certificate. - * - * If nil, a random nonce will be generated automatically. - * - * If not nil, must be 32 bytes of data. + * The CSRNonce */ -@property (nonatomic, copy, nullable) NSData * csrNonce; +@property (nonatomic, copy, nullable) NSData * CSRNonce; /** - * The nonce to use when requesting attestation information from the device. - * - * If nil, a random nonce will be generated automatically. - * - * If not nil, must be 32 bytes of data. + * The AttestationNonce */ @property (nonatomic, copy, nullable) NSData * attestationNonce; /** - * The Wi-Fi SSID, if available. + * The Wi-Fi SSID, if available. */ @property (nonatomic, copy, nullable) NSData * wifiSSID; /** - * The Wi-Fi Credentials. Allowed to be nil or 0-length data for an open - * network, as long as wifiSSID is not nil. + * The Wi-Fi Credentials. Allowed to be nil or 0-length data for an open + * network, as long as wifiSSID is not nil. */ @property (nonatomic, copy, nullable) NSData * wifiCredentials; /** @@ -57,20 +49,13 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, copy, nullable) NSData * threadOperationalDataset; /** - * An optional delegate that can be notified upon completion of device - * attestation. See documentation for MTRDeviceAttestationDelegate for - * details. + * The Device Attestation status delegate */ @property (nonatomic, strong, nullable) id deviceAttestationDelegate; /** - * The timeout, in seconds, to set for the fail-safe when calling into the - * deviceAttestationDelegate and waiting for it to respond. - * - * If nil, the fail-safe will not be extended before calling into the - * deviceAttestationDelegate. - + * The timeout in secs to set for fail-safe when attestation fails */ -@property (nonatomic, copy, nullable) NSNumber * failSafeExpiryTimeout; +@property (nonatomic, copy, nullable) NSNumber * failSafeExpiryTimeoutSecs; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h b/src/darwin/Framework/CHIP/MTRControllerFactory.h similarity index 63% rename from src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h rename to src/darwin/Framework/CHIP/MTRControllerFactory.h index b8131e2e6fe09c..508cf369374bae 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h +++ b/src/darwin/Framework/CHIP/MTRControllerFactory.h @@ -24,20 +24,20 @@ NS_ASSUME_NONNULL_BEGIN -@protocol MTRStorage; +@protocol MTRPersistentStorageDelegate; @protocol MTROTAProviderDelegate; @protocol MTRKeypair; @class MTRDeviceController; @class MTRDeviceControllerStartupParams; -@interface MTRDeviceControllerFactoryParams : NSObject +@interface MTRControllerFactoryParams : NSObject /* * Storage delegate must be provided for correct functioning of Matter * controllers. It is used to store persistent information for the fabrics the * controllers ends up interacting with. */ -@property (nonatomic, strong, readonly) id storage; +@property (nonatomic, strong, readonly) id storageDelegate; /* * OTA Provider delegate to be called when an OTA Requestor is requesting a software update. @@ -66,47 +66,44 @@ NS_ASSUME_NONNULL_BEGIN * Whether to run a server capable of accepting incoming CASE * connections. Defaults to NO. */ -@property (nonatomic, assign) BOOL shouldStartServer; +@property (nonatomic, assign) BOOL startServer; - (instancetype)init NS_UNAVAILABLE; -- (instancetype)initWithStorage:(id)storage; +- (instancetype)initWithStorage:(id)storageDelegate; @end -@interface MTRDeviceControllerFactory : NSObject +@interface MTRControllerFactory : NSObject -/** - * If true, the factory is in a state where it can create controllers: - * startControllerFactory has been called, but stopControllerFactory has not been called - * since then. - */ -@property (readonly, nonatomic, getter=isRunning) BOOL running; +@property (readonly, nonatomic) BOOL isRunning; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; /** - * Return the single MTRDeviceControllerFactory we support existing. It starts off + * Return the single MTRControllerFactory we support existing. It starts off * in a "not started" state. */ + (instancetype)sharedInstance; /** - * Start the controller factory. Repeated calls to startControllerFactory - * without calls to stopControllerFactory in between are NO-OPs. Use the - * isRunning property to check whether the controller factory needs to be - * started up. + * Start the controller factory. Repeated calls to startup without calls to + * shutdown in between are NO-OPs. Use the isRunning property to check whether + * the controller factory needs to be started up. * * @param[in] startupParams data needed to start up the controller factory. * * @return Whether startup succeded. */ -- (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams error:(NSError * __autoreleasing *)error; +- (BOOL)startup:(MTRControllerFactoryParams *)startupParams; /** - * Stop the controller factory. This will shut down any outstanding - * controllers as part of the factory stopping. + * Shut down the controller factory. This will shut down any outstanding + * controllers as part of the factory shutdown. * - * Repeated calls to stopControllerFactory without calls to - * startControllerFactory in between are NO-OPs. + * Repeated calls to shutdown without calls to startup in between are + * NO-OPs. */ -- (void)stopControllerFactory; +- (void)shutdown; /** * Create a MTRDeviceController on an existing fabric. Returns nil on failure. @@ -117,8 +114,7 @@ NS_ASSUME_NONNULL_BEGIN * The fabric is identified by the root public key and fabric id in * the startupParams. */ -- (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams - error:(NSError * __autoreleasing *)error; +- (MTRDeviceController * _Nullable)startControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams; /** * Create a MTRDeviceController on a new fabric. Returns nil on failure. @@ -128,11 +124,7 @@ NS_ASSUME_NONNULL_BEGIN * The fabric is identified by the root public key and fabric id in * the startupParams. */ -- (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams - error:(NSError * __autoreleasing *)error; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; +- (MTRDeviceController * _Nullable)startControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRControllerFactory.mm similarity index 83% rename from src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm rename to src/darwin/Framework/CHIP/MTRControllerFactory.mm index 7ee9fb783b4a38..9539a8f6eabdee 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRControllerFactory.mm @@ -14,8 +14,8 @@ * limitations under the License. */ -#import "MTRDeviceControllerFactory.h" -#import "MTRDeviceControllerFactory_Internal.h" +#import "MTRControllerFactory.h" +#import "MTRControllerFactory_Internal.h" #import "MTRAttestationTrustStoreBridge.h" #import "MTRCertificates.h" @@ -24,7 +24,6 @@ #import "MTRDeviceControllerStartupParams.h" #import "MTRDeviceControllerStartupParams_Internal.h" #import "MTRDeviceController_Internal.h" -#import "MTRError_Internal.h" #import "MTRLogging.h" #import "MTRMemory.h" #import "MTROTAProviderDelegateBridge.h" @@ -58,7 +57,7 @@ static NSString * const kErrorCDCertStoreInit = @"Init failure while initializing Certificate Declaration Signing Keys store"; static NSString * const kErrorOtaProviderInit = @"Init failure while creating an OTA provider delegate"; -@interface MTRDeviceControllerFactory () +@interface MTRControllerFactory () @property (atomic, readonly) dispatch_queue_t chipWorkQueue; @property (readonly) DeviceControllerFactory * controllerFactory; @@ -82,15 +81,15 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable - (MTRDeviceController * _Nullable)maybeInitializeOTAProvider:(MTRDeviceController * _Nonnull)controller; @end -@implementation MTRDeviceControllerFactory +@implementation MTRControllerFactory + (instancetype)sharedInstance { - static MTRDeviceControllerFactory * factory = nil; + static MTRControllerFactory * factory = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ // initialize the factory. - factory = [[MTRDeviceControllerFactory alloc] init]; + factory = [[MTRControllerFactory alloc] init]; }); return factory; } @@ -101,7 +100,7 @@ - (instancetype)init return nil; } - _running = NO; + _isRunning = NO; _chipWorkQueue = DeviceLayer::PlatformMgrImpl().GetWorkQueue(); _controllerFactory = &DeviceControllerFactory::GetInstance(); [MTRMemory ensureInit]; @@ -133,23 +132,10 @@ - (instancetype)init - (void)dealloc { - [self stopControllerFactory]; + [self shutdown]; [self cleanupInitObjects]; } -- (BOOL)checkIsRunning:(NSError * __autoreleasing *)error -{ - if ([self isRunning]) { - return YES; - } - - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - - return NO; -} - - (BOOL)checkForInitError:(BOOL)condition logMsg:(NSString *)logMsg { if (condition) { @@ -214,7 +200,7 @@ - (void)cleanupStartupObjects } } -- (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams error:(NSError * __autoreleasing *)error; +- (BOOL)startup:(MTRControllerFactoryParams *)startupParams { if ([self isRunning]) { MTR_LOG_DEBUG("Ignoring duplicate call to startup, Matter controller factory already started..."); @@ -223,7 +209,6 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams DeviceLayer::PlatformMgrImpl().StartEventLoopTask(); - __block CHIP_ERROR errorCode = CHIP_NO_ERROR; dispatch_sync(_chipWorkQueue, ^{ if ([self isRunning]) { return; @@ -231,10 +216,9 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams [MTRControllerAccessControl init]; - _persistentStorageDelegateBridge = new MTRPersistentStorageDelegateBridge(startupParams.storage); + _persistentStorageDelegateBridge = new MTRPersistentStorageDelegateBridge(startupParams.storageDelegate); if (_persistentStorageDelegateBridge == nil) { MTR_LOG_ERROR("Error: %@", kErrorPersistentStorageInit); - errorCode = CHIP_ERROR_NO_MEMORY; return; } @@ -242,7 +226,6 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams _otaProviderDelegateBridge = new MTROTAProviderDelegateBridge(startupParams.otaProviderDelegate); if (_otaProviderDelegateBridge == nil) { MTR_LOG_ERROR("Error: %@", kErrorOtaProviderInit); - errorCode = CHIP_ERROR_NO_MEMORY; return; } } @@ -251,11 +234,10 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams _keystore = new PersistentStorageOperationalKeystore(); if (_keystore == nullptr) { MTR_LOG_ERROR("Error: %@", kErrorKeystoreInit); - errorCode = CHIP_ERROR_NO_MEMORY; return; } - errorCode = _keystore->Init(_persistentStorageDelegateBridge); + CHIP_ERROR errorCode = _keystore->Init(_persistentStorageDelegateBridge); if (errorCode != CHIP_NO_ERROR) { MTR_LOG_ERROR("Error: %@", kErrorKeystoreInit); return; @@ -265,7 +247,6 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams _opCertStore = new Credentials::PersistentStorageOpCertStore(); if (_opCertStore == nullptr) { MTR_LOG_ERROR("Error: %@", kErrorCertStoreInit); - errorCode = CHIP_ERROR_NO_MEMORY; return; } @@ -281,7 +262,6 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams _attestationTrustStoreBridge = new MTRAttestationTrustStoreBridge(startupParams.paaCerts); if (_attestationTrustStoreBridge == nullptr) { MTR_LOG_ERROR("Error: %@", kErrorAttestationTrustStoreInit); - errorCode = CHIP_ERROR_NO_MEMORY; return; } trustStore = _attestationTrustStoreBridge; @@ -292,7 +272,6 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams _deviceAttestationVerifier = new Credentials::DefaultDACVerifier(trustStore); if (_deviceAttestationVerifier == nullptr) { MTR_LOG_ERROR("Error: %@", kErrorDACVerifierInit); - errorCode = CHIP_ERROR_NO_MEMORY; return; } @@ -300,7 +279,6 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams auto cdTrustStore = _deviceAttestationVerifier->GetCertificationDeclarationTrustStore(); if (cdTrustStore == nullptr) { MTR_LOG_ERROR("Error: %@", kErrorCDCertStoreInit); - errorCode = CHIP_ERROR_INCORRECT_STATE; return; } @@ -317,7 +295,7 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams if (startupParams.port != nil) { params.listenPort = [startupParams.port unsignedShortValue]; } - if (startupParams.shouldStartServer == YES) { + if (startupParams.startServer == YES) { params.enableServerInteractions = true; } @@ -331,7 +309,7 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams return; } - self->_running = YES; + self->_isRunning = YES; }); // Make sure to stop the event loop again before returning, so we are not running it while we don't have any controllers. @@ -339,15 +317,12 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams if (![self isRunning]) { [self cleanupStartupObjects]; - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:errorCode]; - } } return [self isRunning]; } -- (void)stopControllerFactory +- (void)shutdown { if (![self isRunning]) { return; @@ -366,13 +341,12 @@ - (void)stopControllerFactory // that does not re-create the objects that we create inside init. // Maybe we should be creating them in startup? - _running = NO; + _isRunning = NO; } -- (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams - error:(NSError * __autoreleasing *)error +- (MTRDeviceController * _Nullable)startControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams { - if (![self checkIsRunning:error]) { + if (![self isRunning]) { MTR_LOG_ERROR("Trying to start controller while Matter controller factory is not running"); return nil; } @@ -381,14 +355,10 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo // our fabric table operations there. auto * controller = [self createController]; if (controller == nil) { - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_NO_MEMORY]; - } return nil; } __block MTRDeviceControllerStartupParamsInternal * params = nil; - __block CHIP_ERROR fabricError = CHIP_NO_ERROR; // We want the block to end up with just a pointer to the fabric table, // since we know our on-stack instance will outlive the block. FabricTable fabricTableInstance; @@ -398,13 +368,11 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; if (!ok) { MTR_LOG_ERROR("Can't start on existing fabric: fabric matching failed"); - fabricError = CHIP_ERROR_INTERNAL; return; } if (fabric == nullptr) { MTR_LOG_ERROR("Can't start on existing fabric: fabric not found"); - fabricError = CHIP_ERROR_NOT_FOUND; return; } @@ -413,13 +381,11 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo if ([existing isRunningOnFabric:fabricTable fabricIndex:fabric->GetFabricIndex() isRunning:&isRunning] != CHIP_NO_ERROR) { MTR_LOG_ERROR("Can't tell what fabric a controller is running on. Not safe to start."); - fabricError = CHIP_ERROR_INTERNAL; return; } if (isRunning) { MTR_LOG_ERROR("Can't start on existing fabric: another controller is running on it"); - fabricError = CHIP_ERROR_INCORRECT_STATE; return; } } @@ -428,46 +394,29 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo fabricIndex:fabric->GetFabricIndex() keystore:_keystore params:startupParams]; - if (params == nil) { - fabricError = CHIP_ERROR_NO_MEMORY; - } }); if (params == nil) { [self controllerShuttingDown:controller]; - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:fabricError]; - } return nil; } BOOL ok = [controller startup:params]; if (ok == NO) { - // TODO: get error from controller's startup. - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; - } return nil; } - controller = [self maybeInitializeOTAProvider:controller]; - if (controller == nil) { - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; - } - } - return controller; + return [self maybeInitializeOTAProvider:controller]; } -- (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams - error:(NSError * __autoreleasing *)error +- (MTRDeviceController * _Nullable)startControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams { if (![self isRunning]) { MTR_LOG_ERROR("Trying to start controller while Matter controller factory is not running"); return nil; } - if (startupParams.vendorID == nil) { + if (startupParams.vendorId == nil) { MTR_LOG_ERROR("Must provide vendor id when starting controller on new fabric"); return nil; } @@ -481,14 +430,10 @@ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControl // our fabric table operations there. auto * controller = [self createController]; if (controller == nil) { - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_NO_MEMORY]; - } return nil; } __block MTRDeviceControllerStartupParamsInternal * params = nil; - __block CHIP_ERROR fabricError = CHIP_NO_ERROR; // We want the block to end up with just a pointer to the fabric table, // since we know our on-stack instance will outlive the block. FabricTable fabricTableInstance; @@ -498,49 +443,30 @@ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControl BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; if (!ok) { MTR_LOG_ERROR("Can't start on new fabric: fabric matching failed"); - fabricError = CHIP_ERROR_INTERNAL; return; } if (fabric != nullptr) { MTR_LOG_ERROR("Can't start on new fabric that matches existing fabric"); - fabricError = CHIP_ERROR_INCORRECT_STATE; return; } params = [[MTRDeviceControllerStartupParamsInternal alloc] initForNewFabric:fabricTable keystore:_keystore params:startupParams]; - if (params == nil) { - fabricError = CHIP_ERROR_NO_MEMORY; - } }); if (params == nil) { [self controllerShuttingDown:controller]; - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:fabricError]; - } return nil; } BOOL ok = [controller startup:params]; if (ok == NO) { - // TODO: get error from controller's startup. - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; - } return nil; } - // TODO: Need better error propagation. - controller = [self maybeInitializeOTAProvider:controller]; - if (controller == nil) { - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; - } - } - return controller; + return [self maybeInitializeOTAProvider:controller]; } - (MTRDeviceController * _Nullable)createController @@ -600,7 +526,7 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable } } - *fabric = fabricTable.FindFabric(pubKey, [params.fabricID unsignedLongLongValue]); + *fabric = fabricTable.FindFabric(pubKey, params.fabricId); return YES; } @@ -627,7 +553,7 @@ - (MTRDeviceController * _Nullable)maybeInitializeOTAProvider:(MTRDeviceControll @end -@implementation MTRDeviceControllerFactory (InternalMethods) +@implementation MTRControllerFactory (InternalMethods) - (void)controllerShuttingDown:(MTRDeviceController *)controller { @@ -694,20 +620,20 @@ - (MTRPersistentStorageDelegateBridge *)storageDelegateBridge @end -@implementation MTRDeviceControllerFactoryParams +@implementation MTRControllerFactoryParams -- (instancetype)initWithStorage:(id)storage +- (instancetype)initWithStorage:(id)storageDelegate { if (!(self = [super init])) { return nil; } - _storage = storage; + _storageDelegate = storageDelegate; _otaProviderDelegate = nil; _paaCerts = nil; _cdCerts = nil; _port = nil; - _shouldStartServer = NO; + _startServer = NO; return self; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRControllerFactory_Internal.h similarity index 89% rename from src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h rename to src/darwin/Framework/CHIP/MTRControllerFactory_Internal.h index a92d00b1c1e8b3..e976aea01609af 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRControllerFactory_Internal.h @@ -15,13 +15,13 @@ */ /** - * Parts of MTRDeviceControllerFactory that are not part of the framework API. + * Parts of MTRControllerFactory that are not part of the framework API. * Mostly for use from MTRDeviceController. */ #import -#import "MTRDeviceControllerFactory.h" +#import "MTRControllerFactory.h" #include @@ -38,7 +38,7 @@ namespace Credentials { NS_ASSUME_NONNULL_BEGIN -@interface MTRDeviceControllerFactory (InternalMethods) +@interface MTRControllerFactory (InternalMethods) - (void)controllerShuttingDown:(MTRDeviceController *)controller; diff --git a/src/darwin/Framework/CHIP/MTRDevice.h b/src/darwin/Framework/CHIP/MTRDevice.h index 7df17c75f6db6d..d946a76fd2f2b5 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.h +++ b/src/darwin/Framework/CHIP/MTRDevice.h @@ -44,13 +44,13 @@ typedef NS_ENUM(NSUInteger, MTRDeviceState) { * retrieved when performing actions using a combination of MTRBaseDevice * and MTRAsyncCallbackQueue. */ -+ (instancetype)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller; ++ (instancetype)deviceWithNodeID:(uint64_t)nodeID deviceController:(MTRDeviceController *)deviceController; /** * The current state of the device. * * The three states: - * MTRDeviceStateUnknkown + * MTRDeviceStateUnknown * Unable to determine the state of the device at the moment. * * MTRDeviceStateReachable @@ -134,13 +134,13 @@ typedef NS_ENUM(NSUInteger, MTRDeviceState) { expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval timedInvokeTimeout:(NSNumber * _Nullable)timeout - queue:(dispatch_queue_t)queue + clientQueue:(dispatch_queue_t)clientQueue completion:(MTRDeviceResponseHandler)completion; /** * Open a commissioning window on the device. * - * On success, completion will be called with the MTRSetupPayload that + * On success, completion will be called on queue with the MTRSetupPayload that * can be used to commission the device. * * @param setupPasscode The setup passcode to use for the commissioning window. diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 4d29ef5fbb9fe7..9cea81ca5120a6 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -142,12 +142,12 @@ @interface MTRDevice () @implementation MTRDevice -- (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller +- (instancetype)initWithNodeID:(uint64_t)nodeID deviceController:(MTRDeviceController *)deviceController { if (self = [super init]) { _lock = OS_UNFAIR_LOCK_INIT; - _nodeID = [nodeID copy]; - _deviceController = controller; + _nodeID = nodeID; + _deviceController = deviceController; _queue = dispatch_queue_create("com.apple.matter.framework.xpc.workqueue", DISPATCH_QUEUE_SERIAL); ; _readCache = [NSMutableDictionary dictionary]; @@ -158,9 +158,9 @@ - (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceControlle return self; } -+ (instancetype)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller ++ (instancetype)deviceWithNodeID:(uint64_t)nodeID deviceController:(MTRDeviceController *)deviceController { - return [controller deviceForNodeID:nodeID]; + return [deviceController deviceForNodeID:nodeID]; } #pragma mark Subscription and delegate handling @@ -286,89 +286,89 @@ - (void)subscribeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)max _subscriptionActive = YES; - [_deviceController getSessionForNode:[_nodeID unsignedLongLongValue] - 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(); - 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 clusterStateCache; - 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(); - }]; + [_deviceController getSessionForNode:_nodeID + 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(); + 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 @@ -380,36 +380,36 @@ - (void)subscribeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)max // Create work item, set ready handler to perform task, then enqueue the work MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:_queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRBaseDevice * baseDevice = [self newBaseDevice]; - - [baseDevice readAttributePathWithEndpointID:endpointID - clusterID:clusterID - attributeID:attributeID - params:params - 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 - // report - [self _handleAttributeReport:values]; - } - - // TODO: better retry logic - if (retryCount < 2) { - [workItem retryWork]; - } else { - [workItem endWork]; - } - }]; + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.nodeID controller:self.deviceController]; + + [baseDevice + readAttributeWithEndpointId:endpointID + clusterId:clusterID + attributeId:attributeID + params:params + clientQueue: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 + // report + [self _handleAttributeReport:values]; + } + + // TODO: better retry logic + if (retryCount < 2) { + [workItem retryWork]; + } else { + [workItem endWork]; + } + }]; }; workItem.readyHandler = readyHandler; [_asyncCallbackWorkQueue enqueueWorkItem:workItem]; // Return current known / expected value right away - MTRAttributePath * attributePath = [MTRAttributePath attributePathWithEndpointID:endpointID - clusterID:clusterID - attributeID:attributeID]; + MTRAttributePath * attributePath = [MTRAttributePath attributePathWithEndpointId:endpointID + clusterId:clusterID + attributeId:attributeID]; NSDictionary * attributeValueToReturn = [self _attributeValueDictionaryForAttributePath:attributePath]; return attributeValueToReturn; @@ -423,14 +423,14 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID timedWriteTimeout:(NSNumber * _Nullable)timeout { // Start the asynchronous operation - MTRBaseDevice * baseDevice = [self newBaseDevice]; + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.nodeID controller:self.deviceController]; [baseDevice - writeAttributeWithEndpointID:endpointID - clusterID:clusterID - attributeID:attributeID + writeAttributeWithEndpointId:endpointID + clusterId:clusterID + attributeId:attributeID value:value timedWriteTimeout:timeout - queue:self.queue + clientQueue:self.queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { if (values) { [self _handleAttributeReport:values]; @@ -438,9 +438,9 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID }]; // Commit change into expected value cache - MTRAttributePath * attributePath = [MTRAttributePath attributePathWithEndpointID:endpointID - clusterID:clusterID - attributeID:attributeID]; + MTRAttributePath * attributePath = [MTRAttributePath attributePathWithEndpointId:endpointID + clusterId:clusterID + attributeId:attributeID]; NSDictionary * newExpectedValueDictionary = @{ MTRAttributePathKey : attributePath, MTRDataKey : value }; [self setExpectedValues:@[ newExpectedValueDictionary ] expectedValueInterval:expectedValueInterval]; @@ -453,20 +453,20 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueInterval timedInvokeTimeout:(NSNumber * _Nullable)timeout - queue:(dispatch_queue_t)queue + clientQueue:(dispatch_queue_t)clientQueue completion:(MTRDeviceResponseHandler)completion { // Perform this operation - MTRBaseDevice * baseDevice = [self newBaseDevice]; + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.nodeID controller:self.deviceController]; [baseDevice - invokeCommandWithEndpointID:endpointID - clusterID:clusterID - commandID:commandID + invokeCommandWithEndpointId:endpointID + clusterId:clusterID + commandId:commandID commandFields:commandFields timedInvokeTimeout:timeout - queue:self.queue + clientQueue:self.queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - dispatch_async(queue, ^{ + dispatch_async(clientQueue, ^{ completion(values, error); }); }]; @@ -480,7 +480,7 @@ - (void)openCommissioningWindowWithSetupPasscode:(NSNumber *)setupPasscode queue:(dispatch_queue_t)queue completion:(MTRDeviceOpenCommissioningWindowHandler)completion { - auto * baseDevice = [self newBaseDevice]; + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.nodeID controller:self.deviceController]; [baseDevice openCommissioningWindowWithSetupPasscode:setupPasscode discriminator:discriminator duration:duration @@ -700,11 +700,6 @@ - (void)setExpectedValues:(NSArray *> *)values expe os_unfair_lock_unlock(&self->_lock); } -- (MTRBaseDevice *)newBaseDevice -{ - return [[MTRBaseDevice alloc] initWithNodeID:self.nodeID controller:self.deviceController]; -} - @end #pragma mark - SubscriptionCallback diff --git a/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h index 331b35e549b7c9..9f30053a945ad0 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h +++ b/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h @@ -39,10 +39,10 @@ NS_ASSUME_NONNULL_BEGIN /** * Only one of the following delegate callbacks should be implemented. * - * If -deviceAttestationFailedForController:device:error: is implemented, then it will be called when device + * If -deviceAttestation:failedForDevice:error: is implemented, then it will be called when device * attestation fails, and the client can decide to continue or stop the commissioning. * - * If -deviceAttestationCompletedForController:device:attestationDeviceInfo:error: is implemented, then it + * If -deviceAttestation:completedForDevice:attestationDeviceInfo:error: is implemented, then it * will always be called when device attestation completes. */ @@ -58,10 +58,10 @@ NS_ASSUME_NONNULL_BEGIN * @param attestationDeviceInfo Attestation information for the device * @param error NSError representing the error code on attestation failure. Nil if success. */ -- (void)deviceAttestationCompletedForController:(MTRDeviceController *)controller - device:(void *)device - attestationDeviceInfo:(MTRDeviceAttestationDeviceInfo *)attestationDeviceInfo - error:(NSError * _Nullable)error; +- (void)deviceAttestation:(MTRDeviceController *)controller + completedForDevice:(void *)device + attestationDeviceInfo:(MTRDeviceAttestationDeviceInfo *)attestationDeviceInfo + error:(NSError * _Nullable)error; /** * Notify the delegate when device attestation fails @@ -70,9 +70,7 @@ NS_ASSUME_NONNULL_BEGIN * @param device Handle of device being commissioned * @param error NSError representing the error code for the failure */ -- (void)deviceAttestationFailedForController:(MTRDeviceController *)controller - device:(void *)device - error:(NSError * _Nonnull)error; +- (void)deviceAttestation:(MTRDeviceController *)controller failedForDevice:(void *)device error:(NSError * _Nonnull)error; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegateBridge.mm b/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegateBridge.mm index 7bc7f9314533b2..528148d3e0cf8d 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegateBridge.mm @@ -30,8 +30,7 @@ mResult = attestationResult; id strongDelegate = mDeviceAttestationDelegate; - if ([strongDelegate respondsToSelector:@selector(deviceAttestationCompletedForController: - device:attestationDeviceInfo:error:)]) { + if ([strongDelegate respondsToSelector:@selector(deviceAttestation:completedForDevice:attestationDeviceInfo:error:)]) { MTRDeviceController * strongController = mDeviceController; if (strongController) { NSData * dacData = AsData(info.dacDerBuffer()); @@ -44,18 +43,18 @@ NSError * error = (attestationResult == chip::Credentials::AttestationVerificationResult::kSuccess) ? nil : [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTEGRITY_CHECK_FAILED]; - [strongDelegate deviceAttestationCompletedForController:mDeviceController - device:device - attestationDeviceInfo:deviceInfo - error:error]; + [strongDelegate deviceAttestation:mDeviceController + completedForDevice:device + attestationDeviceInfo:deviceInfo + error:error]; } } else if ((attestationResult != chip::Credentials::AttestationVerificationResult::kSuccess) && - [strongDelegate respondsToSelector:@selector(deviceAttestationFailedForController:device:error:)]) { + [strongDelegate respondsToSelector:@selector(deviceAttestation:failedForDevice:error:)]) { MTRDeviceController * strongController = mDeviceController; if (strongController) { NSError * error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTEGRITY_CHECK_FAILED]; - [strongDelegate deviceAttestationFailedForController:mDeviceController device:device error:error]; + [strongDelegate deviceAttestation:mDeviceController failedForDevice:device error:error]; } } }); diff --git a/src/darwin/Framework/CHIP/MTRDeviceController+XPC.h b/src/darwin/Framework/CHIP/MTRDeviceController+XPC.h index eeafb821dd54f8..4913823964b314 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController+XPC.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController+XPC.h @@ -22,12 +22,6 @@ NS_ASSUME_NONNULL_BEGIN -typedef NSXPCConnection * _Nonnull (^MTRXPCConnectBlock)(void); - -typedef void (^MTRDeviceControllerGetterHandler)(id _Nullable controller, NSError * _Nullable error); - -typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error); - /** * Extended methods for MTRDeviceController object over XPC */ @@ -36,12 +30,11 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error) /** * Returns a shared device controller proxy for the controller object over XPC connection. * - * @param controllerID an implementation specific id in case multiple shared device controllers are available over XPC connection - * @param xpcConnectBlock block to connect to an XPC listener serving the shared device controllers in an implementation specific - * way + * @param controllerId an implementation specific id in case multiple shared device controllers are available over XPC connection + * @param connectBlock block to connect to an XPC listener serving the shared device controllers in an implementation specific way */ -+ (MTRDeviceController *)sharedControllerWithID:(id _Nullable)controllerID - xpcConnectBlock:(MTRXPCConnectBlock)xpcConnectBlock; ++ (MTRDeviceController *)sharedControllerWithId:(id _Nullable)controllerId + xpcConnectBlock:(NSXPCConnection * (^)(void) )connectBlock; /** * Returns an encoded values object to send over XPC for read, write and command interactions @@ -68,12 +61,12 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error) /** * Returns a serialized subscribe parameter object to send over XPC */ -+ (NSDictionary *)encodeXPCSubscribeParams:(MTRSubscribeParams *)params; ++ (NSDictionary * _Nullable)encodeXPCSubscribeParams:(MTRSubscribeParams *)params; /** * Returns a deserialized subscribe parameter object from an object received over XPC */ -+ (MTRSubscribeParams *)decodeXPCSubscribeParams:(NSDictionary *)params; ++ (MTRSubscribeParams * _Nullable)decodeXPCSubscribeParams:(NSDictionary * _Nullable)params; @end /** @@ -82,84 +75,89 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error) @protocol MTRDeviceControllerServerProtocol /** - * Gets device controller ID corresponding to a specific fabric ID + * Gets device controller ID corresponding to a specific fabric Id */ -- (void)getDeviceControllerWithFabricID:(NSNumber *)fabricID completion:(MTRDeviceControllerGetterHandler)completion; +- (void)getDeviceControllerWithFabricId:(uint64_t)fabricId + completion:(void (^)(id _Nullable controller, NSError * _Nullable error))completion; /** * Gets any available device controller ID */ -- (void)getAnyDeviceControllerWithCompletion:(MTRDeviceControllerGetterHandler)completion; +- (void)getAnyDeviceControllerWithCompletion:(void (^)(id _Nullable controller, NSError * _Nullable error))completion; /** * Requests reading attribute */ - (void)readAttributeWithController:(id _Nullable)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID + nodeId:(uint64_t)nodeId + endpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId params:(NSDictionary * _Nullable)params - completion:(MTRValuesHandler)completion; + completion:(void (^)(id _Nullable values, NSError * _Nullable error))completion; /** * Requests writing attribute */ - (void)writeAttributeWithController:(id _Nullable)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - attributeID:(NSNumber *)attributeID + nodeId:(uint64_t)nodeId + endpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + attributeId:(NSNumber *)attributeId value:(id)value timedWriteTimeout:(NSNumber * _Nullable)timeoutMs - completion:(MTRValuesHandler)completion; + completion:(void (^)(id _Nullable values, NSError * _Nullable error))completion; /** * Requests invoking command */ - (void)invokeCommandWithController:(id _Nullable)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - commandID:(NSNumber *)commandID + nodeId:(uint64_t)nodeId + endpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + commandId:(NSNumber *)commandId fields:(id)fields timedInvokeTimeout:(NSNumber * _Nullable)timeoutMs - completion:(MTRValuesHandler)completion; + completion:(void (^)(id _Nullable values, NSError * _Nullable error))completion; /** * Requests subscribing attribute */ - (void)subscribeAttributeWithController:(id _Nullable)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - params:(NSDictionary *)params - establishedHandler:(dispatch_block_t)establishedHandler; + nodeId:(uint64_t)nodeId + endpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + minInterval:(NSNumber *)minInterval + maxInterval:(NSNumber *)maxInterval + params:(NSDictionary * _Nullable)params + establishedHandler:(void (^)(void))establishedHandler; /** * Requests to stop reporting */ -- (void)stopReportsWithController:(id _Nullable)controller nodeID:(NSNumber *)nodeID completion:(dispatch_block_t)completion; +- (void)stopReportsWithController:(id _Nullable)controller nodeId:(uint64_t)nodeId completion:(void (^)(void))completion; /** * Requests subscription of all attributes. */ - (void)subscribeWithController:(id _Nullable)controller - nodeID:(NSNumber *)nodeID - params:(NSDictionary *)params + nodeId:(uint64_t)nodeId + minInterval:(NSNumber *)minInterval + maxInterval:(NSNumber *)maxInterval + params:(NSDictionary * _Nullable)params shouldCache:(BOOL)shouldCache - completion:(MTRStatusCompletion)completion; + completion:(void (^)(NSError * _Nullable error))completion; /** * Requests reading attribute cache */ -- (void)readClusterStateCacheWithController:(id _Nullable)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - completion:(MTRValuesHandler)completion; +- (void)readAttributeCacheWithController:(id _Nullable)controller + nodeId:(uint64_t)nodeId + endpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + completion:(void (^)(id _Nullable values, NSError * _Nullable error))completion; @end @@ -172,7 +170,7 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error) * Handles a report received by a device controller */ - (void)handleReportWithController:(id _Nullable)controller - nodeID:(NSNumber *)nodeID + nodeId:(uint64_t)nodeId values:(id _Nullable)values error:(NSError * _Nullable)error; diff --git a/src/darwin/Framework/CHIP/MTRDeviceController+XPC.m b/src/darwin/Framework/CHIP/MTRDeviceController+XPC.m index ca68d1102d4e71..6dc425eba5cd7c 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController+XPC.m +++ b/src/darwin/Framework/CHIP/MTRDeviceController+XPC.m @@ -26,8 +26,6 @@ static NSString * const kFabricFilteredKey = @"fabricFiltered"; static NSString * const kKeepPreviousSubscriptionsKey = @"keepPreviousSubscriptions"; static NSString * const kAutoResubscribeKey = @"autoResubscribe"; -static NSString * const kMinIntervalKey = @"minInterval"; -static NSString * const kMaxIntervalKey = @"maxInterval"; static NSArray * _Nullable encodeAttributePath(MTRAttributePath * _Nullable path) { @@ -50,7 +48,7 @@ if (pathArray == nil || [pathArray count] != 3) { return nil; } - return [MTRAttributePath attributePathWithEndpointID:pathArray[0] clusterID:pathArray[1] attributeID:pathArray[2]]; + return [MTRAttributePath attributePathWithEndpointId:pathArray[0] clusterId:pathArray[1] attributeId:pathArray[2]]; } static MTRCommandPath * _Nullable decodeCommandPath(NSArray * _Nullable pathArray) @@ -58,20 +56,20 @@ if (pathArray == nil || [pathArray count] != 3) { return nil; } - return [MTRCommandPath commandPathWithEndpointID:pathArray[0] clusterID:pathArray[1] commandID:pathArray[2]]; + return [MTRCommandPath commandPathWithEndpointId:pathArray[0] clusterId:pathArray[1] commandId:pathArray[2]]; } static void decodeReadParams(NSDictionary * inParams, MTRReadParams * outParams) { - outParams.fabricFiltered = [inParams[kFabricFilteredKey] boolValue]; + outParams.fabricFiltered = inParams[kFabricFilteredKey]; } @implementation MTRDeviceController (XPC) -+ (MTRDeviceController *)sharedControllerWithID:(id _Nullable)controllerID - xpcConnectBlock:(MTRXPCConnectBlock)xpcConnectBlock ++ (MTRDeviceController *)sharedControllerWithId:(id _Nullable)controllerId + xpcConnectBlock:(NSXPCConnection * (^)(void) )connectBlock { - return [MTRDeviceControllerOverXPC sharedControllerWithID:controllerID xpcConnectBlock:xpcConnectBlock]; + return [MTRDeviceControllerOverXPC sharedControllerWithId:controllerId xpcConnectBlock:connectBlock]; } + (NSArray *> * _Nullable)encodeXPCResponseValues: @@ -129,7 +127,9 @@ + (MTRDeviceController *)sharedControllerWithID:(id _Nullable)control return nil; } NSMutableDictionary * result = [NSMutableDictionary dictionary]; - result[kFabricFilteredKey] = @(params.fabricFiltered); + if (params.fabricFiltered) { + result[kFabricFilteredKey] = params.fabricFiltered; + } return result; } @@ -143,24 +143,31 @@ + (MTRReadParams * _Nullable)decodeXPCReadParams:(NSDictionary * return result; } -+ (NSDictionary *)encodeXPCSubscribeParams:(MTRSubscribeParams *)params ++ (NSDictionary * _Nullable)encodeXPCSubscribeParams:(MTRSubscribeParams *)params { + if (!params) { + return nil; + } NSMutableDictionary * result = [NSMutableDictionary dictionaryWithDictionary:[MTRDeviceController encodeXPCReadParams:params]]; - result[kKeepPreviousSubscriptionsKey] = @(params.keepPreviousSubscriptions); - result[kAutoResubscribeKey] = @(params.autoResubscribe); - result[kMinIntervalKey] = params.minInterval; - result[kMaxIntervalKey] = params.maxInterval; + if (params.keepPreviousSubscriptions) { + result[kKeepPreviousSubscriptionsKey] = params.keepPreviousSubscriptions; + } + if (params.autoResubscribe) { + result[kAutoResubscribeKey] = params.autoResubscribe; + } return result; } -+ (MTRSubscribeParams *)decodeXPCSubscribeParams:(NSDictionary *)params ++ (MTRSubscribeParams * _Nullable)decodeXPCSubscribeParams:(NSDictionary * _Nullable)params { - MTRSubscribeParams * result = [[MTRSubscribeParams alloc] initWithMinInterval:params[kMinIntervalKey] - maxInterval:params[kMaxIntervalKey]]; + if (!params) { + return nil; + } + MTRSubscribeParams * result = [[MTRSubscribeParams alloc] init]; decodeReadParams(params, result); - result.keepPreviousSubscriptions = [params[kKeepPreviousSubscriptionsKey] boolValue]; - result.autoResubscribe = [params[kAutoResubscribeKey] boolValue]; + result.keepPreviousSubscriptions = params[kKeepPreviousSubscriptionsKey]; + result.autoResubscribe = params[kAutoResubscribeKey]; return result; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index 8bf5e0dcc1b76e..a7467520083af9 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -18,98 +18,107 @@ #import #import +#import @class MTRBaseDevice; NS_ASSUME_NONNULL_BEGIN +typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NSError * _Nullable error); + @class MTRCommissioningParameters; -@protocol MTRDeviceControllerDelegate; -@class MTRSetupPayload; +@protocol MTRDevicePairingDelegate; @interface MTRDeviceController : NSObject -/** - * If true, the controller has not been shut down yet. - */ -@property (readonly, nonatomic, getter=isRunning) BOOL running; +@property (readonly, nonatomic) BOOL isRunning; /** - * Return the Node ID assigned to the controller. Will return nil if the + * Return the Node Id assigned to the controller. Will return nil if the * controller is not running (and hence does not know its node id). */ -@property (readonly, nonatomic, nullable) NSNumber * controllerNodeID; +@property (readonly, nonatomic, nullable) NSNumber * controllerNodeId; /** - * Set up a commissioning session for a device, using the provided setup payload - * to discover it and connect to it. - * - * @param payload a setup payload (probably created from a QR code or numeric - * code onboarding payload). - * @param newNodeID the planned node id for the node. - * @error error indication if discovery can't start at all (e.g. because the - * setup payload is invalid). + * Start pairing for a device with the given ID, using the provided setup PIN + * to establish a PASE connection. * * The IP and port for the device will be discovered automatically based on the * provided discriminator. * - * Then a PASE session will be established with the device, unless an error - * occurs. MTRDeviceControllerDelegate will be notified as follows: - * - * * Discovery fails: onStatusUpdate with MTRCommissioningStatusFailed. - * - * * Discovery succeeds but commissioning session setup fails: onPairingComplete - * with an error. - * - * * Commissioning session setup succeeds: onPairingComplete with no error. - * - * Once a commissioning session is set up, deviceBeingCommissionedWithNodeID - * can be used to get an MTRBaseDevice and discover what sort of network - * credentials the device might need, and commissionNodeWithID can be used to - * commission the device. + * The pairing process will proceed until a PASE session is established or an + * error occurs, then notify onPairingComplete on the MTRDevicePairingDelegate + * for this controller. That delegate is expected to call commissionDevice + * after that point if it wants to commission the device. */ -- (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload - newNodeID:(NSNumber *)newNodeID - error:(NSError * __autoreleasing *)error; +- (BOOL)pairDevice:(uint64_t)deviceID + discriminator:(uint16_t)discriminator + setupPINCode:(uint32_t)setupPINCode + error:(NSError * __autoreleasing *)error; /** - * Commission the node with the given node ID. The node ID must match the node - * ID that was used to set up the commissioning session. + * Start pairing for a device with the given ID, using the provided IP address + * and port to connect to the device and the provided setup PIN to establish a + * PASE connection. + * + * The pairing process will proceed until a PASE session is established or an + * error occurs, then notify onPairingComplete on the MTRDevicePairingDelegate + * for this controller. That delegate is expected to call commissionDevice + * after that point if it wants to commission the device. */ -- (BOOL)commissionNodeWithID:(NSNumber *)nodeID - commissioningParams:(MTRCommissioningParameters *)commissioningParams - error:(NSError * __autoreleasing *)error; +- (BOOL)pairDevice:(uint64_t)deviceID + address:(NSString *)address + port:(uint16_t)port + setupPINCode:(uint32_t)setupPINCode + error:(NSError * __autoreleasing *)error; + +/** + * Start pairing for a device with the given ID and onboarding payload (QR code + * or manual setup code). The payload will be used to discover the device and + * establish a PASE connection. + * + * The pairing process will proceed until a PASE session is established or an + * error occurs, then notify onPairingComplete on the MTRDevicePairingDelegate + * for this controller. That delegate is expected to call commissionDevice + * after that point if it wants to commission the device. + */ +- (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPayload error:(NSError * __autoreleasing *)error; +- (BOOL)commissionDevice:(uint64_t)deviceId + commissioningParams:(MTRCommissioningParameters *)commissioningParams + error:(NSError * __autoreleasing *)error; - (BOOL)continueCommissioningDevice:(void *)device ignoreAttestationFailure:(BOOL)ignoreAttestationFailure error:(NSError * __autoreleasing *)error; -/** - * Cancel commissioning for the given node id. This will shut down any existing - * commissioning session for that node id. - */ -- (BOOL)cancelCommissioningForNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error; +- (BOOL)stopDevicePairing:(uint64_t)deviceID error:(NSError * __autoreleasing *)error; -/** - * Get an MTRBaseDevice for a commissioning session that was set up for the - * given node ID. Returns nil if no such commissioning session is available. - */ -- (nullable MTRBaseDevice *)deviceBeingCommissionedWithNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error; +- (nullable MTRBaseDevice *)getDeviceBeingCommissioned:(uint64_t)deviceId error:(NSError * __autoreleasing *)error; +- (BOOL)getBaseDevice:(uint64_t)deviceID + queue:(dispatch_queue_t)queue + completionHandler:(MTRDeviceConnectionCallback)completionHandler; + +- (BOOL)openPairingWindow:(uint64_t)deviceID duration:(NSUInteger)duration error:(NSError * __autoreleasing *)error; +- (nullable NSString *)openPairingWindowWithPIN:(uint64_t)deviceID + duration:(NSUInteger)duration + discriminator:(NSUInteger)discriminator + setupPIN:(NSUInteger)setupPIN + error:(NSError * __autoreleasing *)error; /** - * Controllers are created via the MTRDeviceControllerFactory object. + * Controllers are created via the MTRControllerFactory object. */ - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; /** - * Set the Delegate for the device controller as well as the Queue on which the Delegate callbacks will be triggered + * Set the Delegate for the Device Pairing as well as the Queue on which the Delegate callbacks will be triggered * - * @param[in] delegate The delegate the commissioning process should use + * @param[in] delegate The delegate the pairing process should use * * @param[in] queue The queue on which the callbacks will be delivered */ -- (void)setDeviceControllerDelegate:(id)delegate queue:(dispatch_queue_t)queue; +- (void)setPairingDelegate:(id)delegate queue:(dispatch_queue_t)queue; /** * Sets this MTRDeviceController to use the given issuer for issuing operational certs. By default, the MTRDeviceController uses an @@ -131,27 +140,22 @@ NS_ASSUME_NONNULL_BEGIN * Attempts to retrieve the attestation challenge for a commissionee with the given Device ID. * Returns nil if given Device ID does not match an active commissionee, or if a Secure Session is not availale. */ -- (NSData * _Nullable)fetchAttestationChallengeForDeviceID:(NSNumber *)deviceID; +- (nullable NSData *)fetchAttestationChallengeForDeviceId:(uint64_t)deviceId; /** - * Compute a PASE verifier for the desired setup passcode. + * Compute a PASE verifier and passcode ID for the desired setup pincode. * - * @param[in] setupPasscode The desired passcode to use. - * @param[in] iterations The number of iterations to use when generating the verifier. - * @param[in] salt The 16-byte salt for verifier computation. + * @param[in] setupPincode The desired PIN code to use + * @param[in] iterations The number of iterations to use when generating the verifier + * @param[in] salt The 16-byte salt for verifier computation * * Returns nil on errors (e.g. salt has the wrong size), otherwise the computed * verifier bytes. */ -+ (nullable NSData *)computePASEVerifierForSetupPasscode:(NSNumber *)setupPasscode - iterations:(NSNumber *)iterations - salt:(NSData *)salt - error:(NSError * __autoreleasing *)error; +- (nullable NSData *)computePaseVerifier:(uint32_t)setupPincode iterations:(uint32_t)iterations salt:(NSData *)salt; /** - * Shut down the controller. Calls to shutdown after the first one are NO-OPs. - * This must be called, either directly or via shutting down the - * MTRDeviceControllerFactory, to avoid leaking the controller. + * Shutdown the controller. Calls to shutdown after the first one are NO-OPs. */ - (void)shutdown; diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 85b37f3aae9310..7ff7d59a80072d 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -20,10 +20,10 @@ #import "MTRBaseDevice_Internal.h" #import "MTRCommissioningParameters.h" -#import "MTRDeviceControllerDelegateBridge.h" -#import "MTRDeviceControllerFactory_Internal.h" +#import "MTRControllerFactory_Internal.h" #import "MTRDeviceControllerStartupParams.h" #import "MTRDeviceControllerStartupParams_Internal.h" +#import "MTRDevicePairingDelegateBridge.h" #import "MTRDevice_Internal.h" #import "MTRError_Internal.h" #import "MTRKeypair.h" @@ -44,6 +44,7 @@ #include #include +#include #include #include #include @@ -73,8 +74,6 @@ static NSString * const kErrorCSRValidation = @"Extracting public key from CSR failed"; static NSString * const kErrorGetCommissionee = @"Failure obtaining device being commissioned"; static NSString * const kErrorGetAttestationChallenge = @"Failure getting attestation challenge"; -static NSString * const kErrorSpake2pVerifierGenerationFailed = @"PASE verifier generation failed"; -static NSString * const kErrorSpake2pVerifierSerializationFailed = @"PASE verifier serialization failed"; @interface MTRDeviceController () @@ -83,19 +82,19 @@ @interface MTRDeviceController () @property (readonly) chip::Controller::DeviceCommissioner * cppCommissioner; @property (readonly) chip::Credentials::PartialDACVerifier * partialDACVerifier; -@property (readonly) MTRDeviceControllerDelegateBridge * deviceControllerDelegateBridge; +@property (readonly) MTRDevicePairingDelegateBridge * pairingDelegateBridge; @property (readonly) MTROperationalCredentialsDelegate * operationalCredentialsDelegate; @property (readonly) MTRP256KeypairBridge signingKeypairBridge; @property (readonly) MTRP256KeypairBridge operationalKeypairBridge; @property (readonly) MTRDeviceAttestationDelegateBridge * deviceAttestationDelegateBridge; -@property (readonly) MTRDeviceControllerFactory * factory; +@property (readonly) MTRControllerFactory * factory; @property (readonly) NSMutableDictionary * nodeIDToDeviceMap; @property (readonly) os_unfair_lock deviceMapLock; // protects nodeIDToDeviceMap @end @implementation MTRDeviceController -- (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory queue:(dispatch_queue_t)queue +- (instancetype)initWithFactory:(MTRControllerFactory *)factory queue:(dispatch_queue_t)queue { if (self = [super init]) { _chipWorkQueue = queue; @@ -103,8 +102,8 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory queue:(dis _deviceMapLock = OS_UNFAIR_LOCK_INIT; _nodeIDToDeviceMap = [NSMutableDictionary dictionary]; - _deviceControllerDelegateBridge = new MTRDeviceControllerDelegateBridge(); - if ([self checkForInitError:(_deviceControllerDelegateBridge != nullptr) logMsg:kErrorPairingInit]) { + _pairingDelegateBridge = new MTRDevicePairingDelegateBridge(); + if ([self checkForInitError:(_pairingDelegateBridge != nullptr) logMsg:kErrorPairingInit]) { return nil; } @@ -144,7 +143,7 @@ - (void)cleanupAfterStartup } // Part of cleanupAfterStartup that has to interact with the Matter work queue -// in a very specific way that only MTRDeviceControllerFactory knows about. +// in a very specific way that only MTRControllerFactory knows about. - (void)shutDownCppController { if (_cppCommissioner) { @@ -183,9 +182,9 @@ - (void)cleanup _partialDACVerifier = nullptr; } - if (_deviceControllerDelegateBridge) { - delete _deviceControllerDelegateBridge; - _deviceControllerDelegateBridge = nullptr; + if (_pairingDelegateBridge) { + delete _pairingDelegateBridge; + _pairingDelegateBridge = nullptr; } } @@ -202,13 +201,13 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams return; } - if (startupParams.vendorID == nil || [startupParams.vendorID unsignedShortValue] == chip::VendorId::Common) { + if (startupParams.vendorId == nil || [startupParams.vendorId unsignedShortValue] == chip::VendorId::Common) { // Shouldn't be using the "standard" vendor ID for actual devices. - MTR_LOG_ERROR("%@ is not a valid vendorID to initialize a device controller with", startupParams.vendorID); + MTR_LOG_ERROR("%@ is not a valid vendorId to initialize a device controller with", startupParams.vendorId); return; } - if (startupParams.operationalCertificate == nil && startupParams.nodeID == nil) { + if (startupParams.operationalCertificate == nil && startupParams.nodeId == nil) { MTR_LOG_ERROR("Can't start a controller if we don't know what node id it is"); return; } @@ -255,7 +254,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams chip::Controller::SetupParams commissionerParams; - commissionerParams.pairingDelegate = _deviceControllerDelegateBridge; + commissionerParams.pairingDelegate = _pairingDelegateBridge; _operationalCredentialsDelegate->SetDeviceCommissioner(_cppCommissioner); @@ -279,9 +278,8 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams chip::MutableByteSpan noc(nocBuffer); if (commissionerParams.operationalKeypair != nullptr) { - errorCode = _operationalCredentialsDelegate->GenerateNOC([startupParams.nodeID unsignedLongLongValue], - [startupParams.fabricID unsignedLongLongValue], chip::kUndefinedCATs, - commissionerParams.operationalKeypair->Pubkey(), noc); + errorCode = _operationalCredentialsDelegate->GenerateNOC([startupParams.nodeId unsignedLongLongValue], + startupParams.fabricId, chip::kUndefinedCATs, commissionerParams.operationalKeypair->Pubkey(), noc); if ([self checkForStartError:errorCode logMsg:kErrorGenerateNOC]) { return; @@ -301,8 +299,8 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams return; } - errorCode = _operationalCredentialsDelegate->GenerateNOC([startupParams.nodeID unsignedLongLongValue], - [startupParams.fabricID unsignedLongLongValue], chip::kUndefinedCATs, pubKey, noc); + errorCode = _operationalCredentialsDelegate->GenerateNOC( + [startupParams.nodeId unsignedLongLongValue], startupParams.fabricId, chip::kUndefinedCATs, pubKey, noc); if ([self checkForStartError:errorCode logMsg:kErrorGenerateNOC]) { return; @@ -310,7 +308,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams } commissionerParams.controllerNOC = noc; } - commissionerParams.controllerVendorId = static_cast([startupParams.vendorID unsignedShortValue]); + commissionerParams.controllerVendorId = static_cast([startupParams.vendorId unsignedShortValue]); commissionerParams.deviceAttestationVerifier = _factory.deviceAttestationVerifier; auto & factory = chip::Controller::DeviceControllerFactory::GetInstance(); @@ -345,7 +343,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams return commissionerInitialized; } -- (NSNumber *)controllerNodeID +- (NSNumber *)controllerNodeId { if (![self isRunning]) { MTR_LOG_ERROR("A controller has no node id if it has not been started"); @@ -363,9 +361,10 @@ - (NSNumber *)controllerNodeID return nodeID; } -- (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload - newNodeID:(NSNumber *)newNodeID - error:(NSError * __autoreleasing *)error; +- (BOOL)pairDevice:(uint64_t)deviceID + discriminator:(uint16_t)discriminator + setupPINCode:(uint32_t)setupPINCode + error:(NSError * __autoreleasing *)error { VerifyOrReturnValue([self checkIsRunning:error], NO); @@ -373,29 +372,67 @@ - (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload dispatch_sync(_chipWorkQueue, ^{ VerifyOrReturn([self checkIsRunning:error]); - // Try to get a QR code if possible (because it has a better - // discriminator, etc), then fall back to manual code if that fails. - NSString * pairingCode = [payload qrCodeString]; - if (pairingCode == nil) { - pairingCode = [payload manualEntryCode]; - } - if (pairingCode == nil) { - success = ![MTRDeviceController checkForError:CHIP_ERROR_INVALID_ARGUMENT logMsg:kErrorSetupCodeGen error:error]; - return; - } + std::string manualPairingCode; + chip::SetupPayload payload; + payload.discriminator.SetLongValue(discriminator); + payload.setUpPINCode = setupPINCode; + + auto errorCode = chip::ManualSetupPayloadGenerator(payload).payloadDecimalStringRepresentation(manualPairingCode); + success = ![self checkForError:errorCode logMsg:kErrorSetupCodeGen error:error]; + VerifyOrReturn(success); + + _operationalCredentialsDelegate->SetDeviceID(deviceID); + errorCode = self.cppCommissioner->EstablishPASEConnection(deviceID, manualPairingCode.c_str()); + success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; + }); + + return success; +} - chip::NodeId nodeId = [newNodeID unsignedLongLongValue]; - _operationalCredentialsDelegate->SetDeviceID(nodeId); - CHIP_ERROR errorCode = self.cppCommissioner->EstablishPASEConnection(nodeId, [pairingCode UTF8String]); - success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorPairDevice error:error]; +- (BOOL)pairDevice:(uint64_t)deviceID + address:(NSString *)address + port:(uint16_t)port + setupPINCode:(uint32_t)setupPINCode + error:(NSError * __autoreleasing *)error +{ + VerifyOrReturnValue([self checkIsRunning:error], NO); + + __block BOOL success = NO; + dispatch_sync(_chipWorkQueue, ^{ + VerifyOrReturn([self checkIsRunning:error]); + + chip::Inet::IPAddress addr; + chip::Inet::IPAddress::FromString([address UTF8String], addr); + chip::Transport::PeerAddress peerAddress = chip::Transport::PeerAddress::UDP(addr, port); + + _operationalCredentialsDelegate->SetDeviceID(deviceID); + + auto params = chip::RendezvousParameters().SetSetupPINCode(setupPINCode).SetPeerAddress(peerAddress); + auto errorCode = self.cppCommissioner->EstablishPASEConnection(deviceID, params); + success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; }); return success; } -- (BOOL)commissionNodeWithID:(NSNumber *)nodeID - commissioningParams:(MTRCommissioningParameters *)commissioningParams - error:(NSError * __autoreleasing *)error +- (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPayload error:(NSError * __autoreleasing *)error +{ + VerifyOrReturnValue([self checkIsRunning:error], NO); + + __block BOOL success = NO; + dispatch_sync(_chipWorkQueue, ^{ + VerifyOrReturn([self checkIsRunning:error]); + + _operationalCredentialsDelegate->SetDeviceID(deviceID); + auto errorCode = self.cppCommissioner->EstablishPASEConnection(deviceID, [onboardingPayload UTF8String]); + success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; + }); + return success; +} + +- (BOOL)commissionDevice:(uint64_t)deviceId + commissioningParams:(MTRCommissioningParameters *)commissioningParams + error:(NSError * __autoreleasing *)error { VerifyOrReturnValue([self checkIsRunning:error], NO); @@ -404,8 +441,8 @@ - (BOOL)commissionNodeWithID:(NSNumber *)nodeID VerifyOrReturn([self checkIsRunning:error]); chip::Controller::CommissioningParameters params; - if (commissioningParams.csrNonce) { - params.SetCSRNonce(AsByteSpan(commissioningParams.csrNonce)); + if (commissioningParams.CSRNonce) { + params.SetCSRNonce(AsByteSpan(commissioningParams.CSRNonce)); } if (commissioningParams.attestationNonce) { params.SetAttestationNonce(AsByteSpan(commissioningParams.attestationNonce)); @@ -426,13 +463,13 @@ - (BOOL)commissionNodeWithID:(NSNumber *)nodeID [self clearDeviceAttestationDelegateBridge]; chip::Optional timeoutSecs; - if (commissioningParams.failSafeExpiryTimeout) { + if (commissioningParams.failSafeExpiryTimeoutSecs) { timeoutSecs - = chip::MakeOptional(static_cast([commissioningParams.failSafeExpiryTimeout unsignedIntValue])); + = chip::MakeOptional(static_cast([commissioningParams.failSafeExpiryTimeoutSecs unsignedIntValue])); } BOOL shouldWaitAfterDeviceAttestation = NO; if ([commissioningParams.deviceAttestationDelegate - respondsToSelector:@selector(deviceAttestationCompletedForController:device:attestationDeviceInfo:error:)]) { + respondsToSelector:@selector(deviceAttestation:completedForDevice:attestationDeviceInfo:error:)]) { shouldWaitAfterDeviceAttestation = YES; } _deviceAttestationDelegateBridge = new MTRDeviceAttestationDelegateBridge( @@ -440,10 +477,9 @@ - (BOOL)commissionNodeWithID:(NSNumber *)nodeID params.SetDeviceAttestationDelegate(_deviceAttestationDelegateBridge); } - chip::NodeId deviceId = [nodeID unsignedLongLongValue]; _operationalCredentialsDelegate->SetDeviceID(deviceId); auto errorCode = self.cppCommissioner->Commission(deviceId, params); - success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorPairDevice error:error]; + success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; }); return success; } @@ -465,12 +501,12 @@ - (BOOL)continueCommissioningDevice:(void *)device auto deviceProxy = static_cast(device); auto errorCode = self.cppCommissioner->ContinueCommissioningAfterDeviceAttestation(deviceProxy, ignoreAttestationFailure ? chip::Credentials::AttestationVerificationResult::kSuccess : lastAttestationResult); - success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorPairDevice error:error]; + success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; }); return success; } -- (BOOL)cancelCommissioningForNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error +- (BOOL)stopDevicePairing:(uint64_t)deviceID error:(NSError * __autoreleasing *)error { VerifyOrReturnValue([self checkIsRunning:error], NO); @@ -479,13 +515,14 @@ - (BOOL)cancelCommissioningForNodeID:(NSNumber *)nodeID error:(NSError * __autor VerifyOrReturn([self checkIsRunning:error]); _operationalCredentialsDelegate->ResetDeviceID(); - auto errorCode = self.cppCommissioner->StopPairing([nodeID unsignedLongLongValue]); - success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorStopPairing error:error]; + auto errorCode = self.cppCommissioner->StopPairing(deviceID); + success = ![self checkForError:errorCode logMsg:kErrorStopPairing error:error]; }); + return success; } -- (MTRBaseDevice *)deviceBeingCommissionedWithNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error +- (MTRBaseDevice *)getDeviceBeingCommissioned:(uint64_t)deviceId error:(NSError * __autoreleasing *)error { VerifyOrReturnValue([self checkIsRunning:error], nil); @@ -495,8 +532,8 @@ - (MTRBaseDevice *)deviceBeingCommissionedWithNodeID:(NSNumber *)nodeID error:(N VerifyOrReturn([self checkIsRunning:error]); chip::CommissioneeDeviceProxy * deviceProxy; - auto errorCode = self->_cppCommissioner->GetDeviceBeingCommissioned([nodeID unsignedLongLongValue], &deviceProxy); - success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorStopPairing error:error]; + auto errorCode = self->_cppCommissioner->GetDeviceBeingCommissioned(deviceId, &deviceProxy); + success = ![self checkForError:errorCode logMsg:kErrorStopPairing error:error]; device = [[MTRBaseDevice alloc] initWithPASEDevice:deviceProxy controller:self]; }); VerifyOrReturnValue(success, nil); @@ -504,18 +541,45 @@ - (MTRBaseDevice *)deviceBeingCommissionedWithNodeID:(NSNumber *)nodeID error:(N return device; } -- (MTRBaseDevice *)baseDeviceForNodeID:(NSNumber *)nodeID +- (BOOL)getBaseDevice:(uint64_t)deviceID + queue:(dispatch_queue_t)queue + completionHandler:(MTRDeviceConnectionCallback)completionHandler { - return [[MTRBaseDevice alloc] initWithNodeID:nodeID controller:self]; -} + NSError * error; + if (![self checkIsRunning:&error]) { + dispatch_async(queue, ^{ + completionHandler(nil, error); + }); + return NO; + } -- (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID + // 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); + }); + }]; +} + +- (MTRDevice *)deviceForNodeID:(uint64_t)nodeID { os_unfair_lock_lock(&_deviceMapLock); - MTRDevice * deviceToReturn = self.nodeIDToDeviceMap[nodeID]; + MTRDevice * deviceToReturn = self.nodeIDToDeviceMap[@(nodeID)]; if (!deviceToReturn) { - deviceToReturn = [[MTRDevice alloc] initWithNodeID:nodeID controller:self]; - self.nodeIDToDeviceMap[nodeID] = deviceToReturn; + deviceToReturn = [[MTRDevice alloc] initWithNodeID:nodeID deviceController:self]; + self.nodeIDToDeviceMap[@(nodeID)] = deviceToReturn; } os_unfair_lock_unlock(&_deviceMapLock); @@ -525,23 +589,107 @@ - (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID - (void)removeDevice:(MTRDevice *)device { os_unfair_lock_lock(&_deviceMapLock); - MTRDevice * deviceToRemove = self.nodeIDToDeviceMap[device.nodeID]; + MTRDevice * deviceToRemove = self.nodeIDToDeviceMap[@(device.nodeID)]; if (deviceToRemove == device) { - self.nodeIDToDeviceMap[device.nodeID] = nil; + self.nodeIDToDeviceMap[@(device.nodeID)] = nil; } else { - MTR_LOG_ERROR("Error: Cannot remove device %p with nodeID %llu", device, [device.nodeID unsignedLongLongValue]); + MTR_LOG_ERROR("Error: Cannot remove device %p with nodeID %llu", device, device.nodeID); } os_unfair_lock_unlock(&_deviceMapLock); } -- (void)setDeviceControllerDelegate:(id)delegate queue:(dispatch_queue_t)queue +- (BOOL)openPairingWindow:(uint64_t)deviceID duration:(NSUInteger)duration error:(NSError * __autoreleasing *)error +{ + VerifyOrReturnValue([self checkIsRunning:error], NO); + + if (duration > UINT16_MAX) { + MTR_LOG_ERROR("Error: Duration %tu is too large. Max value %d", duration, UINT16_MAX); + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_INTEGER_VALUE]; + } + return NO; + } + + __block BOOL success = NO; + dispatch_sync(_chipWorkQueue, ^{ + VerifyOrReturn([self checkIsRunning:error]); + + auto errorCode = chip::Controller::AutoCommissioningWindowOpener::OpenBasicCommissioningWindow( + self.cppCommissioner, deviceID, chip::System::Clock::Seconds16(static_cast(duration))); + success = ![self checkForError:errorCode logMsg:kErrorOpenPairingWindow error:error]; + }); + + return success; +} + +- (NSString *)openPairingWindowWithPIN:(uint64_t)deviceID + duration:(NSUInteger)duration + discriminator:(NSUInteger)discriminator + setupPIN:(NSUInteger)setupPIN + error:(NSError * __autoreleasing *)error +{ + __block NSString * rv = nil; + + VerifyOrReturnValue([self checkIsRunning:error], rv); + + if (duration > UINT16_MAX) { + MTR_LOG_ERROR("Error: Duration %tu is too large. Max value %d", duration, UINT16_MAX); + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_INTEGER_VALUE]; + } + return rv; + } + + if (discriminator > 0xfff) { + MTR_LOG_ERROR("Error: Discriminator %tu is too large. Max value %d", discriminator, 0xfff); + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_INTEGER_VALUE]; + } + return rv; + } + + if (!chip::CanCastTo(setupPIN) || !chip::SetupPayload::IsValidSetupPIN(static_cast(setupPIN))) { + MTR_LOG_ERROR("Error: Setup pin %lu is not valid", static_cast(setupPIN)); + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_INTEGER_VALUE]; + } + return rv; + } + + dispatch_sync(_chipWorkQueue, ^{ + VerifyOrReturn([self checkIsRunning:error]); + + chip::SetupPayload setupPayload; + auto errorCode = chip::Controller::AutoCommissioningWindowOpener::OpenCommissioningWindow(self.cppCommissioner, deviceID, + chip::System::Clock::Seconds16(static_cast(duration)), chip::Crypto::kSpake2p_Min_PBKDF_Iterations, + static_cast(discriminator), chip::MakeOptional(static_cast(setupPIN)), chip::NullOptional, + setupPayload); + + auto success = ![self checkForError:errorCode logMsg:kErrorOpenPairingWindow error:error]; + VerifyOrReturn(success); + + chip::ManualSetupPayloadGenerator generator(setupPayload); + std::string outCode; + + if (generator.payloadDecimalStringRepresentation(outCode) == CHIP_NO_ERROR) { + MTR_LOG_ERROR("Setup code is %s", outCode.c_str()); + rv = [NSString stringWithCString:outCode.c_str() encoding:[NSString defaultCStringEncoding]]; + } else { + MTR_LOG_ERROR("Failed to get decimal setup code"); + } + }); + + return rv; +} + +- (void)setPairingDelegate:(id)delegate queue:(dispatch_queue_t)queue { VerifyOrReturn([self checkIsRunning]); dispatch_async(_chipWorkQueue, ^{ VerifyOrReturn([self checkIsRunning]); - self->_deviceControllerDelegateBridge->setDelegate(self, delegate, queue); + self->_pairingDelegateBridge->setDelegate(delegate, queue); }); } @@ -561,30 +709,27 @@ - (void)setNocChainIssuer:(id)nocChainIssuer queue:(dispatch_ }); } -+ (nullable NSData *)computePASEVerifierForSetupPasscode:(NSNumber *)setupPasscode - iterations:(NSNumber *)iterations - salt:(NSData *)salt - error:(NSError * __autoreleasing *)error +- (nullable NSData *)computePaseVerifier:(uint32_t)setupPincode iterations:(uint32_t)iterations salt:(NSData *)salt { - // Spake2pVerifier::Generate takes the passcode by non-const reference for some reason. - uint32_t unboxedSetupPasscode = [setupPasscode unsignedIntValue]; chip::Spake2pVerifier verifier; - CHIP_ERROR err = verifier.Generate([iterations unsignedIntValue], AsByteSpan(salt), unboxedSetupPasscode); - if ([MTRDeviceController checkForError:err logMsg:kErrorSpake2pVerifierGenerationFailed error:error]) { + CHIP_ERROR err = verifier.Generate(iterations, AsByteSpan(salt), setupPincode); + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("computePaseVerifier generation failed: %s", chip::ErrorStr(err)); return nil; } uint8_t serializedBuffer[chip::Crypto::kSpake2p_VerifierSerialized_Length]; chip::MutableByteSpan serializedBytes(serializedBuffer); err = verifier.Serialize(serializedBytes); - if ([MTRDeviceController checkForError:err logMsg:kErrorSpake2pVerifierSerializationFailed error:error]) { + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("computePaseVerifier serialization failed: %s", chip::ErrorStr(err)); return nil; } return AsData(serializedBytes); } -- (NSData * _Nullable)fetchAttestationChallengeForDeviceID:(NSNumber *)deviceID +- (nullable NSData *)fetchAttestationChallengeForDeviceId:(uint64_t)deviceId { VerifyOrReturnValue([self checkIsRunning], nil); @@ -593,15 +738,15 @@ - (NSData * _Nullable)fetchAttestationChallengeForDeviceID:(NSNumber *)deviceID VerifyOrReturn([self checkIsRunning]); chip::CommissioneeDeviceProxy * deviceProxy; - auto errorCode = self.cppCommissioner->GetDeviceBeingCommissioned([deviceID unsignedLongLongValue], &deviceProxy); - auto success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorGetCommissionee error:nil]; + auto errorCode = self.cppCommissioner->GetDeviceBeingCommissioned(deviceId, &deviceProxy); + auto success = ![self checkForError:errorCode logMsg:kErrorGetCommissionee error:nil]; VerifyOrReturn(success); uint8_t challengeBuffer[chip::Crypto::kAES_CCM128_Key_Length]; chip::ByteSpan challenge(challengeBuffer); errorCode = deviceProxy->GetAttestationChallenge(challenge); - success = ![MTRDeviceController checkForError:errorCode logMsg:kErrorGetAttestationChallenge error:nil]; + success = ![self checkForError:errorCode logMsg:kErrorGetAttestationChallenge error:nil]; VerifyOrReturn(success); attestationChallenge = AsData(challenge); @@ -642,7 +787,7 @@ - (BOOL)checkForStartError:(CHIP_ERROR)errorCode logMsg:(NSString *)logMsg return YES; } -+ (BOOL)checkForError:(CHIP_ERROR)errorCode logMsg:(NSString *)logMsg error:(NSError * __autoreleasing *)error +- (BOOL)checkForError:(CHIP_ERROR)errorCode logMsg:(NSString *)logMsg error:(NSError * __autoreleasing *)error { if (CHIP_NO_ERROR == errorCode) { return NO; @@ -675,18 +820,18 @@ - (BOOL)checkIsRunning:(NSError * __autoreleasing *)error return NO; } -- (BOOL)_deviceBeingCommissionedOverBLE:(uint64_t)deviceID +- (BOOL)_deviceBeingCommissionedOverBLE:(uint64_t)deviceId { VerifyOrReturnValue([self checkIsRunning], NO); chip::CommissioneeDeviceProxy * deviceProxy; - auto errorCode = self->_cppCommissioner->GetDeviceBeingCommissioned(deviceID, &deviceProxy); + auto errorCode = self->_cppCommissioner->GetDeviceBeingCommissioned(deviceId, &deviceProxy); VerifyOrReturnValue(errorCode == CHIP_NO_ERROR, NO); return deviceProxy->GetDeviceTransportType() == chip::Transport::Type::kBle; } -- (BOOL)getSessionForNode:(chip::NodeId)nodeID completion:(MTRInternalDeviceConnectionCallback)completion +- (BOOL)getSessionForNode:(chip::NodeId)nodeID completionHandler:(MTRInternalDeviceConnectionCallback)completionHandler { if (![self checkIsRunning]) { return NO; @@ -695,14 +840,14 @@ - (BOOL)getSessionForNode:(chip::NodeId)nodeID completion:(MTRInternalDeviceConn dispatch_async(_chipWorkQueue, ^{ NSError * error; if (![self checkIsRunning:&error]) { - completion(nullptr, chip::NullOptional, error); + completionHandler(nullptr, chip::NullOptional, error); return; } - auto connectionBridge = new MTRDeviceConnectionBridge(completion); + auto connectionBridge = new MTRDeviceConnectionBridge(completionHandler); // MTRDeviceConnectionBridge always delivers errors async via - // completion. + // completionHandler. connectionBridge->connect(self->_cppCommissioner, nodeID); }); @@ -822,5 +967,4 @@ - (void)invalidateCASESessionForNode:(chip::NodeId)nodeID; self->_cppCommissioner->GetPeerScopedId(nodeID), chip::MakeOptional(chip::Transport::SecureSession::Type::kCASE)); }); } - @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h deleted file mode 100644 index 5d7c81c2be43a4..00000000000000 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h +++ /dev/null @@ -1,56 +0,0 @@ -/** - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -typedef NS_ENUM(NSUInteger, MTRCommissioningStatus) { - MTRCommissioningStatusUnknown = 0, - MTRCommissioningStatusSuccess = 1, - MTRCommissioningStatusFailed = 2, - MTRCommissioningStatusDiscoveringMoreDevices = 3 -}; - -@class MTRDeviceController; - -/** - * The protocol definition for the MTRDeviceControllerDelegate. - * - * All delegate methods will be called on the supplied Delegate Queue. - */ -@protocol MTRDeviceControllerDelegate -@optional -/** - * Notify the delegate when commissioning status gets updated. - */ -- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status; - -/** - * Notify the delegate when a commissioning session is established or the - * establishment has errored out. - */ -- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError * _Nullable)error; - -/** - * Notify the delegate when commissioning is completed. - */ -- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError * _Nullable)error; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm deleted file mode 100644 index b871a08b4e5b43..00000000000000 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm +++ /dev/null @@ -1,110 +0,0 @@ -/** - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "MTRDeviceControllerDelegateBridge.h" -#import "MTRDeviceController.h" -#import "MTRError_Internal.h" - -MTRDeviceControllerDelegateBridge::MTRDeviceControllerDelegateBridge(void) - : mDelegate(nil) -{ -} - -MTRDeviceControllerDelegateBridge::~MTRDeviceControllerDelegateBridge(void) {} - -void MTRDeviceControllerDelegateBridge::setDelegate( - MTRDeviceController * controller, id delegate, dispatch_queue_t queue) -{ - if (delegate && queue) { - mController = controller; - mDelegate = delegate; - mQueue = queue; - } else { - mController = nil; - mDelegate = nil; - mQueue = nil; - } -} - -MTRCommissioningStatus MTRDeviceControllerDelegateBridge::MapStatus(chip::Controller::DevicePairingDelegate::Status status) -{ - MTRCommissioningStatus rv = MTRCommissioningStatusUnknown; - switch (status) { - case chip::Controller::DevicePairingDelegate::Status::SecurePairingSuccess: - rv = MTRCommissioningStatusSuccess; - break; - case chip::Controller::DevicePairingDelegate::Status::SecurePairingFailed: - rv = MTRCommissioningStatusFailed; - break; - case chip::Controller::DevicePairingDelegate::Status::SecurePairingDiscoveringMoreDevices: - rv = MTRCommissioningStatusDiscoveringMoreDevices; - break; - } - return rv; -} - -void MTRDeviceControllerDelegateBridge::OnStatusUpdate(chip::Controller::DevicePairingDelegate::Status status) -{ - NSLog(@"DeviceControllerDelegate status updated: %d", status); - - id strongDelegate = mDelegate; - if ([strongDelegate respondsToSelector:@selector(controller:statusUpdate:)]) { - if (strongDelegate && mQueue) { - MTRCommissioningStatus commissioningStatus = MapStatus(status); - dispatch_async(mQueue, ^{ - [strongDelegate controller:mController statusUpdate:commissioningStatus]; - }); - } - } -} - -void MTRDeviceControllerDelegateBridge::OnPairingComplete(CHIP_ERROR error) -{ - NSLog(@"DeviceControllerDelegate Pairing complete. Status %s", chip::ErrorStr(error)); - - id strongDelegate = mDelegate; - if ([strongDelegate respondsToSelector:@selector(controller:commissioningSessionEstablishmentDone:)]) { - if (strongDelegate && mQueue) { - dispatch_async(mQueue, ^{ - NSError * nsError = [MTRError errorForCHIPErrorCode:error]; - [strongDelegate controller:mController commissioningSessionEstablishmentDone:nsError]; - }); - } - } -} - -void MTRDeviceControllerDelegateBridge::OnPairingDeleted(CHIP_ERROR error) -{ - NSLog(@"DeviceControllerDelegate Pairing deleted. Status %s", chip::ErrorStr(error)); - - // This is never actually called; just do nothing. -} - -void MTRDeviceControllerDelegateBridge::OnCommissioningComplete(chip::NodeId nodeId, CHIP_ERROR error) -{ - NSLog(@"DeviceControllerDelegate Commissioning complete. NodeId %llu Status %s", nodeId, chip::ErrorStr(error)); - - id strongDelegate = mDelegate; - if ([strongDelegate respondsToSelector:@selector(controller:commissioningComplete:)]) { - if (strongDelegate && mQueue) { - dispatch_async(mQueue, ^{ - NSError * nsError = [MTRError errorForCHIPErrorCode:error]; - [strongDelegate controller:mController commissioningComplete:nsError]; - }); - } - } -} diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h index f51f8292a83d76..cf72ff65e92b59 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h @@ -21,8 +21,6 @@ NS_ASSUME_NONNULL_BEGIN @class MTRDeviceControllerXPCConnection; -typedef NSXPCConnection * _Nonnull (^MTRXPCConnectBlock)(void); - @interface MTRDeviceControllerOverXPC : MTRDeviceController - (instancetype)init NS_UNAVAILABLE; @@ -32,8 +30,8 @@ typedef NSXPCConnection * _Nonnull (^MTRXPCConnectBlock)(void); * Returns a shared remote device controller associated with an implementation specific id and implementation specific way to * connect to an XPC listener. */ -+ (MTRDeviceControllerOverXPC *)sharedControllerWithID:(id _Nullable)controllerID - xpcConnectBlock:(MTRXPCConnectBlock)xpcConnectBlock; ++ (MTRDeviceControllerOverXPC *)sharedControllerWithId:(id _Nullable)controllerId + xpcConnectBlock:(NSXPCConnection * (^)(void) )connectBlock; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m index fe4804f45b6b04..54463a59f99a65 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m @@ -37,75 +37,86 @@ static void SetupXPCQueue(void) @implementation MTRDeviceControllerOverXPC -+ (MTRDeviceControllerOverXPC *)sharedControllerWithID:(id _Nullable)controllerID - xpcConnectBlock:(MTRXPCConnectBlock)xpcConnectBlock ++ (MTRDeviceControllerOverXPC *)sharedControllerWithId:(id _Nullable)controllerId + xpcConnectBlock:(NSXPCConnection * (^)(void) )connectBlock { SetupXPCQueue(); - return [[MTRDeviceControllerOverXPC alloc] initWithControllerID:controllerID + return [[MTRDeviceControllerOverXPC alloc] initWithControllerId:controllerId workQueue:globalWorkQueue - connectBlock:xpcConnectBlock]; + connectBlock:connectBlock]; } -- (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload - newNodeID:(NSNumber *)newNodeID - error:(NSError * __autoreleasing *)error +- (BOOL)pairDevice:(uint64_t)deviceID + discriminator:(uint16_t)discriminator + setupPINCode:(uint32_t)setupPINCode + error:(NSError * __autoreleasing *)error { - MTR_LOG_ERROR("MTRDeviceController doesn't support setupCommissioningSessionWithPayload over XPC"); - if (error != nil) { - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeInvalidState userInfo:nil]; - } + MTR_LOG_ERROR("MTRDevice doesn't support pairDevice over XPC"); return NO; } -- (BOOL)commissionNodeWithID:(NSNumber *)nodeID - commissioningParams:(MTRCommissioningParameters *)commissioningParams - error:(NSError * __autoreleasing *)error; +- (BOOL)pairDevice:(uint64_t)deviceID + address:(NSString *)address + port:(uint16_t)port + discriminator:(uint16_t)discriminator + setupPINCode:(uint32_t)setupPINCode + error:(NSError * __autoreleasing *)error { - MTR_LOG_ERROR("MTRDeviceController doesn't support commissionNodeWithID over XPC"); - if (error != nil) { - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeInvalidState userInfo:nil]; - } + MTR_LOG_ERROR("MTRDevice doesn't support pairDevice over XPC"); return NO; } -- (BOOL)cancelCommissioningForNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error +- (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPayload error:(NSError * __autoreleasing *)error { - MTR_LOG_ERROR("MTRDeviceController doesn't support cancelCommissioningForNodeID over XPC"); - if (error != nil) { - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeInvalidState userInfo:nil]; - } + MTR_LOG_ERROR("MTRDevice doesn't support pairDevice over XPC"); return NO; } -- (nullable MTRBaseDevice *)deviceBeingCommissionedWithNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error +- (BOOL)commissionDevice:(uint64_t)deviceId + commissioningParams:(MTRCommissioningParameters *)commissioningParams + error:(NSError * __autoreleasing *)error { - MTR_LOG_ERROR("MTRDeviceController doesn't support deviceBeingCommissionedWithNodeID over XPC"); - if (error != nil) { - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeInvalidState userInfo:nil]; - } - return nil; + MTR_LOG_ERROR("MTRDevice doesn't support pairDevice over XPC"); + return NO; } -- (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchControllerIDCompletion)completion +- (void)setListenPort:(uint16_t)port { - // Capture the proxy handle so that it won't be released prior to block call. - __block MTRDeviceControllerXPCProxyHandle * handleRetainer = nil; + MTR_LOG_ERROR("MTRDevice doesn't support setListenPort over XPC"); +} +- (BOOL)stopDevicePairing:(uint64_t)deviceID error:(NSError * __autoreleasing *)error +{ + MTR_LOG_ERROR("MTRDevice doesn't support stopDevicePairing over XPC"); + return NO; +} + +- (nullable MTRBaseDevice *)getDeviceBeingCommissioned:(uint64_t)deviceId error:(NSError * __autoreleasing *)error +{ + MTR_LOG_ERROR("MTRDevice doesn't support getDeviceBeingCommissioned over XPC"); + return nil; +} + +- (BOOL)getBaseDevice:(uint64_t)deviceID + queue:(dispatch_queue_t)queue + completionHandler:(MTRDeviceConnectionCallback)completionHandler +{ dispatch_async(_workQueue, ^{ dispatch_group_t group = dispatch_group_create(); - if (!self.controllerID) { + if (!self.controllerId) { dispatch_group_enter(group); [self.xpcConnection getProxyHandleWithCompletion:^( - dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { if (handle) { [handle.proxy getAnyDeviceControllerWithCompletion:^(id _Nullable controller, NSError * _Nullable error) { if (error) { MTR_LOG_ERROR("Failed to fetch any shared remote controller"); } else { - self.controllerID = controller; - handleRetainer = handle; + self.controllerId = controller; } dispatch_group_leave(group); + __auto_type handleRetainer = handle; + (void) handleRetainer; }]; } else { MTR_LOG_ERROR("XPC disconnected while retrieving any shared remote controller"); @@ -114,36 +125,51 @@ - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchC }]; } dispatch_group_notify(group, queue, ^{ - if (self.controllerID) { - completion(self.controllerID, handleRetainer, nil); + if (self.controllerId) { + MTRDeviceOverXPC * device = [[MTRDeviceOverXPC alloc] initWithController:self.controllerId + deviceId:deviceID + xpcConnection:self.xpcConnection]; + completionHandler(device, nil); } else { - completion(nil, nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + completionHandler(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); } }); }); + return YES; +} + +- (BOOL)openPairingWindow:(uint64_t)deviceID duration:(NSUInteger)duration error:(NSError * __autoreleasing *)error +{ + MTR_LOG_ERROR("MTRDevice doesn't support openPairingWindow over XPC"); + return NO; } -- (MTRBaseDevice *)baseDeviceForNodeID:(NSNumber *)nodeID +- (nullable NSString *)openPairingWindowWithPIN:(uint64_t)deviceID + duration:(NSUInteger)duration + discriminator:(NSUInteger)discriminator + setupPIN:(NSUInteger)setupPIN + error:(NSError * __autoreleasing *)error { - return [[MTRDeviceOverXPC alloc] initWithControllerOverXPC:self deviceID:nodeID xpcConnection:self.xpcConnection]; + MTR_LOG_ERROR("MTRDevice doesn't support openPairingWindow over XPC"); + return nil; } -- (instancetype)initWithControllerID:(id)controllerID +- (instancetype)initWithControllerId:(id)controllerId workQueue:(dispatch_queue_t)queue - xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection + xpcConnection:(MTRDeviceControllerXPCConnection *)connection { - _controllerID = controllerID; + _controllerId = controllerId; _workQueue = queue; - _xpcConnection = xpcConnection; + _xpcConnection = connection; return self; } // This is interface for unit testing -- (instancetype)initWithControllerID:(id)controllerID +- (instancetype)initWithControllerId:(id)controllerId workQueue:(dispatch_queue_t)queue - connectBlock:(MTRXPCConnectBlock)connectBlock + connectBlock:(NSXPCConnection * (^)(void) )connectBlock { - return [self initWithControllerID:controllerID + return [self initWithControllerId:controllerId workQueue:queue xpcConnection:[MTRDeviceControllerXPCConnection connectionWithWorkQueue:queue connectBlock:connectBlock]]; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h index ccbc2f29168450..15a7482182cd58 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h @@ -20,18 +20,12 @@ NS_ASSUME_NONNULL_BEGIN -typedef void (^MTRFetchControllerIDCompletion)( - id _Nullable controllerID, MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error); - @interface MTRDeviceControllerOverXPC () -@property (nonatomic, readwrite, strong) id _Nullable controllerID; +@property (nonatomic, readwrite, strong) id _Nullable controllerId; @property (nonatomic, readonly, strong) dispatch_queue_t workQueue; @property (nonatomic, readonly, strong) MTRDeviceControllerXPCConnection * xpcConnection; -// Guarantees that completion is called with either a non-nil controllerID or a -// non-nil error. -- (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchControllerIDCompletion)completion; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h index 5fd662143a5749..2d3a6865f67bb2 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h @@ -16,8 +16,6 @@ #import -typedef NSData MTRCertificateDERBytes; - NS_ASSUME_NONNULL_BEGIN @protocol MTRKeypair; @@ -28,10 +26,9 @@ NS_ASSUME_NONNULL_BEGIN * if not using an intermediate CA, the intermediate CA's keypair otherwise. * * Allowed to be nil if this controller will not be issuing operational - * certificates. In that case, the MTRDeviceControllerStartupParams object must - * be initialized using - * initWithIPK:operationalKeypair:operationalCertificate:intermediateCertificate:rootCertificate: - * (to provide the operational credentials for the controller itself). + * certificates. In that case, the MTRDeviceControllerStartupParams object + * must be initialized using initWithOperationalKeypair (to provide the + * operational credentials for the controller itself). */ @property (nonatomic, copy, readonly, nullable) id nocSigner; /** @@ -45,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN * key of the nocSigner keypair, since in this case we are not using an * intermediate certificate. */ -@property (nonatomic, copy, readonly) NSNumber * fabricID; +@property (nonatomic, assign, readonly) uint64_t fabricId; /** * IPK to use for the controller's fabric. Allowed to change from the last time * a controller was started on this fabric if a new IPK has been distributed to @@ -68,7 +65,7 @@ NS_ASSUME_NONNULL_BEGIN * * Will override existing value if not nil. Otherwise existing value will be * used. */ -@property (nonatomic, copy, nullable) NSNumber * vendorID; +@property (nonatomic, copy, nullable) NSNumber * vendorId; /** * Node id for this controller. @@ -78,27 +75,29 @@ NS_ASSUME_NONNULL_BEGIN * * If not nil, must be a valid Matter operational node id. * - * If operationalCertificate is nil, nodeID and operationalKeypair are used to + * If operationalCertificate is nil, nodeId and operationalKeypair are used to * determine an operational certificate, as follows: * * * When creating a new fabric: * - * ** nodeID is allowed to be nil to indicate that a random node id should be + * ** nodeId is allowed to be nil to indicate that a random node id should be * generated. * * * When using an existing fabric: * - * ** nodeID is allowed to be nil to indicate that the existing operational node + * ** nodeId is allowed to be nil to indicate that the existing operational node * id should be used. The existing operational keys will also be used, * unless operationalKeypair is provided. * - * ** If nodeID is not nil, a new operational certificate will be generated for + * ** If nodeId is not nil, a new operational certificate will be generated for * the provided node id (even if that matches the existing node id), using * either the operationalKeypair if that is provided or a new randomly * generated operational key. * */ -@property (nonatomic, copy, nullable) NSNumber * nodeID; +@property (nonatomic, copy, nullable) NSNumber * nodeId; + +// TODO: Add something here for CATs? /** * Root certificate, in X.509 DER form, to use. @@ -115,7 +114,7 @@ NS_ASSUME_NONNULL_BEGIN * * May be nil if nocSigner is not nil and an intermediate CA is not being * used. In that case the nocSigner keypair, which is the keypair for the * root certificate, will be used to generate and sign a root certificate, - * with a random issuer id. In this case, the fabricID will be included in + * with a random issuer id. In this case, the fabricId will be included in * the root certificate's subject DN. * * When using an existing fabric: @@ -131,7 +130,7 @@ NS_ASSUME_NONNULL_BEGIN * 2) The subject DN must match the subject DN of the existing root * certificate. */ -@property (nonatomic, copy, nullable) MTRCertificateDERBytes * rootCertificate; +@property (nonatomic, copy, nullable) NSData * rootCertificate; /** * Intermediate certificate, in X.509 DER form, to use. @@ -163,7 +162,7 @@ NS_ASSUME_NONNULL_BEGIN * allows switching from using an intermediate CA to not using one. * */ -@property (nonatomic, copy, nullable) MTRCertificateDERBytes * intermediateCertificate; +@property (nonatomic, copy, nullable) NSData * intermediateCertificate; /** * Operational certificate, in X.509 DER form, to use. @@ -172,9 +171,9 @@ NS_ASSUME_NONNULL_BEGIN * operationalKeypair must not be nil. * * If nil, an operational certificate will be determined as described in the - * documentation for nodeID. + * documentation for nodeId. */ -@property (nonatomic, copy, readonly, nullable) MTRCertificateDERBytes * operationalCertificate; +@property (nonatomic, copy, readonly, nullable) NSData * operationalCertificate; /** * Operational keypair to use. If operationalCertificate is not nil, the public @@ -183,7 +182,7 @@ NS_ASSUME_NONNULL_BEGIN * If not nil, and if operationalCertificate is nil, a new operational * certificate will be generated for the given operationalKeypair. The node id * will for that certificated will be determined as described in the - * documentation for nodeID. + * documentation for nodeId. */ @property (nonatomic, strong, nullable) id operationalKeypair; @@ -193,18 +192,18 @@ NS_ASSUME_NONNULL_BEGIN * Prepare to initialize a controller given a keypair to use for signing * operational certificates. * - * fabricID must be set to a valid (i.e. nonzero) value. + * fabricId must be set to a valid (i.e. nonzero) value. * * ipk must be 16 bytes in length */ -- (instancetype)initWithIPK:(NSData *)ipk fabricID:(NSNumber *)fabricID nocSigner:(id)nocSigner; +- (instancetype)initWithSigningKeypair:(id)nocSigner fabricId:(uint64_t)fabricId ipk:(NSData *)ipk; /** * Prepare to initialize a controller with a complete operational certificate * chain. This initialization method should be used when none of the * certificate-signing private keys are available locally. * - * The fabric id and node id to use will be derived from the provided + * The fabric id and node if to use will be derived from the provided * operationalCertificate. * * intermediateCertificate may be nil if operationalCertificate is signed by @@ -212,11 +211,11 @@ NS_ASSUME_NONNULL_BEGIN * * ipk must be 16 bytes in length. */ -- (instancetype)initWithIPK:(NSData *)ipk - operationalKeypair:(id)operationalKeypair - operationalCertificate:(MTRCertificateDERBytes *)operationalCertificate - intermediateCertificate:(MTRCertificateDERBytes * _Nullable)intermediateCertificate - rootCertificate:(MTRCertificateDERBytes *)rootCertificate; +- (instancetype)initWithOperationalKeypair:(id)operationalKeypair + operationalCertificate:(NSData *)operationalCertificate + intermediateCertificate:(nullable NSData *)intermediateCertificate + rootCertificate:(NSData *)rootCertificate + ipk:(NSData *)ipk; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index 22680ecf6d7797..181295364063ef 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -30,29 +30,29 @@ @implementation MTRDeviceControllerStartupParams -- (instancetype)initWithIPK:(NSData *)ipk fabricID:(NSNumber *)fabricID nocSigner:(id)nocSigner +- (instancetype)initWithSigningKeypair:(id)nocSigner fabricId:(uint64_t)fabricId ipk:(NSData *)ipk { if (!(self = [super init])) { return nil; } - if (!IsValidFabricId([fabricID unsignedLongLongValue])) { - MTR_LOG_ERROR("%llu is not a valid fabric id to initialize a device controller with", [fabricID unsignedLongLongValue]); + if (!IsValidFabricId(fabricId)) { + MTR_LOG_ERROR("%llu is not a valid fabric id to initialize a device controller with", fabricId); return nil; } _nocSigner = nocSigner; - _fabricID = [fabricID copy]; - _ipk = [ipk copy]; + _fabricId = fabricId; + _ipk = ipk; return self; } -- (instancetype)initWithIPK:(NSData *)ipk - operationalKeypair:(id)operationalKeypair - operationalCertificate:(MTRCertificateDERBytes *)operationalCertificate - intermediateCertificate:(MTRCertificateDERBytes * _Nullable)intermediateCertificate - rootCertificate:(MTRCertificateDERBytes *)rootCertificate +- (instancetype)initWithOperationalKeypair:(id)operationalKeypair + operationalCertificate:(NSData *)operationalCertificate + intermediateCertificate:(nullable NSData *)intermediateCertificate + rootCertificate:(NSData *)rootCertificate + ipk:(NSData *)ipk { if (!(self = [super init])) { return nil; @@ -75,14 +75,14 @@ - (instancetype)initWithIPK:(NSData *)ipk MTR_LOG_ERROR("Unable to extract fabric id from operational certificate: %s", ErrorStr(err)); return nil; } - _fabricID = @(fabricId); + _fabricId = fabricId; } _operationalKeypair = operationalKeypair; - _operationalCertificate = [operationalCertificate copy]; - _intermediateCertificate = [intermediateCertificate copy]; - _rootCertificate = [rootCertificate copy]; - _ipk = [ipk copy]; + _operationalCertificate = operationalCertificate; + _intermediateCertificate = intermediateCertificate; + _rootCertificate = rootCertificate; + _ipk = ipk; return self; } @@ -94,10 +94,10 @@ - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params } _nocSigner = params.nocSigner; - _fabricID = params.fabricID; + _fabricId = params.fabricId; _ipk = params.ipk; - _vendorID = params.vendorID; - _nodeID = params.nodeID; + _vendorId = params.vendorId; + _nodeId = params.nodeId; _rootCertificate = params.rootCertificate; _intermediateCertificate = params.intermediateCertificate; _operationalCertificate = params.operationalCertificate; @@ -136,8 +136,8 @@ - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params return nil; } - if (self.operationalCertificate != nil && self.nodeID != nil) { - MTR_LOG_ERROR("nodeID must be nil if operationalCertificate is not nil"); + if (self.operationalCertificate != nil && self.nodeId != nil) { + MTR_LOG_ERROR("nodeId must be nil if operationalCertificate is not nil"); return nil; } @@ -169,20 +169,20 @@ - (instancetype)initForNewFabric:(chip::FabricTable *)fabricTable return nil; } - if (self.operationalCertificate == nil && self.nodeID == nil) { + if (self.operationalCertificate == nil && self.nodeId == nil) { // Just avoid setting the top bit, to avoid issues with node // ids outside the operational range. uint64_t nodeId = arc4random(); nodeId = (nodeId << 31) | (arc4random() >> 1); - self.nodeID = @(nodeId); + self.nodeId = @(nodeId); } if (self.rootCertificate == nil) { NSError * error; - self.rootCertificate = [MTRCertificates createRootCertificate:self.nocSigner - issuerID:nil - fabricID:self.fabricID - error:&error]; + self.rootCertificate = [MTRCertificates generateRootCertificate:self.nocSigner + issuerId:nil + fabricId:@(self.fabricId) + error:&error]; if (error != nil || self.rootCertificate == nil) { MTR_LOG_ERROR("Failed to generate root certificate: %@", error); return nil; @@ -206,13 +206,13 @@ - (instancetype)initForExistingFabric:(FabricTable *)fabricTable const FabricInfo * fabric = fabricTable->FindFabricWithIndex(fabricIndex); - if (self.vendorID == nil) { - self.vendorID = @(fabric->GetVendorId()); + if (self.vendorId == nil) { + self.vendorId = @(fabric->GetVendorId()); } BOOL usingExistingNOC = NO; - if (self.operationalCertificate == nil && self.nodeID == nil) { - self.nodeID = @(fabric->GetNodeId()); + if (self.operationalCertificate == nil && self.nodeId == nil) { + self.nodeId = @(fabric->GetNodeId()); if (self.operationalKeypair == nil) { uint8_t nocBuf[Credentials::kMaxCHIPCertLength]; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h index 5094ee0290b132..3be8c5d4f720b5 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h @@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceControllerStartupParams () // We want to be able to write to operationalCertificate in // MTRDeviceControllerStartupParamsInternal. -@property (nonatomic, copy, nullable) MTRCertificateDERBytes * operationalCertificate; +@property (nonatomic, copy, nullable) NSData * operationalCertificate; // Init method that just copies the values of all our ivars. - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params; @@ -83,12 +83,12 @@ NS_ASSUME_NONNULL_BEGIN keystore:(chip::Crypto::OperationalKeystore *)keystore params:(MTRDeviceControllerStartupParams *)params; -- (instancetype)initWithIPK:(NSData *)ipk fabricID:(NSNumber *)fabricID nocSigner:(id)nocSigner NS_UNAVAILABLE; -- (instancetype)initWithIPK:(NSData *)ipk - operationalKeypair:(id)operationalKeypair - operationalCertificate:(MTRCertificateDERBytes *)operationalCertificate - intermediateCertificate:(MTRCertificateDERBytes * _Nullable)intermediateCertificate - rootCertificate:(MTRCertificateDERBytes *)rootCertificate NS_UNAVAILABLE; +- (instancetype)initWithSigningKeypair:(id)nocSigner fabricId:(uint64_t)fabricId ipk:(NSData *)ipk NS_UNAVAILABLE; +- (instancetype)initWithOperationalKeypair:(id)operationalKeypair + operationalCertificate:(NSData *)operationalCertificate + intermediateCertificate:(nullable NSData *)intermediateCertificate + rootCertificate:(NSData *)rootCertificate + ipk:(NSData *)ipk NS_UNAVAILABLE; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.h b/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.h index 34a4041144675d..9f06af1e1c8177 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.h @@ -19,8 +19,6 @@ NS_ASSUME_NONNULL_BEGIN -typedef void (^MTRXPCReportHandler)(id _Nullable values, NSError * _Nullable error); - /** * handle for XPC remote object proxy for remote device controller * @@ -33,8 +31,6 @@ typedef void (^MTRXPCReportHandler)(id _Nullable values, NSError * _Nullable err @end -typedef void (^MTRGetProxyHandleHandler)(dispatch_queue_t queue, MTRDeviceControllerXPCProxyHandle * _Nullable container); - /** * class to manage XPC connection for remote device controller * @@ -45,15 +41,16 @@ typedef void (^MTRGetProxyHandleHandler)(dispatch_queue_t queue, MTRDeviceContro /** * This method is just for test purpsoe. */ -+ (instancetype)connectionWithWorkQueue:(dispatch_queue_t)workQueue connectBlock:(MTRXPCConnectBlock)connectBlock; ++ (instancetype)connectionWithWorkQueue:(dispatch_queue_t)workQueue connectBlock:(NSXPCConnection * (^)(void) )connectBlock; -- (void)getProxyHandleWithCompletion:(MTRGetProxyHandleHandler)completion; +- (void)getProxyHandleWithCompletion:(void (^)(dispatch_queue_t queue, + MTRDeviceControllerXPCProxyHandle * _Nullable container))completion; - (void)registerReportHandlerWithController:(id)controller - nodeID:(NSNumber *)nodeID - handler:(MTRXPCReportHandler)handler; + nodeId:(NSUInteger)nodeId + handler:(void (^)(id _Nullable values, NSError * _Nullable error))handler; - (void)deregisterReportHandlersWithController:(id)controller - nodeID:(NSNumber *)nodeID - completion:(dispatch_block_t)completion; + nodeId:(NSUInteger)nodeId + completion:(void (^)(void))completion; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.m b/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.m index 8456b7e24c0ecf..f3354907d7a626 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.m +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.m @@ -83,7 +83,8 @@ + (instancetype)connectionWithWorkQueue:(dispatch_queue_t)workQueue connectBlock return [[MTRDeviceControllerXPCConnection alloc] initWithWorkQueue:workQueue connectBlock:connectBlock]; } -- (void)getProxyHandleWithCompletion:(MTRGetProxyHandleHandler)completion +- (void)getProxyHandleWithCompletion:(void (^)( + dispatch_queue_t queue, MTRDeviceControllerXPCProxyHandle * _Nullable container))completion { dispatch_async(_workQueue, ^{ MTRDeviceControllerXPCProxyHandle * container = self.proxyHandle; @@ -118,7 +119,9 @@ - (void)getProxyHandleWithCompletion:(MTRGetProxyHandleHandler)completion }); } -- (void)registerReportHandlerWithController:(id)controller nodeID:(NSNumber *)nodeID handler:(MTRXPCReportHandler)handler +- (void)registerReportHandlerWithController:(id)controller + nodeId:(NSUInteger)nodeId + handler:(void (^)(id _Nullable values, NSError * _Nullable error))handler { dispatch_async(_workQueue, ^{ BOOL shouldRetainProxyForReport = ([self.reportRegistry count] == 0); @@ -127,10 +130,11 @@ - (void)registerReportHandlerWithController:(id)controller nodeID:(NS controllerDictionary = [[NSMutableDictionary alloc] init]; [self.reportRegistry setObject:controllerDictionary forKey:controller]; } - NSMutableArray * nodeArray = controllerDictionary[nodeID]; + NSNumber * nodeIdKey = [NSNumber numberWithUnsignedInteger:nodeId]; + NSMutableArray * nodeArray = controllerDictionary[nodeIdKey]; if (!nodeArray) { nodeArray = [[NSMutableArray alloc] init]; - [controllerDictionary setObject:nodeArray forKey:nodeID]; + [controllerDictionary setObject:nodeArray forKey:nodeIdKey]; } [nodeArray addObject:handler]; if (shouldRetainProxyForReport) { @@ -140,8 +144,8 @@ - (void)registerReportHandlerWithController:(id)controller nodeID:(NS } - (void)deregisterReportHandlersWithController:(id)controller - nodeID:(NSNumber *)nodeID - completion:(dispatch_block_t)completion + nodeId:(NSUInteger)nodeId + completion:(void (^)(void))completion { dispatch_async(_workQueue, ^{ __auto_type clearRegistry = ^{ @@ -150,12 +154,13 @@ - (void)deregisterReportHandlersWithController:(id)controller completion(); return; } - NSMutableArray * nodeArray = controllerDictionary[nodeID]; + NSNumber * nodeIdKey = [NSNumber numberWithUnsignedInteger:nodeId]; + NSMutableArray * nodeArray = controllerDictionary[nodeIdKey]; if (!nodeArray) { completion(); return; } - [controllerDictionary removeObjectForKey:nodeID]; + [controllerDictionary removeObjectForKey:nodeIdKey]; if ([controllerDictionary count] == 0) { // Dereference proxy retainer for reports so that XPC connection may be invalidated if no longer used. self.proxyRetainerForReports = nil; @@ -167,7 +172,7 @@ - (void)deregisterReportHandlersWithController:(id)controller if (handle) { MTR_LOG_DEBUG("CHIP XPC connection requests to stop reports"); [handle.proxy stopReportsWithController:controller - nodeID:nodeID + nodeId:nodeId completion:^{ __auto_type handleRetainer = handle; (void) handleRetainer; @@ -182,7 +187,7 @@ - (void)deregisterReportHandlersWithController:(id)controller } - (void)handleReportWithController:(id)controller - nodeID:(NSNumber *)nodeID + nodeId:(NSUInteger)nodeId values:(id _Nullable)values error:(NSError * _Nullable)error { @@ -191,7 +196,8 @@ - (void)handleReportWithController:(id)controller if (!controllerDictionary) { return; } - NSMutableArray * nodeArray = controllerDictionary[nodeID]; + NSNumber * nodeIdKey = [NSNumber numberWithUnsignedInteger:nodeId]; + NSMutableArray * nodeArray = controllerDictionary[nodeIdKey]; if (!nodeArray) { return; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h index 602713793bd70f..7ddbb1df310753 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h @@ -16,7 +16,7 @@ /** * Parts of MTRDeviceController that are not part of the framework API. Mostly - * for use from MTRDeviceControllerFactory. + * for use from MTRControllerFactory. */ #import @@ -31,7 +31,7 @@ #import "MTRDeviceController.h" @class MTRDeviceControllerStartupParamsInternal; -@class MTRDeviceControllerFactory; +@class MTRControllerFactory; @class MTRDevice; namespace chip { @@ -46,17 +46,17 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceController (InternalMethods) -#pragma mark - MTRDeviceControllerFactory methods +#pragma mark - MTRControllerFactory methods /** * Start a new controller. Returns whether startup succeeded. If this fails, * it guarantees that it has called controllerShuttingDown on the - * MTRDeviceControllerFactory. + * MTRControllerFactory. * * The return value will always match [controller isRunning] for this * controller. * - * Only MTRDeviceControllerFactory should be calling this. + * Only MTRControllerFactory should be calling this. */ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams; @@ -69,9 +69,9 @@ NS_ASSUME_NONNULL_BEGIN /** * Init a newly created controller. * - * Only MTRDeviceControllerFactory should be calling this. + * Only MTRControllerFactory should be calling this. */ -- (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory queue:(dispatch_queue_t)queue; +- (instancetype)initWithFactory:(MTRControllerFactory *)factory queue:(dispatch_queue_t)queue; /** * Check whether this controller is running on the given fabric, as represented @@ -82,7 +82,7 @@ NS_ASSUME_NONNULL_BEGIN * Might return failure, in which case we don't know whether it's running on the * given fabric. Otherwise it will set *isRunning to the right boolean value. * - * Only MTRDeviceControllerFactory should be calling this. + * Only MTRControllerFactory should be calling this. */ - (CHIP_ERROR)isRunningOnFabric:(chip::FabricTable *)fabricTable fabricIndex:(chip::FabricIndex)fabricIndex @@ -92,16 +92,16 @@ NS_ASSUME_NONNULL_BEGIN * Shut down the underlying C++ controller. Must be called on the Matter work * queue or after the Matter work queue has been shut down. * - * Only MTRDeviceControllerFactory should be calling this. + * Only MTRControllerFactory should be calling this. */ - (void)shutDownCppController; /** - * Notification that the MTRDeviceControllerFactory has finished shutting down + * Notification that the MTRControllerFactory has finished shutting down * this controller and will not be touching it anymore. This is guaranteed to * be called after initWithFactory succeeds. * - * Only MTRDeviceControllerFactory should be calling this. + * Only MTRControllerFactory should be calling this. */ - (void)deinitFromFactory; @@ -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 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. + * 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. */ -- (BOOL)getSessionForNode:(chip::NodeId)nodeID completion:(MTRInternalDeviceConnectionCallback)completion; +- (BOOL)getSessionForNode:(chip::NodeId)nodeID completionHandler:(MTRInternalDeviceConnectionCallback)completionHandler; /** * Get a session for the commissionee device with the given device id. This may @@ -152,18 +152,11 @@ NS_ASSUME_NONNULL_BEGIN * synchronously during the callback invocation. */ - (void)asyncDispatchToMatterQueue:(void (^)(chip::Controller::DeviceCommissioner *))block - errorHandler:(void (^)(NSError *))erroHandler; - -/** - * Get an MTRBaseDevice for the given node id. This exists to allow subclasses - * of MTRDeviceController (e.g. MTRDeviceControllerOverXPC) to override what - * sort of MTRBaseDevice they return. - */ -- (MTRBaseDevice *)baseDeviceForNodeID:(NSNumber *)nodeID; + errorHandler:(void (^)(NSError *))errorHandler; #pragma mark - Device-specific data and SDK access // DeviceController will act as a central repository for this opaque dictionary that MTRDevice manages -- (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID; +- (MTRDevice *)deviceForNodeID:(uint64_t)nodeID; - (void)removeDevice:(MTRDevice *)device; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h index 9718c3ee34a3f7..e0a46f4f17cec5 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h +++ b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h @@ -16,21 +16,23 @@ */ #import "MTRBaseDevice.h" -#import "MTRCluster.h" // For MTRSubscriptionEstablishedHandler #import "MTRDeviceControllerXPCConnection.h" -@class MTRDeviceControllerOverXPC; - NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceOverXPC : MTRBaseDevice - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; - -- (instancetype)initWithControllerOverXPC:(MTRDeviceControllerOverXPC *)controllerOverXPC - deviceID:(NSNumber *)deviceID - xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection; +- (void)subscribeWithQueue:(dispatch_queue_t)queue + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + subscriptionEstablished:(void (^_Nullable)(void))subscriptionEstablishedHandler NS_UNAVAILABLE; + +- (instancetype)initWithController:(id)controller + deviceId:(uint64_t)deviceId + xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m index a978272654ff2e..a501524ddcaaf2 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m +++ b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m @@ -17,298 +17,277 @@ #import "MTRDeviceOverXPC.h" +#import "MTRAttributeCacheContainer+XPC.h" #import "MTRCluster.h" -#import "MTRClusterStateCacheContainer+XPC.h" #import "MTRDeviceController+XPC.h" -#import "MTRDeviceControllerOverXPC_Internal.h" #import "MTRDeviceControllerXPCConnection.h" #import "MTRError.h" #import "MTRLogging.h" NS_ASSUME_NONNULL_BEGIN -typedef void (^MTRFetchProxyHandleCompletion)(MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error); - @interface MTRDeviceOverXPC () -@property (nonatomic, strong, readonly, nullable) id controllerID; -@property (nonatomic, strong, readonly) MTRDeviceControllerOverXPC * controller; -@property (nonatomic, readonly) NSNumber * nodeID; +@property (nonatomic, strong, readonly) id controller; +@property (nonatomic, readonly) uint64_t nodeId; @property (nonatomic, strong, readonly) MTRDeviceControllerXPCConnection * xpcConnection; -- (void)fetchProxyHandleWithQueue:(dispatch_queue_t)queue completion:(MTRFetchProxyHandleCompletion)completion; - @end @implementation MTRDeviceOverXPC -- (instancetype)initWithControllerOverXPC:(MTRDeviceControllerOverXPC *)controllerOverXPC - deviceID:(NSNumber *)deviceID - xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection +- (instancetype)initWithController:(id)controller + deviceId:(uint64_t)deviceId + xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection { - _controllerID = controllerOverXPC.controllerID; - _controller = controllerOverXPC; - _nodeID = deviceID; + _controller = controller; + _nodeId = deviceId; _xpcConnection = xpcConnection; return self; } - (void)subscribeWithQueue:(dispatch_queue_t)queue - params:(MTRSubscribeParams *)params - clusterStateCacheContainer:(MTRClusterStateCacheContainer * _Nullable)clusterStateCacheContainer - attributeReportHandler:(void (^_Nullable)(NSArray * value))attributeReportHandler - eventReportHandler:(void (^_Nullable)(NSArray * value))eventReportHandler - errorHandler:(void (^)(NSError * error))errorHandler - subscriptionEstablished:(void (^_Nullable)(void))subscriptionEstablishedHandler - resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduledHandler + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + params:(nullable MTRSubscribeParams *)params + cacheContainer:(MTRAttributeCacheContainer * _Nullable)attributeCacheContainer + attributeReportHandler:(nullable void (^)(NSArray * value))attributeReportHandler + eventReportHandler:(nullable void (^)(NSArray * value))eventReportHandler + errorHandler:(void (^)(NSError * error))errorHandler + subscriptionEstablished:(nullable void (^)(void))subscriptionEstablishedHandler + resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduledHandler { MTR_LOG_DEBUG("Subscribing all attributes... Note that attributeReportHandler, eventReportHandler, and resubscriptionScheduled " "are not supported."); - - __auto_type workBlock = ^(MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { - if (error != nil) { - errorHandler(error); - return; - } - - if (clusterStateCacheContainer) { - [clusterStateCacheContainer setXPCConnection:self->_xpcConnection controllerID:self.controllerID deviceID:self.nodeID]; - } - - [handle.proxy subscribeWithController:self.controllerID - nodeID:self.nodeID - params:[MTRDeviceController encodeXPCSubscribeParams:params] - shouldCache:(clusterStateCacheContainer != nil) - completion:^(NSError * _Nullable error) { - dispatch_async(queue, ^{ - if (error) { - errorHandler(error); - } else { - subscriptionEstablishedHandler(); - } - }); - __auto_type handleRetainer = handle; - (void) handleRetainer; - }]; - }; - - [self fetchProxyHandleWithQueue:queue completion:workBlock]; + if (attributeCacheContainer) { + [attributeCacheContainer setXPCConnection:_xpcConnection controllerId:self.controller deviceId:self.nodeId]; + } + [_xpcConnection + getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + if (handle) { + [handle.proxy subscribeWithController:self.controller + nodeId:self.nodeId + minInterval:@(minInterval) + maxInterval:@(maxInterval) + params:[MTRDeviceController encodeXPCSubscribeParams:params] + shouldCache:(attributeCacheContainer != nil) + completion:^(NSError * _Nullable error) { + dispatch_async(queue, ^{ + if (error) { + errorHandler(error); + } else { + subscriptionEstablishedHandler(); + } + }); + __auto_type handleRetainer = handle; + (void) handleRetainer; + }]; + } else { + MTR_LOG_ERROR("Failed to obtain XPC connection to write attribute"); + dispatch_async(queue, ^{ + errorHandler([NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + }); + } + }]; } -- (void)readAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - params:(MTRReadParams * _Nullable)params - queue:(dispatch_queue_t)queue - completion:(MTRDeviceResponseHandler)completion +- (void)readAttributeWithEndpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + params:(MTRReadParams * _Nullable)params + clientQueue:(dispatch_queue_t)clientQueue + completion:(MTRDeviceResponseHandler)completion { MTR_LOG_DEBUG("Reading attribute ..."); - - __auto_type workBlock = ^(MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { - if (error != nil) { - completion(nil, error); - return; - } - - [handle.proxy readAttributeWithController:self.controllerID - nodeID:self.nodeID - endpointID:endpointID - clusterID:clusterID - attributeID:attributeID - params:[MTRDeviceController encodeXPCReadParams:params] - completion:^(id _Nullable values, NSError * _Nullable error) { - 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 - // handle won't be released prior to block call. - __auto_type handleRetainer = handle; - (void) handleRetainer; - }); - }]; - }; - - [self fetchProxyHandleWithQueue:queue completion:workBlock]; + [_xpcConnection + getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + if (handle) { + [handle.proxy readAttributeWithController:self.controller + nodeId:self.nodeId + endpointId:endpointId + clusterId:clusterId + attributeId:attributeId + params:[MTRDeviceController encodeXPCReadParams:params] + completion:^(id _Nullable values, NSError * _Nullable error) { + dispatch_async(clientQueue, ^{ + MTR_LOG_DEBUG("Attribute read"); + completion([MTRDeviceController decodeXPCResponseValues:values], error); + // The following captures the proxy handle in the closure so that the + // handle won't be released prior to block call. + __auto_type handleRetainer = handle; + (void) handleRetainer; + }); + }]; + } else { + dispatch_async(clientQueue, ^{ + MTR_LOG_ERROR("Failed to obtain XPC connection to read attribute"); + completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + }); + } + }]; } -- (void)writeAttributeWithEndpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - attributeID:(NSNumber *)attributeID +- (void)writeAttributeWithEndpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + attributeId:(NSNumber *)attributeId value:(id)value timedWriteTimeout:(NSNumber * _Nullable)timeoutMs - queue:(dispatch_queue_t)queue + clientQueue:(dispatch_queue_t)clientQueue completion:(MTRDeviceResponseHandler)completion { MTR_LOG_DEBUG("Writing attribute ..."); - - __auto_type workBlock = ^(MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { - if (error != nil) { - completion(nil, error); - return; - } - - [handle.proxy writeAttributeWithController:self.controllerID - nodeID:self.nodeID - endpointID:endpointID - clusterID:clusterID - attributeID:attributeID - value:value - timedWriteTimeout:timeoutMs - completion:^(id _Nullable values, NSError * _Nullable error) { - 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 - // handle won't be released prior to block call. - __auto_type handleRetainer = handle; - (void) handleRetainer; - }); - }]; - }; - - [self fetchProxyHandleWithQueue:queue completion:workBlock]; + [_xpcConnection + getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + if (handle) { + [handle.proxy writeAttributeWithController:self.controller + nodeId:self.nodeId + endpointId:endpointId + clusterId:clusterId + attributeId:attributeId + value:value + timedWriteTimeout:timeoutMs + completion:^(id _Nullable values, NSError * _Nullable error) { + dispatch_async(clientQueue, ^{ + MTR_LOG_DEBUG("Attribute written"); + completion([MTRDeviceController decodeXPCResponseValues:values], error); + // The following captures the proxy handle in the closure so that the + // handle won't be released prior to block call. + __auto_type handleRetainer = handle; + (void) handleRetainer; + }); + }]; + } else { + dispatch_async(clientQueue, ^{ + MTR_LOG_ERROR("Failed to obtain XPC connection to write attribute"); + completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + }); + } + }]; } -- (void)invokeCommandWithEndpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - commandID:(NSNumber *)commandID +- (void)invokeCommandWithEndpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + commandId:(NSNumber *)commandId commandFields:(id)commandFields timedInvokeTimeout:(NSNumber * _Nullable)timeoutMs - queue:(dispatch_queue_t)queue + clientQueue:(dispatch_queue_t)clientQueue completion:(MTRDeviceResponseHandler)completion { MTR_LOG_DEBUG("Invoking command ..."); - - __auto_type workBlock = ^(MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { - if (error != nil) { - completion(nil, error); - return; - } - - [handle.proxy invokeCommandWithController:self.controllerID - nodeID:self.nodeID - endpointID:endpointID - clusterID:clusterID - commandID:commandID - fields:commandFields - timedInvokeTimeout:timeoutMs - completion:^(id _Nullable values, NSError * _Nullable error) { - 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 - // handle won't be released prior to block call. - __auto_type handleRetainer = handle; - (void) handleRetainer; - }); - }]; - }; - - [self fetchProxyHandleWithQueue:queue completion:workBlock]; + [_xpcConnection + getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + if (handle) { + [handle.proxy invokeCommandWithController:self.controller + nodeId:self.nodeId + endpointId:endpointId + clusterId:clusterId + commandId:commandId + fields:commandFields + timedInvokeTimeout:timeoutMs + completion:^(id _Nullable values, NSError * _Nullable error) { + dispatch_async(clientQueue, ^{ + MTR_LOG_DEBUG("Command invoked"); + completion([MTRDeviceController decodeXPCResponseValues:values], error); + // The following captures the proxy handle in the closure so that the + // handle won't be released prior to block call. + __auto_type handleRetainer = handle; + (void) handleRetainer; + }); + }]; + } else { + dispatch_async(clientQueue, ^{ + MTR_LOG_ERROR("Failed to obtain XPC connection to invoke command"); + completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + }); + } + }]; } -- (void)subscribeAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - params:(MTRSubscribeParams *)params - queue:(dispatch_queue_t)queue - reportHandler:(MTRDeviceResponseHandler)reportHandler - subscriptionEstablished:(void (^_Nullable)(void))subscriptionEstablishedHandler +- (void)subscribeAttributeWithEndpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + minInterval:(NSNumber *)minInterval + maxInterval:(NSNumber *)maxInterval + params:(MTRSubscribeParams * _Nullable)params + clientQueue:(dispatch_queue_t)clientQueue + reportHandler:(MTRDeviceResponseHandler)reportHandler + subscriptionEstablished:(void (^_Nullable)(void))subscriptionEstablishedHandler { MTR_LOG_DEBUG("Subscribing attribute ..."); - - __auto_type workBlock = ^(MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { - MTR_LOG_DEBUG("Setup report handler"); - - if (error != nil) { - subscriptionEstablishedHandler(); - reportHandler(nil, error); - return; - } - - [self.xpcConnection - registerReportHandlerWithController:self.controllerID - nodeID:self.nodeID - handler:^(id _Nullable values, NSError * _Nullable error) { - if (values && ![values isKindOfClass:[NSArray class]]) { - MTR_LOG_ERROR("Unsupported report format"); - return; - } - if (!values) { - MTR_LOG_DEBUG("Error report received"); - dispatch_async(queue, ^{ - reportHandler(values, error); - }); - return; - } - __auto_type decodedValues = [MTRDeviceController decodeXPCResponseValues:values]; - NSMutableArray *> * filteredValues = - [NSMutableArray arrayWithCapacity:[decodedValues count]]; - for (NSDictionary * decodedValue in decodedValues) { - MTRAttributePath * attributePath = decodedValue[MTRAttributePathKey]; - if ((endpointID == nil || [attributePath.endpoint isEqualToNumber:endpointID]) - && (clusterID == nil || [attributePath.cluster isEqualToNumber:clusterID]) - && (attributeID == nil || - [attributePath.attribute isEqualToNumber:attributeID])) { - [filteredValues addObject:decodedValue]; + [_xpcConnection getProxyHandleWithCompletion:^( + dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + if (handle) { + MTR_LOG_DEBUG("Setup report handler"); + [self.xpcConnection + registerReportHandlerWithController:self.controller + nodeId:self.nodeId + handler:^(id _Nullable values, NSError * _Nullable error) { + if (values && ![values isKindOfClass:[NSArray class]]) { + MTR_LOG_ERROR("Unsupported report format"); + return; + } + if (!values) { + MTR_LOG_DEBUG("Error report received"); + dispatch_async(clientQueue, ^{ + reportHandler(values, error); + }); + return; } - } - if ([filteredValues count] > 0) { - MTR_LOG_DEBUG("Report received"); - dispatch_async(queue, ^{ - reportHandler(filteredValues, error); - }); - } + __auto_type decodedValues = [MTRDeviceController decodeXPCResponseValues:values]; + NSMutableArray *> * filteredValues = + [NSMutableArray arrayWithCapacity:[decodedValues count]]; + for (NSDictionary * decodedValue in decodedValues) { + MTRAttributePath * attributePath = decodedValue[MTRAttributePathKey]; + if ((endpointId == nil || [attributePath.endpoint isEqualToNumber:endpointId]) + && (clusterId == nil || [attributePath.cluster isEqualToNumber:clusterId]) + && (attributeId == nil || + [attributePath.attribute isEqualToNumber:attributeId])) { + [filteredValues addObject:decodedValue]; + } + } + if ([filteredValues count] > 0) { + MTR_LOG_DEBUG("Report received"); + dispatch_async(clientQueue, ^{ + reportHandler(filteredValues, error); + }); + } + }]; + [handle.proxy subscribeAttributeWithController:self.controller + nodeId:self.nodeId + endpointId:endpointId + clusterId:clusterId + attributeId:attributeId + minInterval:minInterval + maxInterval:maxInterval + params:[MTRDeviceController encodeXPCSubscribeParams:params] + establishedHandler:^{ + dispatch_async(clientQueue, ^{ + MTR_LOG_DEBUG("Subscription established"); + subscriptionEstablishedHandler(); + // The following captures the proxy handle in the closure so that the handle + // won't be released prior to block call. + __auto_type handleRetainer = handle; + (void) handleRetainer; + }); }]; - - [handle.proxy subscribeAttributeWithController:self.controllerID - nodeID:self.nodeID - endpointID:endpointID - clusterID:clusterID - attributeID:attributeID - params:[MTRDeviceController encodeXPCSubscribeParams:params] - establishedHandler:^{ - dispatch_async(queue, ^{ - MTR_LOG_DEBUG("Subscription established"); - subscriptionEstablishedHandler(); - // The following captures the proxy handle in the closure so that the handle - // won't be released prior to block call. - __auto_type handleRetainer = handle; - (void) handleRetainer; - }); - }]; - }; - - [self fetchProxyHandleWithQueue:queue completion:workBlock]; + } else { + dispatch_async(clientQueue, ^{ + MTR_LOG_ERROR("Failed to obtain XPC connection to subscribe to attribute"); + subscriptionEstablishedHandler(); + reportHandler(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + }); + } + }]; } -- (void)deregisterReportHandlersWithQueue:(dispatch_queue_t)queue completion:(void (^)(void))completion +- (void)deregisterReportHandlersWithClientQueue:(dispatch_queue_t)clientQueue completion:(void (^)(void))completion { MTR_LOG_DEBUG("Deregistering report handlers"); - __auto_type workBlock = ^{ - [self->_xpcConnection deregisterReportHandlersWithController:self.controllerID - nodeID:self.nodeID - completion:^{ - dispatch_async(queue, completion); - }]; - }; - - if (self.controllerID != nil) { - workBlock(); - } else { - [self.controller fetchControllerIdWithQueue:queue - completion:^(id _Nullable controllerID, - MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { - if (error != nil) { - // We're already running on the right queue. - completion(); - return; - } - - self->_controllerID = controllerID; - workBlock(); - }]; - } + [_xpcConnection deregisterReportHandlersWithController:self.controller + nodeId:self.nodeId + completion:^{ + dispatch_async(clientQueue, completion); + }]; } - (void)openCommissioningWindowWithSetupPasscode:(NSNumber *)setupPasscode @@ -323,35 +302,6 @@ - (void)openCommissioningWindowWithSetupPasscode:(NSNumber *)setupPasscode }); } -- (void)fetchProxyHandleWithQueue:(dispatch_queue_t)queue completion:(MTRFetchProxyHandleCompletion)completion -{ - if (self.controllerID != nil) { - [self->_xpcConnection getProxyHandleWithCompletion:^( - dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { - dispatch_async(queue, ^{ - if (handle == nil) { - MTR_LOG_ERROR("Failed to obtain XPC connection"); - completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); - } else { - completion(handle, nil); - } - }); - }]; - } else { - [self.controller fetchControllerIdWithQueue:queue - completion:^(id _Nullable controllerID, - MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { - // We're already running on the right queue. - if (error != nil) { - completion(nil, error); - } else { - self->_controllerID = controllerID; - completion(handle, nil); - } - }]; - } -} - @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDevicePairingDelegate.h b/src/darwin/Framework/CHIP/MTRDevicePairingDelegate.h new file mode 100644 index 00000000000000..b4bd25652ae80b --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDevicePairingDelegate.h @@ -0,0 +1,62 @@ +/** + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, MTRPairingStatus) { + MTRPairingStatusUnknown = 0, + MTRPairingStatusSuccess = 1, + MTRPairingStatusFailed = 2, + MTRPairingStatusDiscoveringMoreDevices = 3 +}; + +/** + * The protocol definition for the MTRDevicePairingDelegate + * + * All delegate methods will be called on the supplied Delegate Queue. + */ +@protocol MTRDevicePairingDelegate +@optional +/** + * Notify the delegate when pairing status gets updated + * + */ +- (void)onStatusUpdate:(MTRPairingStatus)status; + +/** + * Notify the delegate when pairing is completed + * + */ +- (void)onPairingComplete:(nullable NSError *)error; + +/** + * Notify the delegate when commissioning is completed + * + */ +- (void)onCommissioningComplete:(nullable NSError *)error; + +/** + * Notify the delegate when pairing is deleted + * + */ +- (void)onPairingDeleted:(nullable NSError *)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.h b/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.h similarity index 66% rename from src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.h rename to src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.h index 22d58ecd590795..a932319aaf4352 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.h +++ b/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.h @@ -15,21 +15,20 @@ * limitations under the License. */ -#import "MTRDeviceControllerDelegate.h" +#import "MTRDevicePairingDelegate.h" #include #include NS_ASSUME_NONNULL_BEGIN -@class MTRDeviceController; - -class MTRDeviceControllerDelegateBridge : public chip::Controller::DevicePairingDelegate { +class MTRDevicePairingDelegateBridge : public chip::Controller::DevicePairingDelegate +{ public: - MTRDeviceControllerDelegateBridge(); - ~MTRDeviceControllerDelegateBridge(); + MTRDevicePairingDelegateBridge(); + ~MTRDevicePairingDelegateBridge(); - void setDelegate(MTRDeviceController * controller, id delegate, dispatch_queue_t queue); + void setDelegate(id delegate, dispatch_queue_t queue); void OnStatusUpdate(chip::Controller::DevicePairingDelegate::Status status) override; @@ -40,11 +39,10 @@ class MTRDeviceControllerDelegateBridge : public chip::Controller::DevicePairing void OnCommissioningComplete(chip::NodeId deviceId, CHIP_ERROR error) override; private: - MTRDeviceController * _Nullable mController; - _Nullable id mDelegate; + _Nullable id mDelegate; _Nullable dispatch_queue_t mQueue; - MTRCommissioningStatus MapStatus(chip::Controller::DevicePairingDelegate::Status status); + MTRPairingStatus MapStatus(chip::Controller::DevicePairingDelegate::Status status); }; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.mm b/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.mm new file mode 100644 index 00000000000000..f0393f562d8262 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.mm @@ -0,0 +1,114 @@ +/** + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "MTRDevicePairingDelegateBridge.h" +#import "MTRError_Internal.h" + +MTRDevicePairingDelegateBridge::MTRDevicePairingDelegateBridge(void) + : mDelegate(nil) +{ +} + +MTRDevicePairingDelegateBridge::~MTRDevicePairingDelegateBridge(void) {} + +void MTRDevicePairingDelegateBridge::setDelegate(id delegate, dispatch_queue_t queue) +{ + if (delegate && queue) { + mDelegate = delegate; + mQueue = queue; + } else { + mDelegate = nil; + mQueue = nil; + } +} + +MTRPairingStatus MTRDevicePairingDelegateBridge::MapStatus(chip::Controller::DevicePairingDelegate::Status status) +{ + MTRPairingStatus rv = MTRPairingStatusUnknown; + switch (status) { + case chip::Controller::DevicePairingDelegate::Status::SecurePairingSuccess: + rv = MTRPairingStatusSuccess; + break; + case chip::Controller::DevicePairingDelegate::Status::SecurePairingFailed: + rv = MTRPairingStatusFailed; + break; + case chip::Controller::DevicePairingDelegate::Status::SecurePairingDiscoveringMoreDevices: + rv = MTRPairingStatusDiscoveringMoreDevices; + break; + } + return rv; +} + +void MTRDevicePairingDelegateBridge::OnStatusUpdate(chip::Controller::DevicePairingDelegate::Status status) +{ + NSLog(@"DevicePairingDelegate status updated: %d", status); + + id strongDelegate = mDelegate; + if ([strongDelegate respondsToSelector:@selector(onStatusUpdate:)]) { + if (strongDelegate && mQueue) { + MTRPairingStatus pairingStatus = MapStatus(status); + dispatch_async(mQueue, ^{ + [strongDelegate onStatusUpdate:pairingStatus]; + }); + } + } +} + +void MTRDevicePairingDelegateBridge::OnPairingComplete(CHIP_ERROR error) +{ + NSLog(@"DevicePairingDelegate Pairing complete. Status %s", chip::ErrorStr(error)); + + id strongDelegate = mDelegate; + if ([strongDelegate respondsToSelector:@selector(onPairingComplete:)]) { + if (strongDelegate && mQueue) { + dispatch_async(mQueue, ^{ + NSError * nsError = [MTRError errorForCHIPErrorCode:error]; + [strongDelegate onPairingComplete:nsError]; + }); + } + } +} + +void MTRDevicePairingDelegateBridge::OnPairingDeleted(CHIP_ERROR error) +{ + NSLog(@"DevicePairingDelegate Pairing deleted. Status %s", chip::ErrorStr(error)); + + id strongDelegate = mDelegate; + if ([strongDelegate respondsToSelector:@selector(onPairingDeleted:)]) { + if (strongDelegate && mQueue) { + dispatch_async(mQueue, ^{ + NSError * nsError = [MTRError errorForCHIPErrorCode:error]; + [strongDelegate onPairingDeleted:nsError]; + }); + } + } +} + +void MTRDevicePairingDelegateBridge::OnCommissioningComplete(chip::NodeId nodeId, CHIP_ERROR error) +{ + NSLog(@"DevicePairingDelegate Commissioning complete. NodeId %llu Status %s", nodeId, chip::ErrorStr(error)); + + id strongDelegate = mDelegate; + if ([strongDelegate respondsToSelector:@selector(onCommissioningComplete:)]) { + if (strongDelegate && mQueue) { + dispatch_async(mQueue, ^{ + NSError * nsError = [MTRError errorForCHIPErrorCode:error]; + [strongDelegate onCommissioningComplete:nsError]; + }); + } + } +} diff --git a/src/darwin/Framework/CHIP/MTRDevice_Internal.h b/src/darwin/Framework/CHIP/MTRDevice_Internal.h index 04511bfd6ddc19..8be51b0e3fa46c 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDevice_Internal.h @@ -27,14 +27,14 @@ NS_ASSUME_NONNULL_BEGIN typedef void (^MTRDevicePerformAsyncBlock)(MTRBaseDevice * baseDevice); @interface MTRDevice () -- (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller; +- (instancetype)initWithNodeID:(uint64_t)nodeID deviceController:(MTRDeviceController *)deviceController; // Called from MTRClusters for writes and commands - (void)setExpectedValues:(NSArray *> *)values expectedValueInterval:(NSNumber *)expectedValueIntervalMs; -@property (nonatomic, readonly) MTRDeviceController * deviceController; -@property (nonatomic, readonly, copy) NSNumber * nodeID; +@property (nonatomic, readonly, strong, nonnull) MTRDeviceController * deviceController; +@property (nonatomic, readonly) uint64_t nodeID; @end diff --git a/src/darwin/Framework/CHIP/MTRError.h b/src/darwin/Framework/CHIP/MTRError.h index ffed8c8be3b9df..d0c91185b3de41 100644 --- a/src/darwin/Framework/CHIP/MTRError.h +++ b/src/darwin/Framework/CHIP/MTRError.h @@ -75,26 +75,35 @@ typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode){ // clang-format off typedef NS_ERROR_ENUM(MTRInteractionErrorDomain, MTRInteractionErrorCode){ // These values come from the general status code table in the Matter - // Interaction Model specification. + // Interaction Model specification. Do not change these values unless the + // specification changes. MTRInteractionErrorCodeFailure = 0x01, MTRInteractionErrorCodeInvalidSubscription = 0x7d, MTRInteractionErrorCodeUnsupportedAccess = 0x7e, MTRInteractionErrorCodeUnsupportedEndpoint = 0x7f, MTRInteractionErrorCodeInvalidAction = 0x80, MTRInteractionErrorCodeUnsupportedCommand = 0x81, + // Gap in values is intentional. MTRInteractionErrorCodeInvalidCommand = 0x85, MTRInteractionErrorCodeUnsupportedAttribute = 0x86, MTRInteractionErrorCodeConstraintError = 0x87, MTRInteractionErrorCodeUnsupportedWrite = 0x88, MTRInteractionErrorCodeResourceExhausted = 0x89, + // Gap in values is intentional. MTRInteractionErrorCodeNotFound = 0x8b, MTRInteractionErrorCodeUnreportableAttribute = 0x8c, MTRInteractionErrorCodeInvalidDataType = 0x8d, + // Gap in values is intentional. MTRInteractionErrorCodeUnsupportedRead = 0x8f, + // Gap in values is intentional. MTRInteractionErrorCodeDataVersionMismatch = 0x92, + // Gap in values is intentional. MTRInteractionErrorCodeTimeout = 0x94, + // Gap in values is intentional. MTRInteractionErrorCodeBusy = 0x9c, + // Gap in values is intentional. MTRInteractionErrorCodeUnsupportedCluster = 0xc3, + // Gap in values is intentional. MTRInteractionErrorCodeNoUpstreamSubscription = 0xc5, MTRInteractionErrorCodeNeedsTimedInteraction = 0xc6, MTRInteractionErrorCodeUnsupportedEvent = 0xc7, diff --git a/src/darwin/Framework/CHIP/MTRError_Internal.h b/src/darwin/Framework/CHIP/MTRError_Internal.h index 6eaba254b36398..e5e58b3f0f9568 100644 --- a/src/darwin/Framework/CHIP/MTRError_Internal.h +++ b/src/darwin/Framework/CHIP/MTRError_Internal.h @@ -23,8 +23,8 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRError : NSObject -+ (NSError * _Nullable)errorForCHIPErrorCode:(CHIP_ERROR)errorCode; -+ (NSError * _Nullable)errorForIMStatus:(const chip::app::StatusIB &)status; ++ (nullable NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode; ++ (nullable NSError *)errorForIMStatus:(const chip::app::StatusIB &)status; + (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error; @end diff --git a/src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.h b/src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.h index 2f6bcb2ecf0b90..673a43c8909abc 100644 --- a/src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.h +++ b/src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRManualSetupPayloadParser : NSObject - (instancetype)initWithDecimalStringRepresentation:(NSString *)decimalStringRepresentation; -- (MTRSetupPayload * _Nullable)populatePayload:(NSError * __autoreleasing *)error; +- (nullable MTRSetupPayload *)populatePayload:(NSError * __autoreleasing *)error; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAHeader.h b/src/darwin/Framework/CHIP/MTROTAHeaderParser.h similarity index 96% rename from src/darwin/Framework/CHIP/MTROTAHeader.h rename to src/darwin/Framework/CHIP/MTROTAHeaderParser.h index 0684cdb66697aa..b2e753e1ef5a1c 100644 --- a/src/darwin/Framework/CHIP/MTROTAHeader.h +++ b/src/darwin/Framework/CHIP/MTROTAHeaderParser.h @@ -17,11 +17,6 @@ #import -/** - * A representation of an OTA image header as defined in the Matter - * specification's "Over-the-Air (OTA) Software Update File Format" section. - */ - NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, MTROTAImageDigestType) { @@ -44,6 +39,7 @@ typedef NS_ENUM(NSUInteger, MTROTAImageDigestType) { /** * The identifier of the vendor whose product this image is meant for. * + * * This field can be compared to the vendor id received in the Query Image * command to determine whether an image matches. * @@ -105,6 +101,9 @@ typedef NS_ENUM(NSUInteger, MTROTAImageDigestType) { */ @property (nonatomic, copy, nullable) NSNumber * maxApplicableVersion; +@end + +@interface MTROTAHeaderParser : NSObject + (nullable MTROTAHeader *)headerFromData:(NSData *)data error:(NSError * __autoreleasing *)error; @end diff --git a/src/darwin/Framework/CHIP/MTROTAHeader.mm b/src/darwin/Framework/CHIP/MTROTAHeaderParser.mm similarity index 85% rename from src/darwin/Framework/CHIP/MTROTAHeader.mm rename to src/darwin/Framework/CHIP/MTROTAHeaderParser.mm index 2cb6882af34125..558d590e98e5c1 100644 --- a/src/darwin/Framework/CHIP/MTROTAHeader.mm +++ b/src/darwin/Framework/CHIP/MTROTAHeaderParser.mm @@ -15,7 +15,7 @@ * limitations under the License. */ -#import "MTROTAHeader.h" +#import "MTROTAHeaderParser.h" #import "MTRError.h" #import "MTRError_Internal.h" @@ -25,16 +25,17 @@ #include @implementation MTROTAHeader -+ (MTROTAHeader * _Nullable)headerFromData:(NSData *)data error:(NSError * __autoreleasing *)error +@end + +@implementation MTROTAHeaderParser ++ (nullable MTROTAHeader *)headerFromData:(NSData *)data error:(NSError * __autoreleasing *)error { chip::OTAImageHeaderParser parser; parser.Init(); if (!parser.IsInitialized()) { - if (error != nil) { - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]; - } + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]; return nil; } @@ -42,9 +43,7 @@ + (MTROTAHeader * _Nullable)headerFromData:(NSData *)data error:(NSError * __aut chip::OTAImageHeader header; CHIP_ERROR err = parser.AccumulateAndDecode(buffer, header); if (err != CHIP_NO_ERROR) { - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:err]; - } + *error = [MTRError errorForCHIPErrorCode:err]; parser.Clear(); return nil; } diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h b/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h index 1b70e43e01be1a..32e9f748257f60 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h @@ -20,14 +20,6 @@ NS_ASSUME_NONNULL_BEGIN -typedef void (^MTRQueryImageCompletionHandler)( - MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error); - -typedef void (^MTRApplyUpdateRequestCompletionHandler)( - MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error); - -typedef void (^MTRBDXQueryCompletionHandler)(NSData * _Nullable data, BOOL isEOF); - /** * The protocol definition for the MTROTAProviderDelegate * @@ -40,41 +32,43 @@ typedef void (^MTRBDXQueryCompletionHandler)(NSData * _Nullable data, BOOL isEOF * The controller identifies the fabric the node is on, and the nodeID * identifies the node within that fabric. * - * If completion is passed a non-nil error, that will be converted into + * If completionHandler 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 - completion:(MTRQueryImageCompletionHandler)completion; + params:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; /** * 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 completion is passed a non-nil error, that will be converted into + * If completionHandler 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 - completion:(MTRApplyUpdateRequestCompletionHandler)completion; + params:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; /** * 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 completion is passed a non-nil error, that will be converted into + * If completionHandler 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 - completion:(MTRStatusCompletion)completion; + params:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + completionHandler:(StatusCompletion)completionHandler; /** * Notify the delegate when a BDX Session starts for some node. The controller @@ -85,7 +79,7 @@ typedef void (^MTRBDXQueryCompletionHandler)(NSData * _Nullable data, BOOL isEOF controller:(MTRDeviceController *)controller fileDesignator:(NSString *)fileDesignator offset:(NSNumber *)offset - completion:(MTRStatusCompletion)completion; + completionHandler:(void (^)(NSError * error))completionHandler; /** * Notify the delegate when a BDX Session ends for some node. The controller @@ -106,7 +100,7 @@ typedef void (^MTRBDXQueryCompletionHandler)(NSData * _Nullable data, BOOL isEOF blockSize:(NSNumber *)blockSize blockIndex:(NSNumber *)blockIndex bytesToSkip:(NSNumber *)bytesToSkip - completion:(MTRBDXQueryCompletionHandler)completion; + completionHandler:(void (^)(NSData * _Nullable data, BOOL isEOF))completionHandler; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h index 3c69407046e6fa..97aa258dad2617 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h @@ -45,19 +45,19 @@ class MTROTAProviderDelegateBridge : public chip::app::Clusters::OTAProviderDele private: static CHIP_ERROR ConvertToQueryImageParams( const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::DecodableType & commandData, - MTROTASoftwareUpdateProviderClusterQueryImageParams * commandParams); + MTROtaSoftwareUpdateProviderClusterQueryImageParams * commandParams); static void ConvertFromQueryImageResponseParms( - const MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * responseParams, + const MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * responseParams, chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Type & response); static void ConvertToApplyUpdateRequestParams( const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::DecodableType & commandData, - MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams * commandParams); + MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams * commandParams); static void ConvertFromApplyUpdateRequestResponseParms( - const MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * responseParams, + const MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * responseParams, chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Type & response); static void ConvertToNotifyUpdateAppliedParams( const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::DecodableType & commandData, - MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams * commandParams); + MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams * commandParams); _Nullable id mDelegate; dispatch_queue_t mWorkQueue; diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm index 1f4eda27dd5f73..40cf30548c6e8d 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm @@ -16,7 +16,7 @@ */ #import "MTROTAProviderDelegateBridge.h" -#import "MTRDeviceControllerFactory_Internal.h" +#import "MTRControllerFactory_Internal.h" #import "NSDataSpanConversion.h" #import "NSStringSpanConversion.h" @@ -128,7 +128,7 @@ CHIP_ERROR OnTransferSessionBegin(TransferSession::OutputEvent & event) auto fileDesignator = [[NSString alloc] initWithBytes:fd length:fdl encoding:NSUTF8StringEncoding]; auto offset = @(mTransfer.GetStartOffset()); - auto completionHandler = ^(NSError * _Nullable error) { + auto completionHandler = ^(NSError * error) { dispatch_async(mWorkQueue, ^{ if (error != nil) { LogErrorOnFailure([MTRError errorToCHIPErrorCode:error]); @@ -149,7 +149,7 @@ CHIP_ERROR OnTransferSessionBegin(TransferSession::OutputEvent & event) }); }; - auto * controller = [[MTRDeviceControllerFactory sharedInstance] runningControllerForFabricIndex:mFabricIndex.Value()]; + auto * controller = [[MTRControllerFactory sharedInstance] runningControllerForFabricIndex:mFabricIndex.Value()]; VerifyOrReturnError(controller != nil, CHIP_ERROR_INCORRECT_STATE); auto nodeId = @(mNodeId.Value()); @@ -159,7 +159,7 @@ CHIP_ERROR OnTransferSessionBegin(TransferSession::OutputEvent & event) controller:controller fileDesignator:fileDesignator offset:offset - completion:completionHandler]; + completionHandler:completionHandler]; }); return CHIP_NO_ERROR; @@ -177,7 +177,7 @@ CHIP_ERROR OnTransferSessionEnd(TransferSession::OutputEvent & event) error = CHIP_ERROR_INTERNAL; } - auto * controller = [[MTRDeviceControllerFactory sharedInstance] runningControllerForFabricIndex:mFabricIndex.Value()]; + auto * controller = [[MTRControllerFactory sharedInstance] runningControllerForFabricIndex:mFabricIndex.Value()]; VerifyOrReturnError(controller != nil, CHIP_ERROR_INCORRECT_STATE); auto nodeId = @(mNodeId.Value()); @@ -227,7 +227,7 @@ CHIP_ERROR OnBlockQuery(TransferSession::OutputEvent & event) // TODO Handle MaxLength - auto * controller = [[MTRDeviceControllerFactory sharedInstance] runningControllerForFabricIndex:mFabricIndex.Value()]; + auto * controller = [[MTRControllerFactory sharedInstance] runningControllerForFabricIndex:mFabricIndex.Value()]; VerifyOrReturnError(controller != nil, CHIP_ERROR_INCORRECT_STATE); auto nodeId = @(mNodeId.Value()); @@ -238,7 +238,7 @@ CHIP_ERROR OnBlockQuery(TransferSession::OutputEvent & event) blockSize:blockSize blockIndex:blockIndex bytesToSkip:bytesToSkip - completion:completionHandler]; + completionHandler:completionHandler]; }); return CHIP_NO_ERROR; @@ -368,7 +368,7 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath } auto * controller = - [[MTRDeviceControllerFactory sharedInstance] runningControllerForFabricIndex:commandHandler->GetAccessingFabricIndex()]; + [[MTRControllerFactory sharedInstance] runningControllerForFabricIndex:commandHandler->GetAccessingFabricIndex()]; if (controller == nil) { commandHandler->AddStatus(commandPath, Status::Failure); return false; @@ -443,7 +443,7 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath return; } - auto * commandParams = [[MTROTASoftwareUpdateProviderClusterQueryImageParams alloc] init]; + auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterQueryImageParams alloc] init]; CHIP_ERROR err = ConvertToQueryImageParams(commandData, commandParams); if (err != CHIP_NO_ERROR) { commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::InvalidCommand); @@ -455,7 +455,7 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath __block ConcreteCommandPath cachedCommandPath(commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); auto completionHandler = ^( - MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error) { + MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error) { dispatch_async(mWorkQueue, ^{ CommandHandler * handler = EnsureValidState(handle, cachedCommandPath, "QueryImage", data, error); VerifyOrReturn(handler != nullptr); @@ -466,9 +466,9 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath Commands::QueryImageResponse::Type response; ConvertFromQueryImageResponseParms(data, response); - auto hasUpdate = [data.status isEqual:@(MTROTASoftwareUpdateProviderOTAQueryStatusUpdateAvailable)]; + auto hasUpdate = [data.status isEqual:@(MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable)]; auto isBDXProtocolSupported = - [commandParams.protocolsSupported containsObject:@(MTROTASoftwareUpdateProviderOTADownloadProtocolBDXSynchronous)]; + [commandParams.protocolsSupported containsObject:@(MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXSynchronous)]; if (hasUpdate && isBDXProtocolSupported) { auto fabricIndex = handler->GetSubjectDescriptor().fabricIndex; @@ -509,7 +509,7 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath [strongDelegate handleQueryImageForNodeID:@(nodeId) controller:controller params:commandParams - completion:completionHandler]; + completionHandler:completionHandler]; }); } @@ -527,7 +527,7 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath __block ConcreteCommandPath cachedCommandPath(commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); auto completionHandler - = ^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error) { + = ^(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error) { dispatch_async(mWorkQueue, ^{ CommandHandler * handler = EnsureValidState(handle, cachedCommandPath, "ApplyUpdateRequest", data, error); VerifyOrReturn(handler != nullptr); @@ -542,7 +542,7 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath }); }; - auto * commandParams = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; + auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; ConvertToApplyUpdateRequestParams(commandData, commandParams); auto strongDelegate = mDelegate; @@ -550,7 +550,7 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath [strongDelegate handleApplyUpdateRequestForNodeID:@(nodeId) controller:controller params:commandParams - completion:completionHandler]; + completionHandler:completionHandler]; }); } @@ -577,7 +577,7 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath }); }; - auto * commandParams = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; + auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; ConvertToNotifyUpdateAppliedParams(commandData, commandParams); auto strongDelegate = mDelegate; @@ -585,12 +585,12 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath [strongDelegate handleNotifyUpdateAppliedForNodeID:@(nodeId) controller:controller params:commandParams - completion:completionHandler]; + completionHandler:completionHandler]; }); } CHIP_ERROR MTROTAProviderDelegateBridge::ConvertToQueryImageParams( - const Commands::QueryImage::DecodableType & commandData, MTROTASoftwareUpdateProviderClusterQueryImageParams * commandParams) + const Commands::QueryImage::DecodableType & commandData, MTROtaSoftwareUpdateProviderClusterQueryImageParams * commandParams) { commandParams.vendorId = [NSNumber numberWithUnsignedShort:commandData.vendorId]; commandParams.productId = [NSNumber numberWithUnsignedShort:commandData.productId]; @@ -623,7 +623,7 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath } void MTROTAProviderDelegateBridge::ConvertFromQueryImageResponseParms( - const MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * responseParams, + const MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * responseParams, Commands::QueryImageResponse::Type & response) { response.status = static_cast([responseParams.status intValue]); @@ -659,14 +659,14 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath void MTROTAProviderDelegateBridge::ConvertToApplyUpdateRequestParams( const Commands::ApplyUpdateRequest::DecodableType & commandData, - MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams * commandParams) + MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams * commandParams) { commandParams.updateToken = AsData(commandData.updateToken); commandParams.newVersion = [NSNumber numberWithUnsignedLong:commandData.newVersion]; } void MTROTAProviderDelegateBridge::ConvertFromApplyUpdateRequestResponseParms( - const MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * responseParams, + const MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * responseParams, Commands::ApplyUpdateResponse::Type & response) { response.action = static_cast([responseParams.action intValue]); @@ -675,7 +675,7 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath void MTROTAProviderDelegateBridge::ConvertToNotifyUpdateAppliedParams( const Commands::NotifyUpdateApplied::DecodableType & commandData, - MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams * commandParams) + MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams * commandParams) { commandParams.updateToken = AsData(commandData.updateToken); commandParams.softwareVersion = [NSNumber numberWithUnsignedLong:commandData.softwareVersion]; diff --git a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h index b84672b791695f..a3edfce8e600aa 100644 --- a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h +++ b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h @@ -29,8 +29,8 @@ typedef NS_ENUM(NSUInteger, MTROnboardingPayloadType) { @interface MTROnboardingPayloadParser : NSObject -+ (MTRSetupPayload * _Nullable)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload - error:(NSError * __autoreleasing *)error; ++ (nullable MTRSetupPayload *)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload + error:(NSError * __autoreleasing *)error; @end diff --git a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m index fb73932d5a3a42..123da2918e8d5e 100644 --- a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m +++ b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m @@ -27,8 +27,8 @@ + (bool)isQRCode:(NSString *)codeString return [codeString hasPrefix:@"MT:"]; } -+ (MTRSetupPayload * _Nullable)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload - error:(NSError * __autoreleasing *)error ++ (nullable MTRSetupPayload *)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload + error:(NSError * __autoreleasing *)error { MTRSetupPayload * payload; // MTROnboardingPayloadTypeNFC is of type QR code and handled same as QR code @@ -47,16 +47,16 @@ + (MTRSetupPayload * _Nullable)setupPayloadForOnboardingPayload:(NSString *)onbo return payload; } -+ (MTRSetupPayload * _Nullable)setupPayloadForQRCodeOnboardingPayload:(NSString *)onboardingPayload - error:(NSError * __autoreleasing *)error ++ (nullable MTRSetupPayload *)setupPayloadForQRCodeOnboardingPayload:(NSString *)onboardingPayload + error:(NSError * __autoreleasing *)error { MTRQRCodeSetupPayloadParser * qrCodeParser = [[MTRQRCodeSetupPayloadParser alloc] initWithBase38Representation:onboardingPayload]; return [qrCodeParser populatePayload:error]; } -+ (MTRSetupPayload * _Nullable)setupPayloadForManualCodeOnboardingPayload:(NSString *)onboardingPayload - error:(NSError * __autoreleasing *)error ++ (nullable MTRSetupPayload *)setupPayloadForManualCodeOnboardingPayload:(NSString *)onboardingPayload + error:(NSError * __autoreleasing *)error { MTRManualSetupPayloadParser * manualParser = [[MTRManualSetupPayloadParser alloc] initWithDecimalStringRepresentation:onboardingPayload]; diff --git a/src/darwin/Framework/CHIP/MTRStorage.h b/src/darwin/Framework/CHIP/MTRPersistentStorageDelegate.h similarity index 79% rename from src/darwin/Framework/CHIP/MTRStorage.h rename to src/darwin/Framework/CHIP/MTRPersistentStorageDelegate.h index 2dcba9d330a8c7..248df57d67b60d 100644 --- a/src/darwin/Framework/CHIP/MTRStorage.h +++ b/src/darwin/Framework/CHIP/MTRPersistentStorageDelegate.h @@ -20,19 +20,18 @@ NS_ASSUME_NONNULL_BEGIN /** - * This protocol is used by the Matter framework to read and write storage. + * The protocol definition for the CHIPPersistenStorageDelegate * - * All storage methods will be called on a single internal work queue (so the - * implementation does not need to worry about reads and writes racing). + * All delegate methods will be called on the supplied Delegate Queue. */ -@protocol MTRStorage +@protocol MTRPersistentStorageDelegate @required /** * Get the data for the given key. Returns nil if there is no data for the * key. */ -- (NSData * _Nullable)storageDataForKey:(NSString *)key; +- (nullable NSData *)storageDataForKey:(NSString *)key; /** * Set the data for the viven key to the given value. Returns YES if the key diff --git a/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.h b/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.h index 6b5f13452182e9..dfa210c74e31ae 100644 --- a/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.h +++ b/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.h @@ -15,7 +15,7 @@ * limitations under the License. */ -#import "MTRStorage.h" +#import "MTRPersistentStorageDelegate.h" #import "MTRError_Internal.h" #include @@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN class MTRPersistentStorageDelegateBridge : public chip::PersistentStorageDelegate { public: - MTRPersistentStorageDelegateBridge(id delegate); + MTRPersistentStorageDelegateBridge(id delegate); ~MTRPersistentStorageDelegateBridge(); CHIP_ERROR SyncGetKeyValue(const char * key, void * buffer, uint16_t & size) override; @@ -35,7 +35,7 @@ class MTRPersistentStorageDelegateBridge : public chip::PersistentStorageDelegat CHIP_ERROR SyncDeleteKeyValue(const char * key) override; private: - id mDelegate; + id mDelegate; dispatch_queue_t mWorkQueue; }; diff --git a/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.mm b/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.mm index fdcde68d6799cc..37993200e6251f 100644 --- a/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.mm @@ -19,7 +19,7 @@ #define LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE 0 -MTRPersistentStorageDelegateBridge::MTRPersistentStorageDelegateBridge(id delegate) +MTRPersistentStorageDelegateBridge::MTRPersistentStorageDelegateBridge(id delegate) : mDelegate(delegate) , mWorkQueue(dispatch_queue_create("com.csa.matter.framework.storage.workqueue", DISPATCH_QUEUE_SERIAL)) { diff --git a/src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.h b/src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.h index 9a93a52113405e..ab0e6f63017496 100644 --- a/src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.h +++ b/src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRQRCodeSetupPayloadParser : NSObject - (instancetype)initWithBase38Representation:(NSString *)base38Representation; -- (MTRSetupPayload * _Nullable)populatePayload:(NSError * __autoreleasing *)error; +- (nullable MTRSetupPayload *)populatePayload:(NSError * __autoreleasing *)error; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload.h b/src/darwin/Framework/CHIP/MTRSetupPayload.h index e8c363961a2c77..de50f84211eeae 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload.h +++ b/src/darwin/Framework/CHIP/MTRSetupPayload.h @@ -19,9 +19,8 @@ NS_ASSUME_NONNULL_BEGIN -typedef NS_OPTIONS(NSUInteger, MTRDiscoveryCapabilities) { - MTRDiscoveryCapabilitiesUnknown = 0, // Device capabilties are not known - // (e.g. all we have is a numeric code). +typedef NS_ENUM(NSUInteger, MTRDiscoveryCapabilities) { + MTRDiscoveryCapabilitiesNone = 0, // Device does not support any method for rendezvous MTRDiscoveryCapabilitiesSoftAP = 1 << 0, // Device supports WiFi softAP MTRDiscoveryCapabilitiesBLE = 1 << 1, // Device supports BLE MTRDiscoveryCapabilitiesOnNetwork = 1 << 2, // Device supports On Network setup @@ -31,21 +30,20 @@ typedef NS_OPTIONS(NSUInteger, MTRDiscoveryCapabilities) { }; typedef NS_ENUM(NSUInteger, MTRCommissioningFlow) { - MTRCommissioningFlowStandard = 0, // Device automatically enters commissioning mode upon power-up - MTRCommissioningFlowUserActionRequired = 1, // Device requires a user interaction to enter commissioning mode + MTRCommissioningFlowStandard = 0, // Device automatically enters pairing mode upon power-up + MTRCommissioningFlowUserActionRequired = 1, // Device requires a user interaction to enter pairing mode MTRCommissioningFlowCustom = 2, // Commissioning steps should be retrieved from the distributed compliance ledger MTRCommissioningFlowInvalid = 3, }; -typedef NS_ENUM(NSUInteger, MTROptionalQRCodeInfoType) { MTROptionalQRCodeInfoTypeString, MTROptionalQRCodeInfoTypeInt32 }; +typedef NS_ENUM(NSUInteger, MTROptionalQRCodeInfoType) { + MTROptionalQRCodeInfoTypeUnknown, + MTROptionalQRCodeInfoTypeString, + MTROptionalQRCodeInfoTypeInt32 +}; -/** - * An optional information item present in the QR code the setup payload was - * initialized from. - */ @interface MTROptionalQRCodeInfo : NSObject -@property (nonatomic, assign) MTROptionalQRCodeInfoType infoType; -// The numeric value of the TLV tag for this information item. +@property (nonatomic, copy) NSNumber * infoType; @property (nonatomic, copy) NSNumber * tag; // Exactly one of integerValue and stringValue will be non-nil, depending on the // the value of "infoType". @@ -53,12 +51,6 @@ typedef NS_ENUM(NSUInteger, MTROptionalQRCodeInfoType) { MTROptionalQRCodeInfoTy @property (nonatomic, copy, nullable) NSString * stringValue; @end -/** - * A setup payload that can be created from a numeric code or QR code and - * serialized to a numeric code or QR code, though serializing to QR code after - * creating from numeric code will not work, because some required information - * will be missing. - */ @interface MTRSetupPayload : NSObject @property (nonatomic, copy) NSNumber * version; @@ -66,55 +58,31 @@ typedef NS_ENUM(NSUInteger, MTROptionalQRCodeInfoType) { MTROptionalQRCodeInfoTy @property (nonatomic, copy) NSNumber * productID; @property (nonatomic, assign) MTRCommissioningFlow commissioningFlow; /** - * The value of discoveryCapabilities is made up of the various MTRDiscoveryCapabilities flags. + * rendezvousInformation is nil when the discovery capabilities bitmask is + * unknown. + * + * Otherwise its value is made up of the MTRDiscoveryCapabilities flags. */ -@property (nonatomic, assign) MTRDiscoveryCapabilities discoveryCapabilities; +@property (nonatomic, copy, nullable) NSNumber * rendezvousInformation; @property (nonatomic, copy) NSNumber * discriminator; -/** - * If hasShortDiscriminator is true, the discriminator value contains just the - * high 4 bits of the full discriminator. For example, if - * hasShortDiscriminator is true and discriminator is 0xA, then the full - * discriminator can be anything in the range 0xA00 t0 0xAFF. - */ @property (nonatomic, assign) BOOL hasShortDiscriminator; -@property (nonatomic, copy) NSNumber * setupPasscode; +@property (nonatomic, copy) NSNumber * setUpPINCode; @property (nonatomic, copy, nullable) NSString * serialNumber; -- (NSArray * _Nullable)getAllOptionalVendorData:(NSError * __autoreleasing *)error; +- (nullable NSArray *)getAllOptionalVendorData:(NSError * __autoreleasing *)error; /** - * Generate a random Matter-valid setup passcode. + * Generate a random Matter-valid setup PIN. */ -+ (NSNumber *)generateRandomSetupPasscode; ++ (NSUInteger)generateRandomPIN; /** - * Create an MTRSetupPayload with the given onboarding payload. - * - * Will return nil on errors (e.g. if the onboarding payload cannot be parsed). - */ -+ (MTRSetupPayload * _Nullable)setupPayloadWithOnboardingPayload:(NSString *)onboardingPayload - error:(NSError * __autoreleasing *)error; - -/** - * Initialize an MTRSetupPayload with the given passcode and discriminator. - * This will pre-set version, product id, and vendor id to 0. + * Generate a random Matter-valid setup passcode. */ -- (instancetype)initWithSetupPasscode:(NSNumber *)setupPasscode discriminator:(NSNumber *)discriminator; ++ (NSNumber *)generateRandomSetupPasscode; /** Get 11 digit manual entry code from the setup payload. */ -- (NSString * _Nullable)manualEntryCode; - -/** - * Get a QR code from the setup payload. - * - * Returns nil on failure (e.g. if the setup payload does not have all the - * information a QR code needs). - */ -- (NSString * _Nullable)qrCodeString; - -// A setup payload must have a passcode and a discriminator at the very least. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; +- (nullable NSString *)manualEntryCode; @end diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload.mm b/src/darwin/Framework/CHIP/MTRSetupPayload.mm index 2069cd06e6ebb8..3f058023bc45eb 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload.mm +++ b/src/darwin/Framework/CHIP/MTRSetupPayload.mm @@ -17,10 +17,8 @@ #import "MTRError.h" #import "MTRError_Internal.h" -#import "MTROnboardingPayloadParser.h" #import "MTRSetupPayload_Internal.h" #import "setup_payload/ManualSetupPayloadGenerator.h" -#import "setup_payload/QRCodeSetupPayloadGenerator.h" #import @implementation MTROptionalQRCodeInfo @@ -30,13 +28,13 @@ @implementation MTRSetupPayload { chip::SetupPayload _chipSetupPayload; } -- (MTRDiscoveryCapabilities)convertRendezvousFlags:(const chip::Optional &)value +- (NSNumber *)convertRendezvousFlags:(const chip::Optional &)value { if (!value.HasValue()) { - return MTRDiscoveryCapabilitiesUnknown; + return nil; } - NSUInteger flags = 0; + NSUInteger flags = MTRDiscoveryCapabilitiesNone; if (value.Value().Has(chip::RendezvousInformationFlag::kBLE)) { flags |= MTRDiscoveryCapabilitiesBLE; } @@ -46,30 +44,7 @@ - (MTRDiscoveryCapabilities)convertRendezvousFlags:(const chip::Optional)convertDiscoveryCapabilities:(MTRDiscoveryCapabilities)value -{ - if (value == MTRDiscoveryCapabilitiesUnknown) { - return chip::NullOptional; - } - - chip::RendezvousInformationFlags flags; - if (value & MTRDiscoveryCapabilitiesBLE) { - flags.Set(chip::RendezvousInformationFlag::kBLE); - } - if (value & MTRDiscoveryCapabilitiesSoftAP) { - flags.Set(chip::RendezvousInformationFlag::kSoftAP); - } - if (value & MTRDiscoveryCapabilitiesOnNetwork) { - flags.Set(chip::RendezvousInformationFlag::kOnNetwork); - } - return chip::MakeOptional(flags); + return [NSNumber numberWithUnsignedLong:flags]; } - (MTRCommissioningFlow)convertCommissioningFlow:(chip::CommissioningFlow)value @@ -86,23 +61,7 @@ - (MTRCommissioningFlow)convertCommissioningFlow:(chip::CommissioningFlow)value return MTRCommissioningFlowInvalid; } -+ (chip::CommissioningFlow)unconvertCommissioningFlow:(MTRCommissioningFlow)value -{ - if (value == MTRCommissioningFlowStandard) { - return chip::CommissioningFlow::kStandard; - } - if (value == MTRCommissioningFlowUserActionRequired) { - return chip::CommissioningFlow::kUserActionRequired; - } - if (value == MTRCommissioningFlowCustom) { - return chip::CommissioningFlow::kCustom; - } - // It's MTRCommissioningFlowInvalid ... now what? But in practice - // this is not called when we have MTRCommissioningFlowInvalid. - return chip::CommissioningFlow::kStandard; -} - -- (instancetype)initWithSetupPayload:(chip::SetupPayload)setupPayload +- (id)initWithSetupPayload:(chip::SetupPayload)setupPayload { if (self = [super init]) { _chipSetupPayload = setupPayload; @@ -110,36 +69,20 @@ - (instancetype)initWithSetupPayload:(chip::SetupPayload)setupPayload _vendorID = [NSNumber numberWithUnsignedShort:setupPayload.vendorID]; _productID = [NSNumber numberWithUnsignedShort:setupPayload.productID]; _commissioningFlow = [self convertCommissioningFlow:setupPayload.commissioningFlow]; - _discoveryCapabilities = [self convertRendezvousFlags:setupPayload.rendezvousInformation]; + _rendezvousInformation = [self convertRendezvousFlags:setupPayload.rendezvousInformation]; _hasShortDiscriminator = setupPayload.discriminator.IsShortDiscriminator(); if (_hasShortDiscriminator) { _discriminator = [NSNumber numberWithUnsignedShort:setupPayload.discriminator.GetShortValue()]; } else { _discriminator = [NSNumber numberWithUnsignedShort:setupPayload.discriminator.GetLongValue()]; } - _setupPasscode = [NSNumber numberWithUnsignedInt:setupPayload.setUpPINCode]; + _setUpPINCode = [NSNumber numberWithUnsignedInt:setupPayload.setUpPINCode]; [self getSerialNumber:setupPayload]; } return self; } -- (instancetype)initWithSetupPasscode:(NSNumber *)setupPasscode discriminator:(NSNumber *)discriminator -{ - if (self = [super init]) { - _version = @(0); // Only supported Matter version so far. - _vendorID = @(0); // Not available. - _productID = @(0); // Not available. - _commissioningFlow = MTRCommissioningFlowStandard; - _discoveryCapabilities = MTRDiscoveryCapabilitiesUnknown; - _hasShortDiscriminator = NO; - _discriminator = discriminator; - _setupPasscode = setupPasscode; - _serialNumber = nil; - } - return self; -} - - (void)getSerialNumber:(chip::SetupPayload)setupPayload { std::string serialNumberC; @@ -158,11 +101,11 @@ - (void)getSerialNumber:(chip::SetupPayload)setupPayload info.tag = [NSNumber numberWithUnsignedChar:chipInfo.tag]; switch (chipInfo.type) { case chip::optionalQRCodeInfoTypeString: - info.infoType = MTROptionalQRCodeInfoTypeString; + info.infoType = [NSNumber numberWithInt:MTROptionalQRCodeInfoTypeString]; info.stringValue = [NSString stringWithUTF8String:chipInfo.data.c_str()]; break; case chip::optionalQRCodeInfoTypeInt32: - info.infoType = MTROptionalQRCodeInfoTypeInt32; + info.infoType = [NSNumber numberWithInt:MTROptionalQRCodeInfoTypeInt32]; info.integerValue = [NSNumber numberWithInt:chipInfo.int32]; break; default: @@ -176,6 +119,11 @@ - (void)getSerialNumber:(chip::SetupPayload)setupPayload return allOptionalData; } ++ (NSUInteger)generateRandomPIN +{ + return [[MTRSetupPayload generateRandomSetupPasscode] unsignedIntValue]; +} + + (NSNumber *)generateRandomSetupPasscode { do { @@ -195,23 +143,16 @@ + (NSNumber *)generateRandomSetupPasscode return @(chip::kSetupPINCodeUndefinedValue); } -+ (MTRSetupPayload * _Nullable)setupPayloadWithOnboardingPayload:(NSString *)onboardingPayload - error:(NSError * __autoreleasing *)error -{ - // TODO: Do we actually need the MTROnboardingPayloadParser abstraction? - return [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:onboardingPayload error:error]; -} - #pragma mark - NSSecureCoding static NSString * const MTRSetupPayloadCodingKeyVersion = @"MTRSP.ck.version"; static NSString * const MTRSetupPayloadCodingKeyVendorID = @"MTRSP.ck.vendorID"; static NSString * const MTRSetupPayloadCodingKeyProductID = @"MTRSP.ck.productID"; static NSString * const MTRSetupPayloadCodingKeyCommissioningFlow = @"MTRSP.ck.commissioningFlow"; -static NSString * const MTRSetupPayloadCodingKeyDiscoveryCapabilities = @"MTRSP.ck.discoveryCapabilities"; +static NSString * const MTRSetupPayloadCodingKeyRendezvousFlags = @"MTRSP.ck.rendezvousFlags"; static NSString * const MTRSetupPayloadCodingKeyHasShortDiscriminator = @"MTRSP.ck.hasShortDiscriminator"; static NSString * const MTRSetupPayloadCodingKeyDiscriminator = @"MTRSP.ck.discriminator"; -static NSString * const MTRSetupPayloadCodingKeySetupPasscode = @"MTRSP.ck.setupPasscode"; +static NSString * const MTRSetupPayloadCodingKeySetupPINCode = @"MTRSP.ck.setupPINCode"; static NSString * const MTRSetupPayloadCodingKeySerialNumber = @"MTRSP.ck.serialNumber"; + (BOOL)supportsSecureCoding @@ -224,26 +165,27 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:self.version forKey:MTRSetupPayloadCodingKeyVersion]; [coder encodeObject:self.vendorID forKey:MTRSetupPayloadCodingKeyVendorID]; [coder encodeObject:self.productID forKey:MTRSetupPayloadCodingKeyProductID]; - // Casts are safe because commissioning flow, discoveryCapabilities, and - // hasShortDiscriminator values are all pretty small and non-negative. + // Casts are safe because commissioning flow and hasShortDiscriminator + // values are both pretty small and non-negative. [coder encodeInteger:static_cast(self.commissioningFlow) forKey:MTRSetupPayloadCodingKeyCommissioningFlow]; - [coder encodeInteger:static_cast(self.discoveryCapabilities) forKey:MTRSetupPayloadCodingKeyDiscoveryCapabilities]; + [coder encodeObject:self.rendezvousInformation forKey:MTRSetupPayloadCodingKeyRendezvousFlags]; [coder encodeInteger:static_cast(self.hasShortDiscriminator) forKey:MTRSetupPayloadCodingKeyHasShortDiscriminator]; [coder encodeObject:self.discriminator forKey:MTRSetupPayloadCodingKeyDiscriminator]; - [coder encodeObject:self.setupPasscode forKey:MTRSetupPayloadCodingKeySetupPasscode]; + [coder encodeObject:self.setUpPINCode forKey:MTRSetupPayloadCodingKeySetupPINCode]; [coder encodeObject:self.serialNumber forKey:MTRSetupPayloadCodingKeySerialNumber]; } -- (instancetype _Nullable)initWithCoder:(NSCoder *)decoder +- (nullable instancetype)initWithCoder:(NSCoder *)decoder { NSNumber * version = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeyVersion]; NSNumber * vendorID = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeyVendorID]; NSNumber * productID = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeyProductID]; NSInteger commissioningFlow = [decoder decodeIntegerForKey:MTRSetupPayloadCodingKeyCommissioningFlow]; - NSInteger discoveryCapabilities = [decoder decodeIntegerForKey:MTRSetupPayloadCodingKeyDiscoveryCapabilities]; + NSNumber * rendezvousInformation = [decoder decodeObjectOfClass:[NSNumber class] + forKey:MTRSetupPayloadCodingKeyRendezvousFlags]; NSInteger hasShortDiscriminator = [decoder decodeIntegerForKey:MTRSetupPayloadCodingKeyHasShortDiscriminator]; NSNumber * discriminator = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeyDiscriminator]; - NSNumber * setupPasscode = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeySetupPasscode]; + NSNumber * setUpPINCode = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeySetupPINCode]; NSString * serialNumber = [decoder decodeObjectOfClass:[NSString class] forKey:MTRSetupPayloadCodingKeySerialNumber]; MTRSetupPayload * payload = [[MTRSetupPayload alloc] init]; @@ -251,16 +193,16 @@ - (instancetype _Nullable)initWithCoder:(NSCoder *)decoder payload.vendorID = vendorID; payload.productID = productID; payload.commissioningFlow = static_cast(commissioningFlow); - payload.discoveryCapabilities = static_cast(discoveryCapabilities); + payload.rendezvousInformation = rendezvousInformation; payload.hasShortDiscriminator = static_cast(hasShortDiscriminator); payload.discriminator = discriminator; - payload.setupPasscode = setupPasscode; + payload.setUpPINCode = setUpPINCode; payload.serialNumber = serialNumber; return payload; } -- (NSString * _Nullable)manualEntryCode +- (nullable NSString *)manualEntryCode { CHIP_ERROR err = CHIP_NO_ERROR; std::string outDecimalString; @@ -274,7 +216,7 @@ - (NSString * _Nullable)manualEntryCode } else { payload.discriminator.SetLongValue([self.discriminator unsignedShortValue]); } - payload.setUpPINCode = [self.setupPasscode unsignedIntValue]; + payload.setUpPINCode = [self.setUpPINCode unsignedIntValue]; err = chip::ManualSetupPayloadGenerator(payload).payloadDecimalStringRepresentation(outDecimalString); @@ -285,41 +227,4 @@ - (NSString * _Nullable)manualEntryCode return [NSString stringWithUTF8String:outDecimalString.c_str()]; } -- (NSString * _Nullable)qrCodeString -{ - if (self.commissioningFlow == MTRCommissioningFlowInvalid) { - // No idea how to map this to the standard codes. - return nil; - } - - if (self.hasShortDiscriminator) { - // Can't create a QR code with a short discriminator. - return nil; - } - - if (self.discoveryCapabilities == MTRDiscoveryCapabilitiesUnknown) { - // Can't create a QR code if we don't know the discovery capabilities. - return nil; - } - - chip::SetupPayload payload; - - payload.version = [self.version unsignedCharValue]; - payload.vendorID = [self.vendorID unsignedShortValue]; - payload.productID = [self.productID unsignedShortValue]; - payload.commissioningFlow = [MTRSetupPayload unconvertCommissioningFlow:self.commissioningFlow]; - payload.rendezvousInformation = [MTRSetupPayload convertDiscoveryCapabilities:self.discoveryCapabilities]; - payload.discriminator.SetLongValue([self.discriminator unsignedShortValue]); - payload.setUpPINCode = [self.setupPasscode unsignedIntValue]; - - std::string outDecimalString; - CHIP_ERROR err = chip::QRCodeSetupPayloadGenerator(payload).payloadBase38Representation(outDecimalString); - - if (err != CHIP_NO_ERROR) { - return nil; - } - - return [NSString stringWithUTF8String:outDecimalString.c_str()]; -} - @end diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload_Internal.h b/src/darwin/Framework/CHIP/MTRSetupPayload_Internal.h index 6cac43e7d5ea4b..4abd9d9e8a5b05 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload_Internal.h +++ b/src/darwin/Framework/CHIP/MTRSetupPayload_Internal.h @@ -17,8 +17,8 @@ @interface MTRSetupPayload () #ifdef __cplusplus -- (instancetype)initWithSetupPayload:(chip::SetupPayload)setupPayload; -- (MTRDiscoveryCapabilities)convertRendezvousFlags:(const chip::Optional &)value; +- (id)initWithSetupPayload:(chip::SetupPayload)setupPayload; +- (NSNumber *)convertRendezvousFlags:(const chip::Optional &)value; - (MTRCommissioningFlow)convertCommissioningFlow:(chip::CommissioningFlow)value; #endif diff --git a/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.h b/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.h index b22ab9ccf59389..17d42ff6cc5813 100644 --- a/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.h +++ b/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.h @@ -19,82 +19,68 @@ NS_ASSUME_NONNULL_BEGIN -/** - * MTRThreadOperationalDataset allows converting between an "expanded" view of - * the dataset (with the separate fields) and a single-blob NSData view. - * - * The latter can be used to pass Thread network credentials via - * MTRCommissioningParameters. - */ @interface MTRThreadOperationalDataset : NSObject /** - * The expected lengths of each of the NSData fields in the MTRThreadOperationalDataset + * The expected lengths of each of the NSData fields in the CHIPThreadOperationalDataset + * + * initWithNetworkName must be provided NSData fields with at least these lengths otherwise + * the object will fail to init. */ extern size_t const MTRSizeThreadNetworkName; -extern size_t const MTRSizeThreadExtendedPANID; +extern size_t const MTRSizeThreadExtendedPanId; extern size_t const MTRSizeThreadMasterKey; extern size_t const MTRSizeThreadPSKc; -extern size_t const MTRSizeThreadPANID; /** - * The Thread Network name + * The Thread Network name */ -@property (nonatomic, copy, readonly) NSString * networkName; +@property (nonatomic, nullable, copy, readonly) NSString * networkName; /** - * The Thread Network extendended PAN ID + * The Thread Network extendended PAN ID */ -@property (nonatomic, copy, readonly) NSData * extendedPANID; +@property (nonatomic, nullable, copy, readonly) NSData * extendedPANID; /** - * The 16 byte Master Key + * The 16 byte Master Key */ -@property (nonatomic, copy, readonly) NSData * masterKey; +@property (nonatomic, nullable, copy, readonly) NSData * masterKey; /** - * The Thread PSKc + * The Thread PSKc */ -@property (nonatomic, copy, readonly) NSData * PSKc; +@property (nonatomic, nullable, copy, readonly) NSData * PSKc; /** - * The Thread network channel. Always an unsigned 16-bit integer. + * The Thread network channel */ -@property (nonatomic, copy, readonly) NSNumber * channel; +@property (nonatomic, readwrite) uint16_t channel; /** - * A uint16_t stored as 2-bytes in host order representing the Thread PAN ID + * A uint16_t stored as 2-bytes in host order representing the Thread PAN ID */ -@property (nonatomic, copy, readonly) NSData * panID; +@property (nonatomic, nullable, copy, readonly) NSData * panID; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; /** - * Create a Thread Operational Dataset object with the individual network - * fields. + * Create a Thread Operational Dataset object with the individual network fields. + * This initializer will return nil if any of the NSData fields don't match the expected size. * - * @param extendedPANID Must be MTRSizeThreadExtendedPANID bytes. Otherwise nil - * will be returned. - * @param masterKey Must be MTRSizeThreadMasterKey bytes. Otherwise nil will be - * returned. - * @param PSKc Must be MTRSizeThreadPSKc bytes. Otherwise nil will be returned. - * @param channel Must be an unsigned 16-bit value. - * @param panID Must be MTRSizeThreadPANID bytes. Otherwise nil will be - * returned. In particular, it's expected to be a 16-bit unsigned - * integer stored as 2 bytes in host order. + * Note: The panID is expected to be a uint16_t stored as 2-bytes in host order */ -- (instancetype _Nullable)initWithNetworkName:(NSString *)networkName - extendedPANID:(NSData *)extendedPANID - masterKey:(NSData *)masterKey - PSKc:(NSData *)PSKc - channel:(NSNumber *)channel - panID:(NSData *)panID; +- (nullable instancetype)initWithNetworkName:(NSString *)networkName + extendedPANID:(NSData *)extendedPANID + masterKey:(NSData *)masterKey + PSKc:(NSData *)PSKc + channel:(uint16_t)channel + panID:(NSData *)panID; /** - * Create a Thread Operational Dataset object with a RCP formatted active operational dataset. - * This initializer will return nil if the input data cannot be parsed correctly + * Create a Thread Operational Dataset object with a RCP formatted active operational dataset. + * This initializer will return nil if the input data cannot be parsed correctly */ -- (instancetype _Nullable)initWithData:(NSData *)data; +- (nullable instancetype)initWithData:(NSData *)data; /** * Get the underlying data that represents the Thread Active Operational Dataset - * This can be used for the threadOperationalDataset of MTRCommissioningParameters. */ - (NSData *)data; diff --git a/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.mm b/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.mm index 37eb23175966da..945551724ca798 100644 --- a/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.mm +++ b/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.mm @@ -22,10 +22,9 @@ #include size_t const MTRSizeThreadNetworkName = chip::Thread::kSizeNetworkName; -size_t const MTRSizeThreadExtendedPANID = chip::Thread::kSizeExtendedPanId; +size_t const MTRSizeThreadExtendedPanId = chip::Thread::kSizeExtendedPanId; size_t const MTRSizeThreadMasterKey = chip::Thread::kSizeMasterKey; size_t const MTRSizeThreadPSKc = chip::Thread::kSizePSKc; -size_t const MTRSizeThreadPANID = 2; // Thread's PAN ID is 2 bytes @interface MTRThreadOperationalDataset () @@ -35,12 +34,12 @@ @interface MTRThreadOperationalDataset () @implementation MTRThreadOperationalDataset -- (instancetype _Nullable)initWithNetworkName:(NSString *)networkName - extendedPANID:(NSData *)extendedPANID - masterKey:(NSData *)masterKey - PSKc:(NSData *)PSKc - channel:(NSNumber *)channel - panID:(NSData *)panID +- (nullable instancetype)initWithNetworkName:(NSString *)networkName + extendedPANID:(NSData *)extendedPANID + masterKey:(NSData *)masterKey + PSKc:(NSData *)PSKc + channel:(uint16_t)channel + panID:(NSData *)panID { if (self = [super init]) { _networkName = networkName; @@ -62,41 +61,43 @@ - (BOOL)_populateCppOperationalDataset _cppThreadOperationalDataset.Clear(); _cppThreadOperationalDataset.SetNetworkName([self.networkName cStringUsingEncoding:NSUTF8StringEncoding]); - if (![self _checkDataLength:self.extendedPANID expectedLength:MTRSizeThreadExtendedPANID]) { + if (![self _checkDataLength:self.extendedPANID expectedLength:chip::Thread::kSizeExtendedPanId]) { MTR_LOG_ERROR("Invalid ExtendedPANID"); return NO; } - uint8_t extendedPanId[MTRSizeThreadExtendedPANID]; - [self.extendedPANID getBytes:&extendedPanId length:MTRSizeThreadExtendedPANID]; + uint8_t extendedPanId[chip::Thread::kSizeExtendedPanId]; + [self.extendedPANID getBytes:&extendedPanId length:chip::Thread::kSizeExtendedPanId]; _cppThreadOperationalDataset.SetExtendedPanId(extendedPanId); - if (![self _checkDataLength:self.masterKey expectedLength:MTRSizeThreadMasterKey]) { + if (![self _checkDataLength:self.masterKey expectedLength:chip::Thread::kSizeMasterKey]) { MTR_LOG_ERROR("Invalid MasterKey"); return NO; } - uint8_t masterKey[MTRSizeThreadMasterKey]; - [self.masterKey getBytes:&masterKey length:MTRSizeThreadMasterKey]; + uint8_t masterKey[chip::Thread::kSizeMasterKey]; + [self.masterKey getBytes:&masterKey length:chip::Thread::kSizeMasterKey]; _cppThreadOperationalDataset.SetMasterKey(masterKey); - if (![self _checkDataLength:self.PSKc expectedLength:MTRSizeThreadPSKc]) { + if (![self _checkDataLength:self.PSKc expectedLength:chip::Thread::kSizePSKc]) { MTR_LOG_ERROR("Invalid PKSc"); return NO; } - uint8_t PSKc[MTRSizeThreadPSKc]; - [self.PSKc getBytes:&PSKc length:MTRSizeThreadPSKc]; + uint8_t PSKc[chip::Thread::kSizePSKc]; + [self.PSKc getBytes:&PSKc length:chip::Thread::kSizePSKc]; _cppThreadOperationalDataset.SetPSKc(PSKc); - _cppThreadOperationalDataset.SetChannel([self.channel unsignedShortValue]); + _cppThreadOperationalDataset.SetChannel(self.channel); // Thread's PAN ID is 2 bytes - if (![self _checkDataLength:self.panID expectedLength:MTRSizeThreadPANID]) { + if (![self _checkDataLength:self.panID expectedLength:2]) { MTR_LOG_ERROR("Invalid PAN ID"); return NO; } - uint16_t panID; - memcpy(&panID, [self.panID bytes], MTRSizeThreadPANID); + uint16_t * valuePtr = (uint16_t *) [self.panID bytes]; + if (valuePtr == nullptr) { + return NO; + } // The underlying CPP class assumes Big Endianness for the panID - _cppThreadOperationalDataset.SetPanId(CFSwapInt16HostToBig(panID)); + _cppThreadOperationalDataset.SetPanId(CFSwapInt16HostToBig(*valuePtr)); return YES; } @@ -110,7 +111,7 @@ - (BOOL)_checkDataLength:(NSData *)data expectedLength:(size_t)expectedLength return YES; } -- (instancetype _Nullable)initWithData:(NSData *)data +- (nullable instancetype)initWithData:(NSData *)data { chip::ByteSpan span = chip::ByteSpan((uint8_t *) data.bytes, data.length); auto dataset = chip::Thread::OperationalDataset(); @@ -122,7 +123,7 @@ - (instancetype _Nullable)initWithData:(NSData *)data // len+1 for null termination char networkName[MTRSizeThreadNetworkName + 1]; uint8_t pskc[MTRSizeThreadPSKc]; - uint8_t extendedPANID[MTRSizeThreadExtendedPANID]; + uint8_t extendedPANID[MTRSizeThreadExtendedPanId]; uint8_t masterKey[MTRSizeThreadMasterKey]; uint16_t panID; uint16_t channel; @@ -135,10 +136,10 @@ - (instancetype _Nullable)initWithData:(NSData *)data panID = CFSwapInt16BigToHost(panID); return [self initWithNetworkName:[NSString stringWithUTF8String:networkName] - extendedPANID:[NSData dataWithBytes:extendedPANID length:MTRSizeThreadExtendedPANID] + extendedPANID:[NSData dataWithBytes:extendedPANID length:MTRSizeThreadExtendedPanId] masterKey:[NSData dataWithBytes:masterKey length:MTRSizeThreadMasterKey] PSKc:[NSData dataWithBytes:pskc length:MTRSizeThreadPSKc] - channel:@(channel) + channel:channel panID:[NSData dataWithBytes:&panID length:sizeof(uint16_t)]]; } diff --git a/src/darwin/Framework/CHIP/Matter.h b/src/darwin/Framework/CHIP/Matter.h index 5855c33e64c007..d702cb7c4f21fc 100644 --- a/src/darwin/Framework/CHIP/Matter.h +++ b/src/darwin/Framework/CHIP/Matter.h @@ -19,29 +19,31 @@ #import #import +#import #import #import #import #import #import #import -#import #import #import #import +#import #import #import #import #import -#import -#import #import +#import #import #import +#import #import -#import +#import #import +#import +#import #import -#import #import #import diff --git a/src/darwin/Framework/CHIP/templates/MTRAttributeTLVValueDecoder-src.zapt b/src/darwin/Framework/CHIP/templates/MTRAttributeTLVValueDecoder-src.zapt index b79fa746c2bea3..9b478b2ad9f0e8 100644 --- a/src/darwin/Framework/CHIP/templates/MTRAttributeTLVValueDecoder-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRAttributeTLVValueDecoder-src.zapt @@ -1,4 +1,4 @@ -{{> header excludeZapComment=true}} +{{> header}} #import "MTRAttributeTLVValueDecoder_Internal.h" diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt index 1041aab7f36314..c32c72be7e9b8c 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt @@ -1,8 +1,8 @@ -{{> header excludeZapComment=true}} +{{> header}} #import -#import "MTRClusterStateCacheContainer_Internal.h" +#import "MTRAttributeCacheContainer_Internal.h" #import "MTRBaseClusters_internal.h" #import "MTRBaseDevice.h" #import "MTRBaseDevice_Internal.h" @@ -23,9 +23,9 @@ using chip::SessionHandle; // NOLINTBEGIN(clang-analyzer-cplusplus.NewDeleteLeaks): Linter is unable to locate the delete on these objects. {{#chip_client_clusters includeAll=true}} -@implementation MTRBaseCluster{{asUpperCamelCase name preserveAcronyms=true}} +@implementation MTRBaseCluster{{asUpperCamelCase name}} -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -33,39 +33,35 @@ using chip::SessionHandle; } _device = device; - {{!TODO consider range-checking the incoming number to make sure it's - actually in the uint16_t range}} - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } {{#chip_cluster_commands}} -{{#*inline "cluster"}}{{asUpperCamelCase parent.name preserveAcronyms=true}}{{/inline}} -{{#*inline "command"}}{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} -{{#*inline "callbackName"}}{{#if hasSpecificResponse}}{{>cluster}}Cluster{{asUpperCamelCase responseName preserveAcronyms=true}}{{else}}CommandSuccess{{/if}}{{/inline}} +{{#*inline "callbackName"}}{{#if hasSpecificResponse}}{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase responseName}}{{else}}CommandSuccess{{/if}}{{/inline}} {{#unless (hasArguments)}} -- (void){{asLowerCamelCase name}}WithCompletion:({{>command_completion_type command=.}})completion +- (void){{asLowerCamelCase name}}WithCompletionHandler:({{>command_completion_type command=.}})completionHandler { - [self {{asLowerCamelCase name}}WithParams:nil completion:completion]; + [self {{asLowerCamelCase name}}WithParams:nil completionHandler:completionHandler]; } {{/unless}} -- (void){{asLowerCamelCase name}}WithParams: (MTR{{>cluster}}Cluster{{>command}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params completion:({{>command_completion_type command=.}})completion +- (void){{asLowerCamelCase name}}WithParams: (MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params completionHandler:({{>command_completion_type command=.}})completionHandler { // Make a copy of params before we go async. params = [params copy]; new MTR{{>callbackName}}CallbackBridge(self.callbackQueue, self.device, {{#if hasSpecificResponse}} - {{! This treats completion as taking an id for the data. This is + {{! This treats completionHandler as taking an id for the data. This is not great from a type-safety perspective, of course. }} - completion, + completionHandler, {{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) { - completion(error); + completionHandler(error); }, {{/if}} ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -105,24 +101,25 @@ using chip::SessionHandle; {{/chip_cluster_commands}} {{#chip_server_cluster_attributes}} -{{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} +{{!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}} - (void)read{{>attribute}}With {{~#if_is_fabric_scoped_struct type~}} - Params:(MTRReadParams * _Nullable)params completion: + Params:(MTRReadParams * _Nullable)params completionHandler: {{~else~}} - Completion: + CompletionHandler: {{~/if_is_fabric_scoped_struct~}} -(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion +(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completionHandler { {{~#if_is_fabric_scoped_struct type}} // Make a copy of params before we go async. params = [params copy]; {{/if_is_fabric_scoped_struct~}} - new MTR{{~>attribute_data_callback_name~}}CallbackBridge(self.callbackQueue, + new MTR{{>attribute_data_callback_name}}CallbackBridge(self.callbackQueue, self.device, - {{! This treats completion as taking an id for the data. This is + {{! This treats completionHandler as taking an id for the data. This is not great from a type-safety perspective, of course. }} - completion, + completionHandler, ^(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); @@ -130,7 +127,7 @@ using chip::SessionHandle; chip::Controller::{{asUpperCamelCase parent.name}}Cluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall {{~#if_is_fabric_scoped_struct type~}} - , params.fabricFiltered + , params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue] {{~/if_is_fabric_scoped_struct~}} ); }); @@ -138,11 +135,11 @@ using chip::SessionHandle; {{#if isWritableAttribute}} {{#*inline "callbackName"}}DefaultSuccess{{/inline}} -- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value completion:(MTRStatusCompletion)completion +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value completionHandler:(StatusCompletion)completionHandler { - [self write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:nil completion:completion]; + [self write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:nil completionHandler:completionHandler]; } -- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -154,7 +151,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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -184,11 +181,13 @@ using chip::SessionHandle; {{/if}} {{#if isReportableAttribute}} -- (void) subscribe{{>attribute}}WithParams:(MTRSubscribeParams * _Nonnull)params -subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished -reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler +- (void) subscribe{{>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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTR{{>attribute_data_callback_name}}CallbackSubscriptionBridge(self.callbackQueue, self.device, @@ -196,7 +195,7 @@ reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value not great from a type-safety perspective, of course. }} reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -205,26 +204,26 @@ reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value auto failureFn = Callback::FromCancelable(failure); chip::Controller::{{asUpperCamelCase parent.name}}Cluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTR{{>attribute_data_callback_name}}CallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, - params.keepPreviousSubscriptions + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTR{{>attribute_data_callback_name}}CallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue] ); - }, subscriptionEstablished); + }, subscriptionEstablishedHandler); } -+ (void) read{{>attribute}}WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion ++ (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 { new MTR{{>attribute_data_callback_name}}CallbackBridge(queue, - completion, + completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback<{{>attribute_data_callback_name}}Callback>::FromCancelable(success); if (err == CHIP_NO_ERROR) { diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt index 5db875e21cf4b3..8ca7209d42442c 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt @@ -1,8 +1,8 @@ -{{> header excludeZapComment=true}} +{{> header}} #import -#import +#import #import #import @@ -14,52 +14,44 @@ NS_ASSUME_NONNULL_BEGIN /** * Cluster {{name}} - * - * {{description}} + * {{description}} */ -@interface MTRBaseCluster{{asUpperCamelCase name preserveAcronyms=true}} : MTRCluster +@interface MTRBaseCluster{{asUpperCamelCase name}} : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; {{#chip_cluster_commands}} - -/** - * Command {{name}} - * - * {{description}} - */ -{{~#*inline "cluster"}}{{asUpperCamelCase parent.name preserveAcronyms=true}}{{/inline~}} -{{~#*inline "command"}}{{asUpperCamelCase name preserveAcronyms=true}}{{/inline~}} -- (void){{asLowerCamelCase name}}WithParams:(MTR{{>cluster}}Cluster{{>command}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params completion:({{>command_completion_type command=.}})completion; +- (void){{asLowerCamelCase name}}WithParams:(MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params completionHandler:({{>command_completion_type command=.}})completionHandler; {{#unless (hasArguments)}} -- (void){{asLowerCamelCase name}}WithCompletion:({{>command_completion_type command=.}})completion; +- (void){{asLowerCamelCase name}}WithCompletionHandler:({{>command_completion_type command=.}})completionHandler; {{/unless}} {{/chip_cluster_commands}} {{#chip_server_cluster_attributes}} -{{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} +{{!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}} - (void)read{{>attribute}}With {{~#if_is_fabric_scoped_struct type~}} - Params:(MTRReadParams * _Nullable)params completion: + Params:(MTRReadParams * _Nullable)params completionHandler: {{~else~}} - Completion: + CompletionHandler: {{~/if_is_fabric_scoped_struct~}} -(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion; +(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completionHandler; {{#if isWritableAttribute}} -- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value completion:(MTRStatusCompletion)completion; -- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion; +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value completionHandler:(StatusCompletion)completionHandler; +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; {{/if}} {{#if isReportableAttribute}} /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void) subscribe{{>attribute}}WithParams:(MTRSubscribeParams *)params -subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished -reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void) read{{>attribute}}WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion; +- (void) subscribe{{>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; ++ (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}} {{/chip_server_cluster_attributes}} diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters_internal.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters_internal.zapt index 15fc82e76a062f..478caebe1e64df 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters_internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters_internal.zapt @@ -1,4 +1,4 @@ -{{> header excludeZapComment=true}} +{{> header}} #import @@ -9,7 +9,7 @@ {{#chip_client_clusters includeAll=true}} -@interface MTRBaseCluster{{asUpperCamelCase name preserveAcronyms=true}} () +@interface MTRBaseCluster{{asUpperCamelCase name}} () @property (nonatomic, strong, readonly) MTRBaseDevice * device; @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end diff --git a/src/darwin/Framework/CHIP/templates/MTRCallbackBridge-src.zapt b/src/darwin/Framework/CHIP/templates/MTRCallbackBridge-src.zapt index 7025741ede6586..def78a0ca68c96 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCallbackBridge-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCallbackBridge-src.zapt @@ -1,4 +1,4 @@ -{{> header excludeZapComment=true}} +{{> header}} #import "MTRCallbackBridge_internal.h" #import "MTRStructsObjc.h" @@ -40,13 +40,13 @@ {{#chip_client_clusters includeAll=true}} {{#chip_server_cluster_attributes}} {{#if isArray}} -{{#>MTRCallbackBridge ns=parent.name }}{{asUpperCamelCase ../../name preserveAcronyms=true}}{{asUpperCamelCase ../name preserveAcronyms=true}}ListAttributeCallback{{/MTRCallbackBridge}} +{{#>MTRCallbackBridge ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}ListAttributeCallback{{/MTRCallbackBridge}} {{else}} {{#if_is_struct type}} - {{#>MTRCallbackBridge ns=parent.name }}{{asUpperCamelCase ../../name preserveAcronyms=true}}{{asUpperCamelCase ../name preserveAcronyms=true}}StructAttributeCallback{{/MTRCallbackBridge}} + {{#>MTRCallbackBridge ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}StructAttributeCallback{{/MTRCallbackBridge}} {{/if_is_struct}} {{#if_is_strongly_typed_bitmap type}} - {{#>MTRCallbackBridge ns=parent.name }}{{asUpperCamelCase ../../name preserveAcronyms=true}}{{asUpperCamelCase ../name preserveAcronyms=true}}AttributeCallback{{/MTRCallbackBridge}} + {{#>MTRCallbackBridge ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}AttributeCallback{{/MTRCallbackBridge}} {{/if_is_strongly_typed_bitmap}} {{/if}} {{/chip_server_cluster_attributes}} @@ -54,13 +54,13 @@ {{#chip_client_clusters includeAll=true}} {{#chip_cluster_responses}} -{{#>MTRCallbackBridge partial-type="Command" }}{{asUpperCamelCase ../../name preserveAcronyms=true}}Cluster{{asUpperCamelCase ../name preserveAcronyms=true}}Callback{{/MTRCallbackBridge}} +{{#>MTRCallbackBridge partial-type="Command" }}{{asUpperCamelCase ../../name}}Cluster{{asUpperCamelCase ../name}}Callback{{/MTRCallbackBridge}} {{/chip_cluster_responses}} {{/chip_client_clusters}} {{#zcl_clusters}} {{#zcl_enums}} -{{#>MTRCallbackBridge type=(asType label) isNullable=false ns=parent.name}}{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}AttributeCallback{{/MTRCallbackBridge}} -{{#>MTRCallbackBridge type=(asType label) isNullable=true ns=parent.name}}Nullable{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}AttributeCallback{{/MTRCallbackBridge}} +{{#>MTRCallbackBridge type=(asType label) isNullable=false ns=parent.name}}{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}AttributeCallback{{/MTRCallbackBridge}} +{{#>MTRCallbackBridge type=(asType label) isNullable=true ns=parent.name}}Nullable{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}AttributeCallback{{/MTRCallbackBridge}} {{/zcl_enums}} {{/zcl_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/MTRCallbackBridge_internal.zapt b/src/darwin/Framework/CHIP/templates/MTRCallbackBridge_internal.zapt index ccddfc9fa88989..738cd4470c1f49 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCallbackBridge_internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCallbackBridge_internal.zapt @@ -1,4 +1,4 @@ -{{> header excludeZapComment=true}} +{{> header}} #import #import "MTRCallbackBridgeBase_internal.h" @@ -16,27 +16,27 @@ typedef void (*NullableVendorIdAttributeCallback)(void *, const chip::app::DataM {{#chip_client_clusters includeAll=true}} {{#chip_cluster_responses}} -typedef void (*{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}CallbackType)(void *, const chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::DecodableType &); +typedef void (*{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}CallbackType)(void *, const chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::DecodableType &); {{/chip_cluster_responses}} {{/chip_client_clusters}} {{#zcl_clusters}} {{#zcl_enums}} -typedef void (*{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}AttributeCallback)(void *, chip::app::Clusters::{{asUpperCamelCase parent.name}}::{{asType label}}); -typedef void (*Nullable{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}AttributeCallback)(void *, const chip::app::DataModel::Nullable &); +typedef void (*{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}AttributeCallback)(void *, chip::app::Clusters::{{asUpperCamelCase parent.name}}::{{asType label}}); +typedef void (*Nullable{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}AttributeCallback)(void *, const chip::app::DataModel::Nullable &); {{/zcl_enums}} {{/zcl_clusters}} {{#chip_client_clusters includeAll=true}} {{#chip_server_cluster_attributes}} {{#if isArray}} -typedef void (*{{asUpperCamelCase parent.name preserveAcronyms=true}}{{asUpperCamelCase name preserveAcronyms=true}}ListAttributeCallback)(void * context, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} data); +typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeCallback)(void * context, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} data); {{else}} {{#if_is_struct type}} -typedef void (*{{asUpperCamelCase parent.name preserveAcronyms=true}}{{asUpperCamelCase name preserveAcronyms=true}}StructAttributeCallback)(void *, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}}); +typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}StructAttributeCallback)(void *, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}}); {{/if_is_struct}} {{#if_is_strongly_typed_bitmap type}} -typedef void (*{{asUpperCamelCase parent.name preserveAcronyms=true}}{{asUpperCamelCase name preserveAcronyms=true}}AttributeCallback)(void *, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}}); +typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallback)(void *, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}}); {{/if_is_strongly_typed_bitmap}} {{/if}} {{/chip_server_cluster_attributes}} @@ -76,13 +76,13 @@ typedef void (*{{asUpperCamelCase parent.name preserveAcronyms=true}}{{asUpperCa {{#chip_client_clusters includeAll=true}} {{#chip_server_cluster_attributes}} {{#if isArray}} -{{#>MTRCallbackBridge header="1" ns=parent.name }}{{asUpperCamelCase ../../name preserveAcronyms=true}}{{asUpperCamelCase ../name preserveAcronyms=true}}ListAttributeCallback{{/MTRCallbackBridge}} +{{#>MTRCallbackBridge header="1" ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}ListAttributeCallback{{/MTRCallbackBridge}} {{else}} {{#if_is_struct type}} - {{#>MTRCallbackBridge header="1" ns=parent.name }}{{asUpperCamelCase ../../name preserveAcronyms=true}}{{asUpperCamelCase ../name preserveAcronyms=true}}StructAttributeCallback{{/MTRCallbackBridge}} + {{#>MTRCallbackBridge header="1" ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}StructAttributeCallback{{/MTRCallbackBridge}} {{/if_is_struct}} {{#if_is_strongly_typed_bitmap type}} - {{#>MTRCallbackBridge header="1" ns=parent.name }}{{asUpperCamelCase ../../name preserveAcronyms=true}}{{asUpperCamelCase ../name preserveAcronyms=true}}AttributeCallback{{/MTRCallbackBridge}} + {{#>MTRCallbackBridge header="1" ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}AttributeCallback{{/MTRCallbackBridge}} {{/if_is_strongly_typed_bitmap}} {{/if}} {{/chip_server_cluster_attributes}} @@ -90,13 +90,13 @@ typedef void (*{{asUpperCamelCase parent.name preserveAcronyms=true}}{{asUpperCa {{#chip_client_clusters includeAll=true}} {{#chip_cluster_responses}} -{{#>MTRCallbackBridge header="1" partial-type="Command" }}{{asUpperCamelCase ../../name preserveAcronyms=true}}Cluster{{asUpperCamelCase ../name preserveAcronyms=true}}Callback{{/MTRCallbackBridge}} +{{#>MTRCallbackBridge header="1" partial-type="Command" }}{{asUpperCamelCase ../../name}}Cluster{{asUpperCamelCase ../name}}Callback{{/MTRCallbackBridge}} {{/chip_cluster_responses}} {{/chip_client_clusters}} {{#zcl_clusters}} {{#zcl_enums}} -{{#>MTRCallbackBridge header="1" type=(asType label) isNullable=false ns=parent.name}}{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}AttributeCallback{{/MTRCallbackBridge}} -{{#>MTRCallbackBridge header="1" type=(asType label) isNullable=true ns=parent.name}}Nullable{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}AttributeCallback{{/MTRCallbackBridge}} +{{#>MTRCallbackBridge header="1" type=(asType label) isNullable=false ns=parent.name}}{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}AttributeCallback{{/MTRCallbackBridge}} +{{#>MTRCallbackBridge header="1" type=(asType label) isNullable=true ns=parent.name}}Nullable{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}AttributeCallback{{/MTRCallbackBridge}} {{/zcl_enums}} {{/zcl_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt b/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt index 8d37b94befd0f8..cd648f1cd33b51 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt @@ -1,4 +1,4 @@ -{{> header excludeZapComment=true}} +{{> header}} #import #import @@ -7,33 +7,35 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { {{#zcl_clusters}} -{{~#*inline "cluster"}}{{asUpperCamelCase label preserveAcronyms=true}}{{/inline~}} -MTRClusterIDType{{>cluster}}ID = {{asMEI manufacturerCode code}}, +MTRCluster{{asUpperCamelCase label}}ID = {{asMEI manufacturerCode code}}, {{/zcl_clusters}} }; #pragma mark - Attributes IDs -typedef NS_ENUM(uint32_t, MTRAttributeIDType) { +typedef NS_ENUM(uint32_t, MTRClusterAttributeIDType) { // Global attributes {{#zcl_attributes_server}} -{{~#*inline "attribute"}}{{asUpperCamelCase label preserveAcronyms=true}}{{/inline~}} {{#unless clusterRef}} -MTRAttributeIDTypeGlobalAttribute{{>attribute}}ID = {{asMEI manufacturerCode code}}, +MTRClusterGlobalAttribute{{asUpperCamelCase label}}ID = {{asMEI manufacturerCode code}}, {{/unless}} {{/zcl_attributes_server}} {{#zcl_clusters}} {{#zcl_attributes_server}} -{{~#*inline "cluster"}}{{asUpperCamelCase parent.label preserveAcronyms=true}}{{/inline~}} -{{~#*inline "attribute"}}{{asUpperCamelCase label preserveAcronyms=true}}{{/inline~}} {{#first}} -// Cluster {{>cluster}} attributes +// Cluster {{asUpperCamelCase parent.label}} attributes {{/first}} {{#if clusterRef}} -MTRAttributeIDTypeCluster{{>cluster}}Attribute{{>attribute}}ID = {{asMEI manufacturerCode code}}, +MTRCluster{{asUpperCamelCase parent.label}}Attribute{{asUpperCamelCase label}}ID = {{asMEI manufacturerCode code}}, +{{!Backwards compat for now: DeviceList as an alias for DeviceTypeList}} +{{#if (isStrEqual (asUpperCamelCase parent.label) "Descriptor")}} +{{#if (isStrEqual (asUpperCamelCase label) "DeviceTypeList")}} +MTRClusterDescriptorAttributeDeviceListID = MTRClusterDescriptorAttributeDeviceTypeListID, +{{/if}} +{{/if}} {{else}} -MTRAttributeIDTypeCluster{{>cluster}}Attribute{{>attribute}}ID = MTRAttributeIDTypeGlobalAttribute{{>attribute}}ID, +MTRCluster{{asUpperCamelCase parent.label}}Attribute{{asUpperCamelCase label}}ID = MTRClusterGlobalAttribute{{asUpperCamelCase label}}ID, {{/if}} {{#last}} @@ -44,15 +46,13 @@ MTRAttributeIDTypeCluster{{>cluster}}Attribute{{>attribute}}ID = MTRAttributeIDT #pragma mark - Commands IDs -typedef NS_ENUM(uint32_t, MTRCommandIDType) { +typedef NS_ENUM(uint32_t, MTRClusterCommandIDType) { {{#zcl_clusters}} {{#zcl_commands}} -{{~#*inline "cluster"}}{{asUpperCamelCase parent.label preserveAcronyms=true}}{{/inline~}} -{{~#*inline "command"}}{{asUpperCamelCase label preserveAcronyms=true}}{{/inline~}} {{#first}} -// Cluster {{>cluster}} commands +// Cluster {{asUpperCamelCase parent.label}} commands {{/first}} -MTRCommandIDTypeCluster{{>cluster}}Command{{>command}}ID = {{asMEI manufacturerCode code}}, +MTRCluster{{asUpperCamelCase parent.label}}Command{{asUpperCamelCase label}}ID = {{asMEI manufacturerCode code}}, {{#last}} {{/last}} @@ -62,15 +62,13 @@ MTRCommandIDTypeCluster{{>cluster}}Command{{>command}}ID = {{asMEI manufacturerC #pragma mark - Events IDs -typedef NS_ENUM(uint32_t, MTREventIDType) { +typedef NS_ENUM(uint32_t, MTRClusterEventIDType) { {{#zcl_clusters}} {{#zcl_events}} -{{~#*inline "cluster"}}{{asUpperCamelCase parent.label preserveAcronyms=true}}{{/inline~}} -{{~#*inline "event"}}{{asUpperCamelCase name preserveAcronyms=true}}{{/inline~}} {{#first}} -// Cluster {{>cluster}} events +// Cluster {{asUpperCamelCase parent.label}} events {{/first}} -MTREventIDTypeCluster{{>cluster}}Event{{>event}}ID = {{asMEI manufacturerCode code}}, +MTRCluster{{asUpperCamelCase parent.label}}Event{{asUpperCamelCase name}}ID = {{asMEI manufacturerCode code}}, {{#last}} {{/last}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt index 18dba454865a31..d2da8c753c656a 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt @@ -1,8 +1,8 @@ -{{> header excludeZapComment=true}} +{{> header}} #import -#import "MTRClusterStateCacheContainer_Internal.h" +#import "MTRAttributeCacheContainer_Internal.h" #import "MTRBaseDevice_internal.h" #import "MTRClusterConstants.h" #import "MTRClusters_internal.h" @@ -25,33 +25,30 @@ using chip::SessionHandle; // NOLINTBEGIN(clang-analyzer-cplusplus.NewDeleteLeaks): Linter is unable to locate the delete on these objects. {{#chip_client_clusters includeAll=true}} -@implementation MTRCluster{{asUpperCamelCase name preserveAcronyms=true}} +@implementation MTRCluster{{asUpperCamelCase name}} -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - {{!TODO consider range-checking the incoming number to make sure it's - actually in the uint16_t range}} - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; } {{#chip_cluster_commands}} -{{#*inline "cluster"}}{{asUpperCamelCase parent.name preserveAcronyms=true}}{{/inline}} -{{#*inline "callbackName"}}{{#if hasSpecificResponse}}{{>cluster}}Cluster{{asUpperCamelCase responseName preserveAcronyms=true}}{{else}}CommandSuccess{{/if}}{{/inline}} +{{#*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 completion:({{>command_completion_type command=.}})completion +- (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completionHandler:({{>command_completion_type command=.}})completionHandler { - [self {{asLowerCamelCase name}}WithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self {{asLowerCamelCase name}}WithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } {{/unless}} -- (void){{asLowerCamelCase name}}WithParams: (MTR{{>cluster}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion +- (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 { // Make a copy of params before we go async. params = [params copy]; @@ -59,15 +56,15 @@ using chip::SessionHandle; new MTR{{>callbackName}}CallbackBridge(self.callbackQueue, baseDevice, {{#if hasSpecificResponse}} - {{! This treats completion as taking an id for the data. This is + {{! This treats completionHandler as taking an id for the data. This is not great from a type-safety perspective, of course. }} - completion, + completionHandler, {{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) { - completion(error); + completionHandler(error); }, {{/if}} ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -109,10 +106,10 @@ using chip::SessionHandle; {{/chip_cluster_commands}} {{#chip_server_cluster_attributes}} -{{#*inline "cluster"}}{{asUpperCamelCase parent.name preserveAcronyms=true}}{{/inline}} -{{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} +{{!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}} - (NSDictionary *)read{{>attribute}}WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRCluster{{asUpperCamelCase parent.name}}ID) attributeID:@(MTRCluster{{asUpperCamelCase parent.name}}Attribute{{asUpperCamelCase name}}ID) params:params]; } {{#if isWritableAttribute}} @@ -130,7 +127,7 @@ using chip::SessionHandle; } {{/if}} - [self.device writeAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRCluster{{asUpperCamelCase parent.name}}ID) attributeID:@(MTRCluster{{asUpperCamelCase parent.name}}Attribute{{asUpperCamelCase name}}ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } {{/if}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters.zapt index df169038743b06..bc4cbed0587015 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters.zapt @@ -1,8 +1,8 @@ -{{> header excludeZapComment=true}} +{{> header}} #import -#import +#import #import #import @@ -18,23 +18,22 @@ NS_ASSUME_NONNULL_BEGIN * Cluster {{name}} * {{description}} */ -@interface MTRCluster{{asUpperCamelCase name preserveAcronyms=true}} : MTRCluster +@interface MTRCluster{{asUpperCamelCase name}} : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; {{#chip_cluster_commands}} -{{~#*inline "cluster"}}{{asUpperCamelCase parent.name preserveAcronyms=true}}{{/inline~}} -{{~#*inline "command"}}{{asUpperCamelCase name preserveAcronyms=true}}{{/inline~}} -- (void){{asLowerCamelCase name}}WithParams:(MTR{{>cluster}}Cluster{{>command}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion; +- (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; {{#unless (hasArguments)}} -- (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion; +- (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completionHandler:({{>command_completion_type command=.}})completionHandler; {{/unless}} {{/chip_cluster_commands}} {{#chip_server_cluster_attributes}} -{{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} +{{!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}} - (NSDictionary *)read{{>attribute}}WithParams:(MTRReadParams * _Nullable)params; {{#if isWritableAttribute}} - (void)write{{>attribute}}WithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs; diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters_internal.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters_internal.zapt index ccad7c4389101c..3936f96264f52b 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters_internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters_internal.zapt @@ -1,4 +1,4 @@ -{{> header excludeZapComment=true}} +{{> header}} #import @@ -10,7 +10,7 @@ {{#chip_client_clusters includeAll=true}} -@interface MTRCluster{{asUpperCamelCase name preserveAcronyms=true}} () +@interface MTRCluster{{asUpperCamelCase name}} () @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice *device; @end diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt index f2898ff87cd84e..592f99ad40adba 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt @@ -1,4 +1,4 @@ -{{> header excludeZapComment=true}} +{{> header}} #import "MTRCommandPayloadsObjc.h" @@ -6,7 +6,7 @@ NS_ASSUME_NONNULL_BEGIN {{#zcl_clusters}} {{#zcl_commands}} -@implementation MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Params +@implementation MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params - (instancetype)init { if (self = [super init]) { @@ -19,9 +19,9 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { - auto other = [[MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Params alloc] init]; + auto other = [[MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params alloc] init]; {{#zcl_command_arguments}} other.{{asStructPropertyName label}} = self.{{asStructPropertyName label}}; diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt index d91dfccb117362..873cd5b739ef0b 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt @@ -1,4 +1,4 @@ -{{> header excludeZapComment=true}} +{{> header}} #import #import @@ -7,7 +7,7 @@ NS_ASSUME_NONNULL_BEGIN {{#zcl_clusters}} {{#zcl_commands}} -@interface MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Params : NSObject +@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params : NSObject {{#zcl_command_arguments}} {{! Override the getter name because some of our properties start with things @@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end {{/zcl_commands}} {{/zcl_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/MTREventTLVValueDecoder-src.zapt b/src/darwin/Framework/CHIP/templates/MTREventTLVValueDecoder-src.zapt index 14a052bbe56d90..c976278fa5e871 100644 --- a/src/darwin/Framework/CHIP/templates/MTREventTLVValueDecoder-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTREventTLVValueDecoder-src.zapt @@ -1,4 +1,4 @@ -{{> header excludeZapComment=true}} +{{> header}} #import "MTREventTLVValueDecoder_Internal.h" @@ -38,7 +38,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type *value = [MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event new]; + MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event *value = [MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event new]; {{#zcl_event_fields}} do { diff --git a/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt index dee1570d909cc2..ad67be9690e83d 100644 --- a/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt @@ -1,4 +1,4 @@ -{{> header excludeZapComment=true}} +{{> header}} #import "MTRStructsObjc.h" @@ -6,7 +6,7 @@ NS_ASSUME_NONNULL_BEGIN {{#zcl_clusters}} {{#zcl_structs}} -@implementation MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}} +@implementation MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} - (instancetype)init { if (self = [super init]) { @@ -17,9 +17,9 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { - auto other = [[MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}} alloc] init]; + auto other = [[MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} alloc] init]; {{#zcl_struct_items}} other.{{asStructPropertyName label}} = self.{{asStructPropertyName label}}; @@ -36,10 +36,28 @@ NS_ASSUME_NONNULL_BEGIN @end +{{!Backwards compat for now: Add a DeviceType thing that inherits from DeviceTypeStruct. }} +{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}} +{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeStruct")}} +@implementation MTRDescriptorClusterDeviceType + +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDescriptorClusterDeviceType alloc] init]; + other.type = self.type; + other.revision = self.revision; + + return other; +} + +@end +{{/if}} +{{/if}} + {{/zcl_structs}} {{#zcl_events}} -@implementation MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event +@implementation MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event - (instancetype)init { if (self = [super init]) { @@ -50,9 +68,9 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { - auto other = [[MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event alloc] init]; + auto other = [[MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event alloc] init]; {{#zcl_event_fields}} other.{{asStructPropertyName name}} = self.{{asStructPropertyName name}}; diff --git a/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt index 8bbace9a6c815d..8e8e698bd98ef8 100644 --- a/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt @@ -1,4 +1,4 @@ -{{> header excludeZapComment=true}} +{{> header}} #import @@ -6,7 +6,7 @@ NS_ASSUME_NONNULL_BEGIN {{#zcl_clusters}} {{#zcl_structs}} -@interface MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}} : NSObject +@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} : NSObject {{! Override the getter name because some of our properties start with things like "new" or "init" }} {{#zcl_struct_items}} @@ -14,19 +14,26 @@ NS_ASSUME_NONNULL_BEGIN {{/zcl_struct_items}} - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end +{{!Backwards compat for now: Add a DeviceType thing that inherits from DeviceTypeStruct. }} +{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}} +{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeStruct")}} +@interface MTRDescriptorClusterDeviceType : MTRDescriptorClusterDeviceTypeStruct +@end +{{/if}} +{{/if}} {{/zcl_structs}} {{#zcl_events}} -@interface MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event : NSObject +@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event : NSObject {{#zcl_event_fields}} @property (nonatomic, copy{{#unless (isStrEqual (asGetterName name) (asStructPropertyName name))}}, getter={{asGetterName name}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName name}}; {{/zcl_event_fields}} - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end {{/zcl_events}} diff --git a/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt b/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt index 07706f2c1db8ef..97bca6ef30f86a 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, MTRSubscriptionEstablishedHandler establishedHandler) + MTR{{> @partial-block}}SubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, SubscriptionEstablishedHandler 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, MTRSubscriptionEstablishedHandler establishedHandler) + MTR{{> @partial-block}}SubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTR{{> @partial-block}}Bridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -59,7 +59,7 @@ public: static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; {{/unless}} @@ -84,7 +84,7 @@ void MTR{{> @partial-block}}Bridge::OnSuccessFn(void * context {{#if (isStrEqual partial-type "Status")}} DispatchSuccess(context, nil); {{else if (isStrEqual partial-type "Command")}} - auto * response = [MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Params new]; + auto * response = [MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params new]; {{#chip_cluster_response_arguments}} { {{>decode_value target=(concat "response." (asStructPropertyName label)) source=(concat "data." (asLowerCamelCase label)) cluster=parent.parent.name errorCode="OnFailureFn(context, err); return;" depth=0}} diff --git a/src/darwin/Framework/CHIP/templates/partials/attribute_data_callback_name.zapt b/src/darwin/Framework/CHIP/templates/partials/attribute_data_callback_name.zapt index 28ec591edb7a44..385e4afb338ee9 100644 --- a/src/darwin/Framework/CHIP/templates/partials/attribute_data_callback_name.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/attribute_data_callback_name.zapt @@ -1,22 +1,22 @@ {{~#if isArray~}} - {{asUpperCamelCase parent.name preserveAcronyms=true}}{{asUpperCamelCase name preserveAcronyms=true}}List + {{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}List {{~else~}} {{~#if_is_struct type~}} {{~! Structs are not used as types of attributes much, so it's less code to generate the callbacks on a per-attribute basis than a per-struct-type basis. ~}} - {{asUpperCamelCase parent.name preserveAcronyms=true}}{{asUpperCamelCase name preserveAcronyms=true}}Struct + {{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Struct {{~else if_is_strongly_typed_bitmap type~}} - {{asUpperCamelCase parent.name preserveAcronyms=true}}{{asUpperCamelCase name preserveAcronyms=true}} + {{asUpperCamelCase parent.name}}{{asUpperCamelCase name}} {{~else~}} {{~#if isNullable}}Nullable{{/if~}} {{~#if (isStrEqual (asUpperCamelCase type) (asUpperCamelCase "vendor_id"))~}} VendorId {{~else if_is_strongly_typed_chip_enum type~}} - {{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase type preserveAcronyms=true}} + {{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase type}} {{~else~}} {{chipCallback.name}} {{~/if~}} {{~/if_is_struct~}} {{~/if~}} -Attribute{{~"remove_extra_spaces"~}} +Attribute \ No newline at end of file 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 f50e91c2eba380..9fc5fa8ad3af4d 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 preserveAcronyms=true}}Cluster{{asUpperCamelCase command.responseName}}Params * _Nullable data, NSError * _Nullable error) +void (^)(MTR{{asUpperCamelCase command.parent.name}}Cluster{{asUpperCamelCase command.responseName}}Params * _Nullable data, NSError * _Nullable error) {{else}} -MTRStatusCompletion +StatusCompletion {{/if}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index d49aab980c3ebe..c2b0d8bb9e2580 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import "MTRAttributeTLVValueDecoder_Internal.h" #import "MTRStructsObjc.h" @@ -2538,8 +2540,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; - newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; + MTROtaSoftwareUpdateRequestorClusterProviderLocation * newElement_0; + newElement_0 = [MTROtaSoftwareUpdateRequestorClusterProviderLocation new]; newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 96ffebb92eeef9..04a9495b89473d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -15,9 +15,11 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import -#import +#import #import #import @@ -26,128 +28,148 @@ NS_ASSUME_NONNULL_BEGIN /** * Cluster Identify - * - * Attributes and commands for putting a device into Identification mode (e.g. flashing a light). + * Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ @interface MTRBaseClusterIdentify : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -/** - * Command Identify - * - * Command description for Identify - */ --(void) identifyWithParams : (MTRIdentifyClusterIdentifyParams *) params completion : (MTRStatusCompletion) completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -/** - * Command TriggerEffect - * - * Command description for TriggerEffect - */ --(void) triggerEffectWithParams : (MTRIdentifyClusterTriggerEffectParams *) params completion : (MTRStatusCompletion) completion; +- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params + completionHandler:(StatusCompletion)completionHandler; -- (void)readAttributeIdentifyTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeIdentifyTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeIdentifyTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeIdentifyTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeIdentifyTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeIdentifyTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeIdentifyTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeIdentifyTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeIdentifyTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -156,146 +178,139 @@ NS_ASSUME_NONNULL_BEGIN /** * Cluster Groups - * - * Attributes and commands for group configuration and manipulation. + * Attributes and commands for group configuration and manipulation. */ @interface MTRBaseClusterGroups : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -/** - * Command AddGroup - * - * Command description for AddGroup - */ --(void) addGroupWithParams : (MTRGroupsClusterAddGroupParams *) params completion - : (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error)) completion; - -/** - * Command ViewGroup - * - * Command description for ViewGroup - */ --(void) viewGroupWithParams : (MTRGroupsClusterViewGroupParams *) params completion - : (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error)) completion; - -/** - * Command GetGroupMembership - * - * Command description for GetGroupMembership - */ --(void) getGroupMembershipWithParams : (MTRGroupsClusterGetGroupMembershipParams *) params completion - : (void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, NSError * _Nullable error)) completion; - -/** - * Command RemoveGroup - * - * Command description for RemoveGroup - */ --(void) removeGroupWithParams : (MTRGroupsClusterRemoveGroupParams *) params completion - : (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error)) completion; - -/** - * Command RemoveAllGroups - * - * Command description for RemoveAllGroups - */ --(void) removeAllGroupsWithParams : (MTRGroupsClusterRemoveAllGroupsParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)removeAllGroupsWithCompletion:(MTRStatusCompletion)completion; - -/** - * Command AddGroupIfIdentifying - * - * Command description for AddGroupIfIdentifying - */ --(void) addGroupIfIdentifyingWithParams : (MTRGroupsClusterAddGroupIfIdentifyingParams *) params completion - : (MTRStatusCompletion) completion; - -- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNameSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params + completionHandler: + (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params + completionHandler: + (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params + completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params + completionHandler: + (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)removeAllGroupsWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -304,246 +319,452 @@ NS_ASSUME_NONNULL_BEGIN /** * Cluster Scenes - * - * Attributes and commands for scene configuration and manipulation. + * Attributes and commands for scene configuration and manipulation. */ @interface MTRBaseClusterScenes : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -/** - * Command AddScene - * - * Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, - * "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' - */ --(void) addSceneWithParams : (MTRScenesClusterAddSceneParams *) params completion - : (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error)) completion; - -/** - * Command ViewScene - * - * Retrieves the requested scene entry from its Scene table. - */ --(void) viewSceneWithParams : (MTRScenesClusterViewSceneParams *) params completion - : (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error)) completion; - -/** - * Command RemoveScene - * - * Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table - */ --(void) removeSceneWithParams : (MTRScenesClusterRemoveSceneParams *) params completion - : (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params + completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params + completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params + completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params + completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + +- (void)readAttributeSceneCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeSceneCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentSceneWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command RemoveAllScenes - * - * Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) removeAllScenesWithParams : (MTRScenesClusterRemoveAllScenesParams *) params completion - : (void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeCurrentSceneWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentGroupWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command StoreScene - * - * Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other - * clusters on the same endpoint + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) storeSceneWithParams : (MTRScenesClusterStoreSceneParams *) params completion - : (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error)) 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)readAttributeCurrentGroupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSceneValidWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command RecallScene - * - * Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene - * entry in the Scene Table + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) recallSceneWithParams : (MTRScenesClusterRecallSceneParams *) params completion : (MTRStatusCompletion) completion; +- (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)readAttributeSceneValidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command GetSceneMembership - * - * Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene - * identifiers within a certain group + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) getSceneMembershipWithParams : (MTRScenesClusterGetSceneMembershipParams *) params completion - : (void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeLastConfiguredByWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command EnhancedAddScene - * - * Allows a scene to be added using a finer scene transition time than the AddScene command. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) enhancedAddSceneWithParams : (MTRScenesClusterEnhancedAddSceneParams *) params completion - : (void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeLastConfiguredByWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command EnhancedViewScene - * - * Allows a scene to be retrieved using a finer scene transition time than the ViewScene command + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) enhancedViewSceneWithParams : (MTRScenesClusterEnhancedViewSceneParams *) params completion - : (void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command CopyScene - * - * Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) copySceneWithParams : (MTRScenesClusterCopySceneParams *) params completion - : (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSceneCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentSceneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentGroupWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster On/Off + * Attributes and commands for switching devices between 'On' and 'Off' states. */ -- (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSceneValidWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterOnOff : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)onWithRecallGlobalSceneWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNameSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -551,335 +772,541 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster On/Off - * - * Attributes and commands for switching devices between 'On' and 'Off' states. + * Cluster On/off Switch Configuration + * Attributes and commands for configuring On/Off switching devices. */ -@interface MTRBaseClusterOnOff : MTRCluster +@interface MTRBaseClusterOnOffSwitchConfiguration : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command Off - * - * On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it - * is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) offWithParams : (MTROnOffClusterOffParams * _Nullable) params completion : (MTRStatusCompletion) completion; -- (void)offWithCompletion:(MTRStatusCompletion)completion; +- (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)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command On - * - * On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is - * used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the - * device SHALL set the OffWaitTime attribute to 0. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) onWithParams : (MTROnOffClusterOnParams * _Nullable) params completion : (MTRStatusCompletion) completion; -- (void)onWithCompletion:(MTRStatusCompletion)completion; +- (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)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command Toggle - * - * On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ - * state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and - * if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the - * OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) toggleWithParams : (MTROnOffClusterToggleParams * _Nullable) params completion : (MTRStatusCompletion) completion; -- (void)toggleWithCompletion:(MTRStatusCompletion)completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command OffWithEffect - * - * The OffWithEffect command allows devices to be turned off using enhanced ways of fading. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) offWithEffectWithParams : (MTROnOffClusterOffWithEffectParams *) params completion : (MTRStatusCompletion) completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command OnWithRecallGlobalScene - * - * The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) onWithRecallGlobalSceneWithParams : (MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)onWithRecallGlobalSceneWithCompletion:(MTRStatusCompletion)completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command OnWithTimedOff - * - * The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the - * device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the - * devices back on. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) onWithTimedOffWithParams : (MTROnOffClusterOnWithTimedOffParams *) params completion : (MTRStatusCompletion) 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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOnOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Level Control + * Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' + */ +@interface MTRBaseClusterLevelControl : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (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; +- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeCurrentLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGlobalSceneControlWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeGlobalSceneControlWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOnTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOnTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOffWaitTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOffWaitTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeStartUpOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeCurrentFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStartUpOnOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeCurrentFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMinFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeMinFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeMaxFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOptionsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOnOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOnOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOnLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeOnLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Cluster On/off Switch Configuration - * - * Attributes and commands for configuring On/Off switching devices. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterOnOffSwitchConfiguration : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeOnTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSwitchTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSwitchActionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeDefaultMoveRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeStartUpCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -887,373 +1314,456 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Level Control - * - * Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' + * Cluster Binary Input (Basic) + * An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. */ -@interface MTRBaseClusterLevelControl : MTRCluster +@interface MTRBaseClusterBinaryInputBasic : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)readAttributeActiveTextWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command MoveToLevel - * - * Command description for MoveToLevel + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) moveToLevelWithParams : (MTRLevelControlClusterMoveToLevelParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command Move - * - * Command description for Move - */ --(void) moveWithParams : (MTRLevelControlClusterMoveParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command Step - * - * Command description for Step - */ --(void) stepWithParams : (MTRLevelControlClusterStepParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command Stop - * - * Command description for Stop - */ --(void) stopWithParams : (MTRLevelControlClusterStopParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command MoveToLevelWithOnOff - * - * Command description for MoveToLevelWithOnOff - */ --(void) moveToLevelWithOnOffWithParams : (MTRLevelControlClusterMoveToLevelWithOnOffParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command MoveWithOnOff - * - * Command description for MoveWithOnOff - */ --(void) moveWithOnOffWithParams : (MTRLevelControlClusterMoveWithOnOffParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command StepWithOnOff - * - * Command description for StepWithOnOff - */ --(void) stepWithOnOffWithParams : (MTRLevelControlClusterStepWithOnOffParams *) params completion - : (MTRStatusCompletion) completion; +- (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)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command StopWithOnOff - * - * Command description for StopWithOnOff + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) stopWithOnOffWithParams : (MTRLevelControlClusterStopWithOnOffParams *) params completion - : (MTRStatusCompletion) completion; +- (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)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeInactiveTextWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command MoveToClosestFrequency - * - * Change the currrent frequency to the provided one, or a close - approximation if the exact provided one is not possible. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) moveToClosestFrequencyWithParams : (MTRLevelControlClusterMoveToClosestFrequencyParams *) params completion - : (MTRStatusCompletion) completion; +- (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)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePolarityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePresentValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeReliabilityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeCurrentFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeApplicationTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOnOffTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOnLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOnTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Descriptor + * The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its + * endpoints and clusters. + */ +@interface MTRBaseClusterDescriptor : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)readAttributeDeviceListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOffTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; -- (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeServerListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDefaultMoveRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeStartUpCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeClientListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStartUpCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePartsListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -1261,366 +1771,507 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Binary Input (Basic) - * - * An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. + * Cluster Binding + * The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -@interface MTRBaseClusterBinaryInputBasic : MTRCluster +@interface MTRBaseClusterBinding : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInactiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOutOfServiceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePolarityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePresentValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster Access Control + * The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ -- (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeReliabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterAccessControl : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStatusFlagsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeApplicationTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTargetsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAccessControlEntriesPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))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; ++ (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Cluster Descriptor - * - * The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints - * and clusters. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterDescriptor : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDeviceTypeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeServerListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeServerListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Actions + * This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. + */ +@interface MTRBaseClusterActions : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeActionListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClientListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeEndpointListsWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClientListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePartsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSetupURLWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePartsListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -1628,494 +2279,585 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Binding - * - * The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. + * Cluster Basic + * This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ -@interface MTRBaseClusterBinding : MTRCluster +@interface MTRBaseClusterBasic : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)mfgSpecificPingWithCompletionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBindingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeProductNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeProductIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Access Control - * - * The Access Control Cluster exposes a data model view of a - Node's Access Control List (ACL), which codifies the rules used to manage - and enforce Access Control for the Node's endpoints and their associated - cluster instances. - */ -@interface MTRBaseClusterAccessControl : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeACLWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeLocationWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACLWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeACLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeExtensionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeSubjectsPerAccessControlEntryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeTargetsPerAccessControlEntryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAccessControlEntriesPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePartNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeProductURLWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Actions - * - * This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. - */ -@interface MTRBaseClusterActions : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -/** - * Command InstantAction - * - * This command triggers an action (state change) on the involved endpoints. - */ --(void) instantActionWithParams : (MTRActionsClusterInstantActionParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command InstantActionWithTransition - * - * This command triggers an action (state change) on the involved endpoints, with a specified time to transition from the current - * state to the new state. - */ --(void) instantActionWithTransitionWithParams : (MTRActionsClusterInstantActionWithTransitionParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command StartAction - * - * This command triggers the commencement of an action on the involved endpoints. - */ --(void) startActionWithParams : (MTRActionsClusterStartActionParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command StartActionWithDuration - * - * This command triggers the commencement of an action (with a duration) on the involved endpoints. - */ --(void) startActionWithDurationWithParams : (MTRActionsClusterStartActionWithDurationParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command StopAction - * - * This command stops the ongoing action on the involved endpoints. - */ --(void) stopActionWithParams : (MTRActionsClusterStopActionParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command PauseAction - * - * This command pauses an ongoing action. - */ --(void) pauseActionWithParams : (MTRActionsClusterPauseActionParams *) params completion : (MTRStatusCompletion) completion; +- (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)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeLocalConfigDisabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command PauseActionWithDuration - * - * This command pauses an ongoing action with a duration. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) pauseActionWithDurationWithParams : (MTRActionsClusterPauseActionWithDurationParams *) params completion - : (MTRStatusCompletion) completion; +- (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)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeReachableWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command ResumeAction - * - * This command resumes a previously paused action. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) resumeActionWithParams : (MTRActionsClusterResumeActionParams *) params completion : (MTRStatusCompletion) completion; +- (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)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command EnableAction - * - * This command enables a certain action or automation. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) enableActionWithParams : (MTRActionsClusterEnableActionParams *) params completion : (MTRStatusCompletion) completion; +- (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)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command EnableActionWithDuration - * - * This command enables a certain action or automation with a duration. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) enableActionWithDurationWithParams : (MTRActionsClusterEnableActionWithDurationParams *) params completion - : (MTRStatusCompletion) completion; +- (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)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command DisableAction - * - * This command disables a certain action or automation. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) disableActionWithParams : (MTRActionsClusterDisableActionParams *) params completion : (MTRStatusCompletion) completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command DisableActionWithDuration - * - * This command disables a certain action or automation with a duration. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) disableActionWithDurationWithParams : (MTRActionsClusterDisableActionWithDurationParams *) params completion - : (MTRStatusCompletion) completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActionListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActionListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEndpointListsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSetupURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster OTA Software Update Provider + * Provides an interface for providing OTA software updates */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterOtaSoftwareUpdateProvider : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2123,385 +2865,506 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Basic - * - * This cluster provides attributes and events for determining basic information about Nodes, which supports both - Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, - which apply to the whole Node. Also allows setting user device information such as location. + * Cluster OTA Software Update Requestor + * Provides an interface for downloading and applying OTA software updates */ -@interface MTRBaseClusterBasic : MTRCluster +@interface MTRBaseClusterOtaSoftwareUpdateRequestor : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -/** - * Command MfgSpecificPing - * - * - */ --(void) mfgSpecificPingWithParams : (MTRBasicClusterMfgSpecificPingParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)mfgSpecificPingWithCompletion:(MTRStatusCompletion)completion; +- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params + completionHandler:(StatusCompletion)completionHandler; -- (void)readAttributeDataModelRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDataModelRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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; ++ (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLocationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLocationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Localization Configuration + * Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc + */ +@interface MTRBaseClusterLocalizationConfiguration : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeSupportedLocalesWithMinInterval:(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)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completion; + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeLocalConfigDisabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLocalConfigDisabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + * Cluster Time Format Localization + * Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for how dates and times are conveyed. As such, Nodes that visually + or audibly convey time information need a mechanism by which they can be configured to use a + user’s preferred format. + */ +@interface MTRBaseClusterTimeFormatLocalization : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeHourFormatWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActiveCalendarTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeSupportedCalendarTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeCapabilityMinimaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2509,111 +3372,130 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster OTA Software Update Provider - * - * Provides an interface for providing OTA software updates - */ -@interface MTRBaseClusterOTASoftwareUpdateProvider : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -/** - * Command QueryImage - * - * Determine availability of a new Software Image - */ --(void) queryImageWithParams : (MTROTASoftwareUpdateProviderClusterQueryImageParams *) params completion - : (void (^)( - MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error)) completion; - -/** - * Command ApplyUpdateRequest - * - * Determine next action to take for a downloaded Software Image + * Cluster Unit Localization + * Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ --(void) applyUpdateRequestWithParams : (MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams *) params completion - : (void (^)( - MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error)) completion; +@interface MTRBaseClusterUnitLocalization : MTRCluster -/** - * Command NotifyUpdateApplied - * - * Notify OTA Provider that an update was applied - */ --(void) notifyUpdateAppliedWithParams : (MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams *) params completion - : (MTRStatusCompletion) completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeTemperatureUnitWithMinInterval:(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)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2621,622 +3503,787 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster OTA Software Update Requestor - * - * Provides an interface for downloading and applying OTA software updates + * Cluster Power Source Configuration + * This cluster is used to describe the configuration and capabilities of a Device's power system. */ -@interface MTRBaseClusterOTASoftwareUpdateRequestor : MTRCluster +@interface MTRBaseClusterPowerSourceConfiguration : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command AnnounceOtaProvider - * - * Announce the presence of an OTA Provider + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) announceOtaProviderWithParams : (MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams *) params completion - : (MTRStatusCompletion) completion; +- (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; ++ (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDefaultOtaProvidersWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDefaultOtaProvidersWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUpdatePossibleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUpdateStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUpdateStateProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeClusterRevisionWithMinInterval:(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)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster Power Source + * This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the + * Node. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterPowerSource : MTRCluster -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster Localization Configuration - * - * Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterLocalizationConfiguration : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveLocaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSupportedLocalesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBatVoltageWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Cluster Time Format Localization - * - * Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterTimeFormatLocalization : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeBatPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeHourFormatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeBatTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveCalendarTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBatChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSupportedCalendarTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBatReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBatReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBatPresentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActiveBatFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBatReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeBatCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster Unit Localization - * - * Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for the units in which values are conveyed in communication to a - user. As such, Nodes that visually or audibly convey measurable values to the user need a - mechanism by which they can be configured to use a user’s preferred unit. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterUnitLocalization : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeBatANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTemperatureUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBatIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBatApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBatCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBatQuantityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBatChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBatTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster Power Source Configuration - * - * This cluster is used to describe the configuration and capabilities of a Device's power system. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterPowerSourceConfiguration : MTRCluster +- (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)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)readAttributeBatFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBatChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSourcesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActiveBatChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -3244,532 +4291,869 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Power Source - * - * This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. + * Cluster General Commissioning + * This cluster is used to manage global aspects of the Commissioning flow. */ -@interface MTRBaseClusterPowerSource : MTRCluster +@interface MTRBaseClusterGeneralCommissioning : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params + completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params + completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (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; +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * 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; ++ (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBasicCommissioningInfoWithCompletionHandler: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOrderWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredAssessedInputVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredAssessedInputFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredCurrentTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredAssessedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredNominalVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredMaximumCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Network Commissioning + * Functionality to configure, enable, disable network credentials and access on a Matter device. + */ +@interface MTRBaseClusterNetworkCommissioning : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNetworksWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredPresentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveWiredFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * 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; ++ (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatPercentRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatTimeRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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 endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatChargeLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; -+ (void)readAttributeBatReplacementNeededWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Diagnostic Logs + * The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. + */ +@interface MTRBaseClusterDiagnosticLogs : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params + completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; -- (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatReplaceabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatPresentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveBatFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatReplacementDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeBatCommonDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster General Diagnostics + * The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics + * metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -- (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatANSIDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterGeneralDiagnostics : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params + completionHandler:(StatusCompletion)completionHandler; -- (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatIECDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRebootCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatApprovedChemistryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeBatCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatChargeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatTimeToFullChargeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatFunctionalWhileChargingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatChargingCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveBatChargeFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -3777,198 +5161,183 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster General Commissioning - * - * This cluster is used to manage global aspects of the Commissioning flow. + * Cluster Software Diagnostics + * The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to + * assist a user or Administrative Node in diagnosing potential problems. */ -@interface MTRBaseClusterGeneralCommissioning : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +@interface MTRBaseClusterSoftwareDiagnostics : MTRCluster -/** - * Command ArmFailSafe - * - * Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock - */ --(void) armFailSafeWithParams : (MTRGeneralCommissioningClusterArmFailSafeParams *) params completion - : (void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -/** - * Command SetRegulatoryConfig - * - * Set the regulatory configuration to be used during commissioning - */ --(void) setRegulatoryConfigWithParams : (MTRGeneralCommissioningClusterSetRegulatoryConfigParams *) params completion - : (void (^)( - MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)resetWatermarksWithCompletionHandler:(StatusCompletion)completionHandler; -/** - * Command CommissioningComplete - * - * Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe - * period. - */ --(void) commissioningCompleteWithParams : (MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable) params completion - : (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error)) completion; -- (void)commissioningCompleteWithCompletion:(void (^)( - MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completion; - -- (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBreadcrumbWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeBasicCommissioningInfoWithCompletion: - (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void) - readAttributeBasicCommissioningInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)( - MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRegulatoryConfigWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLocationCapabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeSupportsConcurrentConnectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -3976,1723 +5345,2235 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Network Commissioning - * - * Functionality to configure, enable, disable network credentials and access on a Matter device. + * Cluster Thread Network Diagnostics + * The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node + * to assist a user or Administrative Node in diagnosing potential problems */ -@interface MTRBaseClusterNetworkCommissioning : MTRCluster +@interface MTRBaseClusterThreadNetworkDiagnostics : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeChannelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command ScanNetworks - * - * Detemine the set of networks the device sees as available. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) scanNetworksWithParams : (MTRNetworkCommissioningClusterScanNetworksParams * _Nullable) params completion - : (void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRoutingRoleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command AddOrUpdateWiFiNetwork - * - * Add or update the credentials for a given Wi-Fi network. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) addOrUpdateWiFiNetworkWithParams : (MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *) params completion - : (void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNetworkNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command AddOrUpdateThreadNetwork - * - * Add or update the credentials for a given Thread network. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) addOrUpdateThreadNetworkWithParams : (MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *) params completion - : (void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command RemoveNetwork - * - * Remove the definition of a given network (including its credentials). + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) removeNetworkWithParams : (MTRNetworkCommissioningClusterRemoveNetworkParams *) params completion - : (void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeExtendedPanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command ConnectNetwork - * - * Connect to the specified network, using previously-defined credentials. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) connectNetworkWithParams : (MTRNetworkCommissioningClusterConnectNetworkParams *) params completion - : (void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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; ++ (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMeshLocalPrefixWithCompletionHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command ReorderNetwork - * - * Modify the order in which networks will be presented in the Networks attribute. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) reorderNetworkWithParams : (MTRNetworkCommissioningClusterReorderNetworkParams *) params completion - : (void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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; ++ (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNeighborTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRouteTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeScanMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePartitionIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeConnectMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeWeightingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDataVersionWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLastNetworkingStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeStableDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLastNetworkIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLeaderRouterIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLastConnectErrorValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDetachedRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeChildRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeChildRoleCountWithMinInterval:(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)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRouterRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLeaderRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePartitionIdChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster Diagnostic Logs - * - * The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterDiagnosticLogs : MTRCluster +- (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; ++ (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeParentChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command RetrieveLogsRequest - * - * Retrieving diagnostic logs from a Node + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) retrieveLogsRequestWithParams : (MTRDiagnosticLogsClusterRetrieveLogsRequestParams *) params completion - : (void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxTotalCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeTxUnicastCountWithMinInterval:(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)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxAckedCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTxNoAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster General Diagnostics - * - * The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics - * metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterGeneralDiagnostics : MTRCluster +- (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)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)readAttributeTxDataCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestEventTrigger - * - * Provide a means for certification tests to trigger some test-plan-specific events + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testEventTriggerWithParams : (MTRGeneralDiagnosticsClusterTestEventTriggerParams *) params completion - : (MTRStatusCompletion) completion; +- (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)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNetworkInterfacesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRebootCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxOtherCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUpTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxRetryCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTotalOperationalHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBootReasonsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBootReasonsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBootReasonsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveHardwareFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxErrCcaCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveRadioFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxErrAbortCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveNetworkFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxErrBusyChannelCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTestEventTriggersEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxTotalCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeRxUnicastCountWithMinInterval:(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)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxDataCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster Software Diagnostics - * - * The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to - * assist a user or Administrative Node in diagnosing potential problems. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterSoftwareDiagnostics : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command ResetWatermarks - * - * Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, - * CurrentHeapHighWaterMark attribute. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) resetWatermarksWithParams : (MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)resetWatermarksWithCompletion:(MTRStatusCompletion)completion; +- (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)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxOtherCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeThreadMetricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxAddressFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentHeapFreeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentHeapUsedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxDuplicatedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentHeapHighWatermarkWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxErrNoFrameCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxErrSecCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRxErrFcsCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Thread Network Diagnostics - * - * The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to - * assist a user or Administrative Node in diagnosing potential problems - */ -@interface MTRBaseClusterThreadNetworkDiagnostics : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRxErrOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command ResetCounts - * - * Reception of this command SHALL reset the OverrunCount attributes to 0 + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) resetCountsWithParams : (MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)resetCountsWithCompletion:(MTRStatusCompletion)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)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActiveTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeChannelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePendingTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRoutingRoleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNetworkNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSecurityPolicyWithCompletionHandler: + (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePanIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeChannelPage0MaskWithCompletionHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeExtendedPanIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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; ++ (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOperationalDatasetComponentsWithCompletionHandler: + (void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeshLocalPrefixWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; +- (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) + readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNeighborTableListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNeighborTableListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNeighborTableListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRouteTableListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRouteTableListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRouteTableListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePartitionIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWeightingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDataVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster WiFi Network Diagnostics + * The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node + * to assist a user or Administrative Node in diagnosing potential problems. */ -- (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStableDataVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterWiFiNetworkDiagnostics : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLeaderRouterIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSecurityTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeDetachedRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeChildRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeWiFiVersionWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRouterRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeChannelNumberWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLeaderRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttachAttemptCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBeaconLostCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePartitionIdChangeCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeBeaconRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeBetterPartitionAttachAttemptCountWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePacketMulticastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeParentChangeCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePacketMulticastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxTotalCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePacketUnicastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxUnicastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePacketUnicastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxBroadcastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentMaxRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeTxAckRequestedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxAckedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxNoAckRequestedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxDataCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxDataPollCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxBeaconCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeTxBeaconRequestCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster Ethernet Network Diagnostics + * The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a + * Node to assist a user or Administrative Node in diagnosing potential problems. */ -- (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterEthernetNetworkDiagnostics : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributePHYRateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeTxRetryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxDirectMaxRetryExpiryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxIndirectMaxRetryExpiryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxErrCcaCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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; -+ (void)readAttributeTxErrAbortCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxErrBusyChannelCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxTotalCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxUnicastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxBroadcastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxDataCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxDataPollCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxBeaconCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxBeaconRequestCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster Bridged Device Basic + * This Cluster serves two purposes towards a Node communicating with a Bridge: indicate that the functionality on + the Endpoint where it is placed (and its Parts) is bridged from a non-CHIP technology; and provide a centralized + collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user, + such as the vendor name, the model name, or user-assigned name. */ -- (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxAddressFilteredCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +@interface MTRBaseClusterBridgedDeviceBasic : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxDestAddrFilteredCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxDuplicatedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeProductNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxErrNoFrameCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxErrUnknownNeighborCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxErrInvalidSrcAddrCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxErrSecCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxErrFcsCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRxErrOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePartNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePendingTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeProductURLWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeSecurityPolicyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeChannelPage0MaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOperationalDatasetComponentsWithCompletion: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeReachableWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void) - subscribeAttributeOperationalDatasetComponentsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void) - readAttributeOperationalDatasetComponentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveNetworkFaultsListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5700,276 +7581,332 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster WiFi Network Diagnostics - * - * The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to - * assist a user or Administrative Node in diagnosing potential problems. + * Cluster Switch + * This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. +Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), +distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and +as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the +interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a +light or a window shade. */ -@interface MTRBaseClusterWiFiNetworkDiagnostics : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +@interface MTRBaseClusterSwitch : MTRCluster -/** - * Command ResetCounts - * - * Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 - */ --(void) resetCountsWithParams : (MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeBssidWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBssidWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBssidWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSecurityTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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; ++ (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiFiVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeChannelNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRssiWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRssiWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRssiWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBeaconLostCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBeaconRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePacketMulticastRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster AdministratorCommissioning + * Commands to trigger a Node to allow a new Administrator to commission it. */ -- (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePacketMulticastTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +@interface MTRBaseClusterAdministratorCommissioning : MTRCluster -- (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePacketUnicastRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)revokeCommissioningWithCompletionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeWindowStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePacketUnicastTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentMaxRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5977,512 +7914,676 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Ethernet Network Diagnostics - * - * The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node - * to assist a user or Administrative Node in diagnosing potential problems. + * Cluster Operational Credentials + * This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated + * Fabrics. */ -@interface MTRBaseClusterEthernetNetworkDiagnostics : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +@interface MTRBaseClusterOperationalCredentials : MTRCluster -/** - * Command ResetCounts - * - * Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 - */ --(void) resetCountsWithParams : (MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params + completionHandler:(StatusCompletion)completionHandler; -- (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePHYRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFullDuplexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePacketRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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; ++ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePacketTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxErrCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCollisionCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCarrierDetectWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTimeSinceResetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +/** + * Cluster Group Key Management + * The Group Key Management Cluster is the mechanism by which group keys are managed. + */ +@interface MTRBaseClusterGroupKeyManagement : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Bridged Device Basic - * - * This Cluster serves two purposes towards a Node communicating with a Bridge: indicate that the functionality on - the Endpoint where it is placed (and its Parts) is bridged from a non-CHIP technology; and provide a centralized - collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user, - such as the vendor name, the model name, or user-assigned name. - */ -@interface MTRBaseClusterBridgedDeviceBasic : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster Fixed Label + * The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ -- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterFixedLabel : MTRCluster -- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)readAttributeLabelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster User Label + * The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterUserLabel : MTRCluster -- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)readAttributeLabelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -6490,132 +8591,122 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Switch - * - * This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), -distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and -as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the -interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a -light or a window shade. + * Cluster Boolean State + * This cluster provides an interface to a boolean state called StateValue. */ -@interface MTRBaseClusterSwitch : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +@interface MTRBaseClusterBooleanState : MTRCluster -- (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfPositionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeStateValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeCurrentPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMultiPressMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -6623,155 +8714,218 @@ light or a window shade. @end /** - * Cluster AdministratorCommissioning - * - * Commands to trigger a Node to allow a new Administrator to commission it. + * Cluster Mode Select + * Attributes and commands for selecting a mode from a list of supported options. */ -@interface MTRBaseClusterAdministratorCommissioning : MTRCluster +@interface MTRBaseClusterModeSelect : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -/** - * Command OpenCommissioningWindow - * - * This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning - * method. - */ --(void) openCommissioningWindowWithParams : (MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *) params completion - : (MTRStatusCompletion) completion; +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command OpenBasicCommissioningWindow - * - * This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning - * method, if the node supports it. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) openBasicCommissioningWindowWithParams - : (MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *) params completion - : (MTRStatusCompletion) completion; +- (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)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command RevokeCommissioning - * - * This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic - * Commissioning Window command. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) revokeCommissioningWithParams - : (MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)revokeCommissioningWithCompletion:(MTRStatusCompletion)completion; +- (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)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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; -+ (void)readAttributeAdminFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAdminVendorIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -6779,625 +8933,883 @@ light or a window shade. @end /** - * Cluster Operational Credentials - * - * This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated - * Fabrics. + * Cluster Door Lock + * An interface to a generic way to secure a door */ -@interface MTRBaseClusterOperationalCredentials : MTRCluster +@interface MTRBaseClusterDoorLock : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params + completionHandler: + (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params + completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeLockStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeLockTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command AttestationRequest - * - * Sender is requesting attestation information from the receiver. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) attestationRequestWithParams : (MTROperationalCredentialsClusterAttestationRequestParams *) params completion - : (void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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; ++ (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActuatorEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command CertificateChainRequest - * - * Sender is requesting a device attestation certificate from the receiver. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) certificateChainRequestWithParams : (MTROperationalCredentialsClusterCertificateChainRequestParams *) params completion - : (void (^)( - MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeActuatorEnabledWithAttributeCache:(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; /** - * Command CSRRequest - * - * Sender is requesting a certificate signing request (CSR) from the receiver. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) CSRRequestWithParams : (MTROperationalCredentialsClusterCSRRequestParams *) params completion - : (void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDoorOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command AddNOC - * - * Sender is requesting to add the new node operational certificates. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) addNOCWithParams : (MTROperationalCredentialsClusterAddNOCParams *) params completion - : (void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDoorClosedEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command UpdateNOC - * - * Sender is requesting to update the node operational certificates. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) updateNOCWithParams : (MTROperationalCredentialsClusterUpdateNOCParams *) params completion - : (void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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; ++ (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeOpenPeriodWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command UpdateFabricLabel - * - * This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by - * entries in the Fabrics attribute. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) updateFabricLabelWithParams : (MTROperationalCredentialsClusterUpdateFabricLabelParams *) params completion - : (void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * Command RemoveFabric - * - * This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. - */ --(void) removeFabricWithParams : (MTROperationalCredentialsClusterRemoveFabricParams *) params completion - : (void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error)) completion; - -/** - * Command AddTrustedRootCertificate - * - * This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. - */ --(void) addTrustedRootCertificateWithParams : (MTROperationalCredentialsClusterAddTrustedRootCertificateParams *) params completion - : (MTRStatusCompletion) completion; - -- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNOCsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSupportedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCommissionedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTrustedRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion; + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeMaxRFIDCodeLengthWithAttributeCache:(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; /** - * Cluster Group Key Management - * - * The Group Key Management Cluster is the mechanism by which group keys are managed. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterGroupKeyManagement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCredentialRulesSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command KeySetWrite - * - * Revoke a Root Key from a Group + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) keySetWriteWithParams : (MTRGroupKeyManagementClusterKeySetWriteParams *) params completion - : (MTRStatusCompletion) completion; +- (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)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command KeySetRead - * - * Revoke a Root Key from a Group + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) keySetReadWithParams : (MTRGroupKeyManagementClusterKeySetReadParams *) params completion - : (void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeLanguageWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command KeySetRemove - * - * Revoke a Root Key from a Group + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) keySetRemoveWithParams : (MTRGroupKeyManagementClusterKeySetRemoveParams *) params completion - : (MTRStatusCompletion) completion; +- (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)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeLEDSettingsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command KeySetReadAllIndices - * - * Return the list of Group Key Sets associated with the accessing fabric + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) keySetReadAllIndicesWithParams : (MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *) params completion - : (void (^)( - MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGroupKeyMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSoundVolumeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGroupTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOperatingModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeMaxGroupsPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxGroupKeysPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeEnableLocalProgrammingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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; ++ (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeEnableInsideStatusLEDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Fixed Label - * - * The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only -labels. - */ -@interface MTRBaseClusterFixedLabel : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSendPINOverTheAirWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster User Label - * - * The User Label Cluster provides a feature to tag an endpoint with zero or more labels. - */ -@interface MTRBaseClusterUserLabel : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeExpiringUserTimeoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -7405,1125 +9817,1382 @@ labels. @end /** - * Cluster Boolean State - * - * This cluster provides an interface to a boolean state called StateValue. + * Cluster Window Covering + * Provides an interface for controlling and adjusting automatic window coverings. */ -@interface MTRBaseClusterBooleanState : MTRCluster +@interface MTRBaseClusterWindowCovering : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)upOrOpenWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)downOrCloseWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)stopMotionWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStateValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeConfigStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Cluster Mode Select - * - * Attributes and commands for selecting a mode from a list of supported options. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterModeSelect : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command ChangeToMode - * - * On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL - * set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) changeToModeWithParams : (MTRModeSelectClusterChangeToModeParams *) params completion : (MTRStatusCompletion) completion; +- (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)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOperationalStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStandardNamespaceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeEndProductTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Cluster Door Lock - * - * An interface to a generic way to secure a door + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterDoorLock : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSafetyStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command LockDoor - * - * This command causes the lock device to lock the door. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) lockDoorWithParams : (MTRDoorLockClusterLockDoorParams * _Nullable) params completion : (MTRStatusCompletion) completion; +- (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)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command UnlockDoor - * - * This command causes the lock device to unlock the door. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) unlockDoorWithParams : (MTRDoorLockClusterUnlockDoorParams * _Nullable) params completion - : (MTRStatusCompletion) completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command UnlockWithTimeout - * - * This command causes the lock device to unlock the door with a timeout parameter. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) unlockWithTimeoutWithParams : (MTRDoorLockClusterUnlockWithTimeoutParams *) params completion - : (MTRStatusCompletion) completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command SetWeekDaySchedule - * - * Set a weekly repeating schedule for a specified user. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) setWeekDayScheduleWithParams : (MTRDoorLockClusterSetWeekDayScheduleParams *) params completion - : (MTRStatusCompletion) completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command GetWeekDaySchedule - * - * Retrieve the specific weekly schedule for the specific user. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) getWeekDayScheduleWithParams : (MTRDoorLockClusterGetWeekDayScheduleParams *) params completion - : (void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, NSError * _Nullable error)) completion; - -/** - * Command ClearWeekDaySchedule - * - * Clear the specific weekly schedule or all weekly schedules for the specific user. - */ --(void) clearWeekDayScheduleWithParams : (MTRDoorLockClusterClearWeekDayScheduleParams *) params completion - : (MTRStatusCompletion) 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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command SetYearDaySchedule - * - * Set a time-specific schedule ID for a specified user. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) setYearDayScheduleWithParams : (MTRDoorLockClusterSetYearDayScheduleParams *) params completion - : (MTRStatusCompletion) 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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * Command GetYearDaySchedule - * - * Returns the year day schedule data for the specified schedule and user indexes. - */ --(void) getYearDayScheduleWithParams : (MTRDoorLockClusterGetYearDayScheduleParams *) params completion - : (void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; -/** - * Command ClearYearDaySchedule - * - * Clears the specific year day schedule or all year day schedules for the specific user. - */ --(void) clearYearDayScheduleWithParams : (MTRDoorLockClusterClearYearDayScheduleParams *) params completion - : (MTRStatusCompletion) completion; +@end /** - * Command SetHolidaySchedule - * - * Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. + * Cluster Barrier Control + * This cluster provides control of a barrier (garage door). */ --(void) setHolidayScheduleWithParams : (MTRDoorLockClusterSetHolidayScheduleParams *) params completion - : (MTRStatusCompletion) completion; +@interface MTRBaseClusterBarrierControl : MTRCluster -/** - * Command GetHolidaySchedule - * - * Get the holiday schedule for the specified index. - */ --(void) getHolidayScheduleWithParams : (MTRDoorLockClusterGetHolidayScheduleParams *) params completion - : (void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -/** - * Command ClearHolidaySchedule - * - * Clears the holiday schedule or all holiday schedules. - */ --(void) clearHolidayScheduleWithParams : (MTRDoorLockClusterClearHolidayScheduleParams *) params completion - : (MTRStatusCompletion) completion; +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)barrierControlStopWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBarrierMovingStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command SetUser - * - * Set User into the lock. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) setUserWithParams : (MTRDoorLockClusterSetUserParams *) params completion : (MTRStatusCompletion) completion; +- (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)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBarrierSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command GetUser - * - * Retrieve User. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) getUserWithParams : (MTRDoorLockClusterGetUserParams *) params completion - : (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBarrierCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command ClearUser - * - * Clears a User or all Users. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) clearUserWithParams : (MTRDoorLockClusterClearUserParams *) params completion : (MTRStatusCompletion) completion; +- (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)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command SetCredential - * - * Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) setCredentialWithParams : (MTRDoorLockClusterSetCredentialParams *) params completion - : (void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command GetCredentialStatus - * - * Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) getCredentialStatusWithParams : (MTRDoorLockClusterGetCredentialStatusParams *) params completion - : (void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command ClearCredential - * - * Clear one, one type, or all credentials except ProgrammingPIN credential. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) clearCredentialWithParams : (MTRDoorLockClusterClearCredentialParams *) params completion - : (MTRStatusCompletion) completion; +- (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)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLockTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActuatorEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDoorStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDoorOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDoorClosedEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfPINUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Pump Configuration and Control + * An interface for configuring and controlling pumps. + */ +@interface MTRBaseClusterPumpConfigurationAndControl : MTRCluster -- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCredentialRulesSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (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; ++ (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLEDSettingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAutoRelockTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributePumpStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSoundVolumeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEnableInsideStatusLEDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLocalProgrammingFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWrongCodeEntryLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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; ++ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeControlModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -8531,3569 +11200,1459 @@ labels. @end /** - * Cluster Window Covering - * - * Provides an interface for controlling and adjusting automatic window coverings. - */ -@interface MTRBaseClusterWindowCovering : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -/** - * Command UpOrOpen - * - * Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt - */ --(void) upOrOpenWithParams : (MTRWindowCoveringClusterUpOrOpenParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)upOrOpenWithCompletion:(MTRStatusCompletion)completion; - -/** - * Command DownOrClose - * - * Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt - */ --(void) downOrCloseWithParams : (MTRWindowCoveringClusterDownOrCloseParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)downOrCloseWithCompletion:(MTRStatusCompletion)completion; - -/** - * Command StopMotion - * - * Stop any adjusting of window covering - */ --(void) stopMotionWithParams : (MTRWindowCoveringClusterStopMotionParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)stopMotionWithCompletion:(MTRStatusCompletion)completion; - -/** - * Command GoToLiftValue - * - * Go to lift value specified - */ --(void) goToLiftValueWithParams : (MTRWindowCoveringClusterGoToLiftValueParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command GoToLiftPercentage - * - * Go to lift percentage specified + * Cluster Thermostat + * An interface for configuring and controlling the functionality of a thermostat. */ --(void) goToLiftPercentageWithParams : (MTRWindowCoveringClusterGoToLiftPercentageParams *) params completion - : (MTRStatusCompletion) completion; +@interface MTRBaseClusterThermostat : MTRCluster -/** - * Command GoToTiltValue - * - * Go to tilt value specified - */ --(void) goToTiltValueWithParams : (MTRWindowCoveringClusterGoToTiltValueParams *) params completion - : (MTRStatusCompletion) completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -/** - * Command GoToTiltPercentage - * - * Go to tilt percentage specified - */ --(void) goToTiltPercentageWithParams : (MTRWindowCoveringClusterGoToTiltPercentageParams *) params completion - : (MTRStatusCompletion) completion; +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params + completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)clearWeeklyScheduleWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePhysicalClosedLimitLiftWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributePhysicalClosedLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; ++ (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePhysicalClosedLimitTiltWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePhysicalClosedLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentPositionLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentPositionTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNumberOfActuationsLiftWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfActuationsLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNumberOfActuationsTiltWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfActuationsTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePICoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeConfigStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentPositionLiftPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributePIHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentPositionLiftPercentageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeCurrentPositionTiltPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentPositionTiltPercentageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOperationalStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeTargetPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeTargetPositionLiftPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeTargetPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeTargetPositionTiltPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEndProductTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentPositionLiftPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; ++ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentPositionTiltPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; ++ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeInstalledOpenLimitLiftWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInstalledOpenLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInstalledClosedLimitLiftWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInstalledClosedLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInstalledOpenLimitTiltWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInstalledOpenLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeInstalledClosedLimitTiltWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInstalledClosedLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Barrier Control - * - * This cluster provides control of a barrier (garage door). - */ -@interface MTRBaseClusterBarrierControl : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -/** - * Command BarrierControlGoToPercent - * - * Command to instruct a barrier to go to a percent open state. - */ --(void) barrierControlGoToPercentWithParams : (MTRBarrierControlClusterBarrierControlGoToPercentParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command BarrierControlStop - * - * Command that instructs the barrier to stop moving. - */ --(void) barrierControlStopWithParams : (MTRBarrierControlClusterBarrierControlStopParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion; +- (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)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSystemModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBarrierMovingStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBarrierSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBarrierCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBarrierOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBarrierCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBarrierCommandOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBarrierCommandCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBarrierOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBarrierClosePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBarrierPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Pump Configuration and Control - * - * An interface for configuring and controlling pumps. - */ -@interface MTRBaseClusterPumpConfigurationAndControl : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -- (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePumpStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEffectiveOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEffectiveControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLifetimeRunningHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributePowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLifetimeEnergyConsumedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Thermostat - * - * An interface for configuring and controlling the functionality of a thermostat. - */ -@interface MTRBaseClusterThermostat : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -/** - * Command SetpointRaiseLower - * - * Command description for SetpointRaiseLower - */ --(void) setpointRaiseLowerWithParams : (MTRThermostatClusterSetpointRaiseLowerParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command SetWeeklySchedule - * - * Command description for SetWeeklySchedule - */ --(void) setWeeklyScheduleWithParams : (MTRThermostatClusterSetWeeklyScheduleParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command GetWeeklySchedule - * - * Command description for GetWeeklySchedule - */ --(void) getWeeklyScheduleWithParams : (MTRThermostatClusterGetWeeklyScheduleParams *) params completion - : (void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error)) completion; - -/** - * Command ClearWeeklySchedule - * - * The Clear Weekly Schedule command is used to clear the weekly schedule. - */ --(void) clearWeeklyScheduleWithParams : (MTRThermostatClusterClearWeeklyScheduleParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion; - -- (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLocalTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOutdoorTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePICoolingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeLocalTemperatureCalibrationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinSetpointDeadBandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRemoteSensingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeControlSequenceOfOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSystemModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeThermostatRunningModeWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeThermostatRunningModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStartOfWeekWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfDailyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTemperatureSetpointHoldWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion; -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion; -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeThermostatRunningStateWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeThermostatRunningStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSetpointChangeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeACCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeACCapacityformatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Fan Control - * - * An interface for controlling a fan in a heating/cooling system. - */ -@interface MTRBaseClusterFanControl : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -- (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFanModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFanModeSequenceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePercentSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePercentCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSpeedMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSpeedSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRockSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRockSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWindSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWindSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Thermostat User Interface Configuration - * - * An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). - */ -@interface MTRBaseClusterThermostatUserInterfaceConfiguration : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -- (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTemperatureDisplayModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeKeypadLockoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeScheduleProgrammingVisibilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Color Control - * - * Attributes and commands for controlling the color properties of a color-capable light. - */ -@interface MTRBaseClusterColorControl : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -/** - * Command MoveToHue - * - * Move to specified hue. - */ --(void) moveToHueWithParams : (MTRColorControlClusterMoveToHueParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command MoveHue - * - * Move hue up or down at specified rate. - */ --(void) moveHueWithParams : (MTRColorControlClusterMoveHueParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command StepHue - * - * Step hue up or down by specified size at specified rate. - */ --(void) stepHueWithParams : (MTRColorControlClusterStepHueParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command MoveToSaturation - * - * Move to specified saturation. - */ --(void) moveToSaturationWithParams : (MTRColorControlClusterMoveToSaturationParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command MoveSaturation - * - * Move saturation up or down at specified rate. - */ --(void) moveSaturationWithParams : (MTRColorControlClusterMoveSaturationParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command StepSaturation - * - * Step saturation up or down by specified size at specified rate. - */ --(void) stepSaturationWithParams : (MTRColorControlClusterStepSaturationParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command MoveToHueAndSaturation - * - * Move to hue and saturation. - */ --(void) moveToHueAndSaturationWithParams : (MTRColorControlClusterMoveToHueAndSaturationParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command MoveToColor - * - * Move to specified color. - */ --(void) moveToColorWithParams : (MTRColorControlClusterMoveToColorParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command MoveColor - * - * Moves the color. - */ --(void) moveColorWithParams : (MTRColorControlClusterMoveColorParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command StepColor - * - * Steps the lighting to a specific color. - */ --(void) stepColorWithParams : (MTRColorControlClusterStepColorParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command MoveToColorTemperature - * - * Move to a specific color temperature. - */ --(void) moveToColorTemperatureWithParams : (MTRColorControlClusterMoveToColorTemperatureParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command EnhancedMoveToHue - * - * Command description for EnhancedMoveToHue - */ --(void) enhancedMoveToHueWithParams : (MTRColorControlClusterEnhancedMoveToHueParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command EnhancedMoveHue - * - * Command description for EnhancedMoveHue - */ --(void) enhancedMoveHueWithParams : (MTRColorControlClusterEnhancedMoveHueParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command EnhancedStepHue - * - * Command description for EnhancedStepHue - */ --(void) enhancedStepHueWithParams : (MTRColorControlClusterEnhancedStepHueParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command EnhancedMoveToHueAndSaturation - * - * Command description for EnhancedMoveToHueAndSaturation - */ --(void) enhancedMoveToHueAndSaturationWithParams : (MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command ColorLoopSet - * - * Command description for ColorLoopSet - */ --(void) colorLoopSetWithParams : (MTRColorControlClusterColorLoopSetParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command StopMoveStep - * - * Command description for StopMoveStep - */ --(void) stopMoveStepWithParams : (MTRColorControlClusterStopMoveStepParams *) params completion : (MTRStatusCompletion) completion; - -/** - * Command MoveColorTemperature - * - * Command description for MoveColorTemperature - */ --(void) moveColorTemperatureWithParams : (MTRColorControlClusterMoveColorTemperatureParams *) params completion - : (MTRStatusCompletion) completion; - -/** - * Command StepColorTemperature - * - * Command description for StepColorTemperature - */ --(void) stepColorTemperatureWithParams : (MTRColorControlClusterStepColorTemperatureParams *) params completion - : (MTRStatusCompletion) completion; - -- (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentSaturationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDriftCompensationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCompensationTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfPrimariesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary1XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary1YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary1IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary2XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary2YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary2IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary3XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary3YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary3IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary4XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary4YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary4IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUnoccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary5XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUnoccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary5YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary5IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeEmergencyHeatDeltaWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary6XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeACTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary6YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeACCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePrimary6IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeACRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWhitePointXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeACCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWhitePointYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeACErrorCodeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorPointRXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeACLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorPointRYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeACCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorPointRIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeACCapacityformatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorPointGXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorPointGYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorPointGIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorPointBXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorPointBYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeColorPointBIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster Fan Control + * An interface for controlling a fan in a heating/cooling system. */ -- (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEnhancedCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterFanControl : MTRCluster -- (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)readAttributeFanModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEnhancedColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorLoopActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorLoopTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorLoopStartEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeColorCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRockSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRockSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeWindSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeWindSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -12101,962 +12660,1282 @@ labels. @end /** - * Cluster Ballast Configuration - * - * Attributes and commands for configuring a lighting ballast. + * Cluster Thermostat User Interface Configuration + * An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ -@interface MTRBaseClusterBallastConfiguration : MTRCluster +@interface MTRBaseClusterThermostatUserInterfaceConfiguration : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePhysicalMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeKeypadLockoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePhysicalMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBallastStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeIntrinsicBalanceFactorWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeIntrinsicBalanceFactorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeIntrinsicBalanceFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBallastFactorAdjustmentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLampQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster Color Control + * Attributes and commands for controlling the color properties of a color-capable light. */ -- (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLampTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterColorControl : MTRCluster -- (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLampManufacturerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLampRatedHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeCurrentXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeLampBurnHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeCurrentYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeLampAlarmModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeLampBurnHoursTripPointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; ++ (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -/** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. - */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOptionsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster Illuminance Measurement - * - * Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterIlluminanceMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary1XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary1YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary2XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary2YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLightSensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary3XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary3YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary4XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributePrimary4XWithAttributeCache:(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; /** - * Cluster Temperature Measurement - * - * Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterTemperatureMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary5XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary5YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary6XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary6YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Cluster Pressure Measurement - * - * Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterPressureMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeScaledToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeScaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster Flow Measurement - * - * Attributes and commands for configuring the measurement of flow, and reporting flow measurements. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterFlowMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -13064,472 +13943,591 @@ labels. @end /** - * Cluster Relative Humidity Measurement - * - * Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. + * Cluster Ballast Configuration + * Attributes and commands for configuring a lighting ballast. */ -@interface MTRBaseClusterRelativeHumidityMeasurement : MTRCluster +@interface MTRBaseClusterBallastConfiguration : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePhysicalMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePhysicalMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBallastStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeIntrinsicBalanceFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeBallastFactorAdjustmentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLampQuantityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLampTypeWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeLampManufacturerWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Cluster Occupancy Sensing - * - * Attributes and commands for configuring occupancy sensing, and reporting occupancy status. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterOccupancySensing : MTRCluster +- (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)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)readAttributeLampRatedHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * 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; ++ (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLampBurnHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLampAlarmModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupancySensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLampBurnHoursTripPointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupancySensorTypeBitmapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion; -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion; -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion; -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion; -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Illuminance Measurement + * Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. + */ +@interface MTRBaseClusterIlluminanceMeasurement : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion; -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (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)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion; -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (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)readAttributeMinMeasuredValueWithAttributeCache:(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; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion; -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)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)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeLightSensorTypeWithMinInterval:(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)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -13537,98 +14535,175 @@ labels. @end /** - * Cluster Wake on LAN - * - * This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. + * Cluster Temperature Measurement + * Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -@interface MTRBaseClusterWakeOnLAN : MTRCluster +@interface MTRBaseClusterTemperatureMeasurement : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMACAddressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -13636,156 +14711,261 @@ labels. @end /** - * Cluster Channel - * - * This cluster provides an interface for controlling the current Channel on a device. + * Cluster Pressure Measurement + * Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -@interface MTRBaseClusterChannel : MTRCluster +@interface MTRBaseClusterPressureMeasurement : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command ChangeChannel - * - * Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) changeChannelWithParams : (MTRChannelClusterChangeChannelParams *) params completion - : (void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command ChangeChannelByNumber - * - * Change the channel on the media plaeyer to the channel with the given Number in the ChannelList attribute. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) changeChannelByNumberWithParams : (MTRChannelClusterChangeChannelByNumberParams *) params completion - : (MTRStatusCompletion) completion; +- (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)readAttributeMinMeasuredValueWithAttributeCache:(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; /** - * Command SkipChannel - * - * This command provides channel up and channel down functionality, but allows channel index jumps of size Count. When the value of - * the increase or decrease is larger than the number of channels remaining in the given direction, then the behavior SHALL be to - * return to the beginning (or end) of the channel list and continue. For example, if the current channel is at index 0 and count - * value of -1 is given, then the current channel should change to the last channel. + * 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; ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) skipChannelWithParams : (MTRChannelClusterSkipChannelParams *) params completion : (MTRStatusCompletion) completion; +- (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)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeChannelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLineupWithCompletion:(void (^)( - MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLineupWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentChannelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -13793,554 +14973,854 @@ labels. @end /** - * Cluster Target Navigator - * - * This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. + * Cluster Flow Measurement + * Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -@interface MTRBaseClusterTargetNavigator : MTRCluster +@interface MTRBaseClusterFlowMeasurement : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command NavigateTarget - * - * Upon receipt, this SHALL navigation the UX to the target identified. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) navigateTargetWithParams : (MTRTargetNavigatorClusterNavigateTargetParams *) params completion - : (void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTargetListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentTargetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster Media Playback - * - * This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterMediaPlayback : MTRCluster +- (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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; -/** - * Command Play - * - * Upon receipt, this SHALL play media. - */ --(void) playWithParams : (MTRMediaPlaybackClusterPlayParams * _Nullable) params completion - : (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error)) completion; -- (void)playWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; +@end /** - * Command Pause - * - * Upon receipt, this SHALL pause media. + * Cluster Relative Humidity Measurement + * Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ --(void) pauseWithParams : (MTRMediaPlaybackClusterPauseParams * _Nullable) params completion - : (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error)) completion; -- (void)pauseWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; +@interface MTRBaseClusterRelativeHumidityMeasurement : MTRCluster -/** - * Command StopPlayback - * - * Upon receipt, this SHALL stop media. User experience is context-specific. This will often navigate the user back to the location - * where media was originally launched. - */ --(void) stopPlaybackWithParams : (MTRMediaPlaybackClusterStopPlaybackParams * _Nullable) params completion - : (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error)) completion; -- (void)stopPlaybackWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command StartOver - * - * Upon receipt, this SHALL Start Over with the current media playback item. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) startOverWithParams : (MTRMediaPlaybackClusterStartOverParams * _Nullable) params completion - : (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error)) completion; -- (void)startOverWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; +- (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)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command Previous - * - * Upon receipt, this SHALL cause the handler to be invoked for "Previous". User experience is context-specific. This will often Go - * back to the previous media playback item. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) previousWithParams : (MTRMediaPlaybackClusterPreviousParams * _Nullable) params completion - : (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error)) completion; -- (void)previousWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; +- (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)readAttributeMinMeasuredValueWithAttributeCache:(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; /** - * Command Next - * - * Upon receipt, this SHALL cause the handler to be invoked for "Next". User experience is context-specific. This will often Go - * forward to the next media playback item. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) nextWithParams : (MTRMediaPlaybackClusterNextParams * _Nullable) params completion - : (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error)) completion; -- (void)nextWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))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)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command Rewind - * - * Upon receipt, this SHALL Rewind through media. Different Rewind speeds can be used on the TV based upon the number of sequential - * calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) rewindWithParams : (MTRMediaPlaybackClusterRewindParams * _Nullable) params completion - : (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error)) completion; -- (void)rewindWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; +- (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)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command FastForward - * - * Upon receipt, this SHALL Advance through media. Different FF speeds can be used on the TV based upon the number of sequential - * calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) fastForwardWithParams : (MTRMediaPlaybackClusterFastForwardParams * _Nullable) params completion - : (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error)) completion; -- (void)fastForwardWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command SkipForward - * - * Upon receipt, this SHALL Skip forward in the media by the given number of seconds, using the data as follows: + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) skipForwardWithParams : (MTRMediaPlaybackClusterSkipForwardParams *) params completion - : (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command SkipBackward - * - * Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) skipBackwardWithParams : (MTRMediaPlaybackClusterSkipBackwardParams *) params completion - : (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command Seek - * - * Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) seekWithParams : (MTRMediaPlaybackClusterSeekParams *) params completion - : (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error)) 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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster Occupancy Sensing + * Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -- (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStartTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterOccupancySensing : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeSampledPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePlaybackSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSeekRangeEndWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSeekRangeStartWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end +- (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)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Cluster Media Input - * - * This cluster provides an interface for controlling the Input Selector on a media device such as a TV. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ -@interface MTRBaseClusterMediaInput : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (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)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Command SelectInput - * - * Upon receipt, this SHALL change the input on the media device to the input at a specific index in the Input List. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) selectInputWithParams : (MTRMediaInputClusterSelectInputParams *) params completion : (MTRStatusCompletion) completion; +- (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)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command ShowInputStatus - * - * Upon receipt, this SHALL display the active status of the input list on screen. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) showInputStatusWithParams : (MTRMediaInputClusterShowInputStatusParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)showInputStatusWithCompletion:(MTRStatusCompletion)completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command HideInputStatus - * - * Upon receipt, this SHALL hide the input list from the screen. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) hideInputStatusWithParams : (MTRMediaInputClusterHideInputStatusParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)hideInputStatusWithCompletion:(MTRStatusCompletion)completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command RenameInput - * - * Upon receipt, this SHALL rename the input at a specific index in the Input List. Updates to the input name SHALL appear in the TV - * settings menus. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) renameInputWithParams : (MTRMediaInputClusterRenameInputParams *) params completion : (MTRStatusCompletion) completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInputListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentInputWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +/** + * Cluster Wake on LAN + * This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. + */ +@interface MTRBaseClusterWakeOnLan : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)readAttributeMACAddressWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -14348,93 +15828,165 @@ labels. @end /** - * Cluster Low Power - * - * This cluster provides an interface for managing low power mode on a device. + * Cluster Channel + * This cluster provides an interface for controlling the current Channel on a device. */ -@interface MTRBaseClusterLowPower : MTRCluster +@interface MTRBaseClusterChannel : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params + completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeChannelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command Sleep - * - * This command shall put the device into low power mode. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) sleepWithParams : (MTRLowPowerClusterSleepParams * _Nullable) params completion : (MTRStatusCompletion) completion; -- (void)sleepWithCompletion:(MTRStatusCompletion)completion; +- (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)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeLineupWithCompletionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -14442,93 +15994,143 @@ labels. @end /** - * Cluster Keypad Input - * - * This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. + * Cluster Target Navigator + * This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ -@interface MTRBaseClusterKeypadInput : MTRCluster +@interface MTRBaseClusterTargetNavigator : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params + completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)readAttributeTargetListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command SendKey - * - * Upon receipt, this SHALL process a keycode as input to the media device. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) sendKeyWithParams : (MTRKeypadInputClusterSendKeyParams *) params completion - : (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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; ++ (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -14536,134 +16138,278 @@ labels. @end /** - * Cluster Content Launcher - * - * This cluster provides an interface for launching content on a media player device such as a TV or Speaker. + * Cluster Media Playback + * This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or + * Speaker. */ -@interface MTRBaseClusterContentLauncher : MTRCluster +@interface MTRBaseClusterMediaPlayback : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)playWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)pauseWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)stopPlaybackWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)startOverWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)previousWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)nextWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)rewindWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)fastForwardWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + +- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeStartTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command LaunchContent - * - * Upon receipt, this SHALL launch the specified content with optional search criteria. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) launchContentWithParams : (MTRContentLauncherClusterLaunchContentParams *) params completion - : (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDurationWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command LaunchURL - * - * Upon receipt, this SHALL launch content from the specified URL. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) launchURLWithParams : (MTRContentLauncherClusterLaunchURLParams *) params completion - : (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptHeaderWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeSupportedStreamingProtocolsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeSeekRangeStartWithMinInterval:(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)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * 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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -14671,126 +16417,148 @@ labels. @end /** - * Cluster Audio Output - * - * This cluster provides an interface for controlling the Output on a media device such as a TV. + * Cluster Media Input + * This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ -@interface MTRBaseClusterAudioOutput : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +@interface MTRBaseClusterMediaInput : MTRCluster -/** - * Command SelectOutput - * - * Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. - */ --(void) selectOutputWithParams : (MTRAudioOutputClusterSelectOutputParams *) params completion : (MTRStatusCompletion) completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -/** - * Command RenameOutput - * - * Upon receipt, this SHALL rename the output at a specific index in the Output List. Updates to the output name SHALL appear in the - * TV settings menus. - */ --(void) renameOutputWithParams : (MTRAudioOutputClusterRenameOutputParams *) params completion : (MTRStatusCompletion) completion; +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)showInputStatusWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)hideInputStatusWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeInputListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOutputListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentOutputWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -14798,146 +16566,218 @@ labels. @end /** - * Cluster Application Launcher - * - * This cluster provides an interface for launching content on a media player device such as a TV or Speaker. + * Cluster Low Power + * This cluster provides an interface for managing low power mode on a device. */ -@interface MTRBaseClusterApplicationLauncher : MTRCluster +@interface MTRBaseClusterLowPower : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -/** - * Command LaunchApp - * - * Upon receipt, this SHALL launch the specified app with optional data. The TV Device SHALL launch and bring to foreground the - * identified application in the command if the application is not already launched and in foreground. The TV Device SHALL update - * state attribute on the Application Basic cluster of the Endpoint corresponding to the launched application. This command returns - * a Launch Response. - */ --(void) launchAppWithParams : (MTRApplicationLauncherClusterLaunchAppParams *) params completion - : (void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; +- (void)sleepWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command StopApp - * - * Upon receipt on a Video Player endpoint this SHALL stop the specified application if it is running. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) stopAppWithParams : (MTRApplicationLauncherClusterStopAppParams *) params completion - : (void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command HideApp - * - * Upon receipt on a Video Player endpoint this SHALL hide the specified application if it is running and visible. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) hideAppWithParams : (MTRApplicationLauncherClusterHideAppParams *) params completion - : (void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCatalogListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value - completion:(MTRStatusCompletion)completion; -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentAppWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeClusterRevisionWithMinInterval:(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)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Keypad Input + * This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. + */ +@interface MTRBaseClusterKeypadInput : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params + completionHandler: + (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -14945,198 +16785,298 @@ labels. @end /** - * Cluster Application Basic - * - * This cluster provides information about an application running on a TV or media player device which is represented as an - * endpoint. + * Cluster Content Launcher + * This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -@interface MTRBaseClusterApplicationBasic : MTRCluster +@interface MTRBaseClusterContentLauncher : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params + completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params + completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeApplicationNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeApplicationVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; -- (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +@end + +/** + * Cluster Audio Output + * This cluster provides an interface for controlling the Output on a media device such as a TV. + */ +@interface MTRBaseClusterAudioOutput : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeOutputListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAllowedVendorListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentOutputWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -15144,115 +17084,155 @@ labels. @end /** - * Cluster Account Login - * - * This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running - * on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user - * account on the Content App match the user account on the Client. - */ -@interface MTRBaseClusterAccountLogin : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -/** - * Command GetSetupPIN - * - * Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same - * acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the - * GetSetupPIN Response. + * Cluster Application Launcher + * This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ --(void) getSetupPINWithParams : (MTRAccountLoginClusterGetSetupPINParams *) params completion - : (void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error)) completion; +@interface MTRBaseClusterApplicationLauncher : MTRCluster -/** - * Command Login - * - * Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a - * current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account - * Identifier, then the Content App MAY make that user account active. - */ --(void) loginWithParams : (MTRAccountLoginClusterLoginParams *) params completion : (MTRStatusCompletion) completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeCatalogListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command Logout - * - * The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by - * clients of a Content App to indicate the end of a user session. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) logoutWithParams : (MTRAccountLoginClusterLogoutParams * _Nullable) params completion : (MTRStatusCompletion) completion; -- (void)logoutWithCompletion:(MTRStatusCompletion)completion; +- (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)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentAppWithCompletionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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 queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -15260,3850 +17240,4805 @@ labels. @end /** - * Cluster Electrical Measurement - * - * Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to - * provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. - */ -@interface MTRBaseClusterElectricalMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -/** - * Command GetProfileInfoCommand - * - * A function which retrieves the power profiling information from the electrical measurement server. + * Cluster Application Basic + * This cluster provides information about an application running on a TV or media player device which is represented as an + * endpoint. */ --(void) getProfileInfoCommandWithParams : (MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)getProfileInfoCommandWithCompletion:(MTRStatusCompletion)completion; +@interface MTRBaseClusterApplicationBasic : MTRCluster -/** - * Command GetMeasurementProfileCommand - * - * A function which retrieves an electricity measurement profile from the electricity measurement server for a specific attribute Id - * requested. - */ --(void) getMeasurementProfileCommandWithParams - : (MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *) params completion : (MTRStatusCompletion) completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasurementTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeApplicationNameWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeProductIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeApplicationWithCompletionHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcPowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcPowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster Account Login + * This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App + * running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make + * the user account on the Content App match the user account on the Client. */ -- (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterAccountLogin : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params + completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)logoutWithCompletionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcFrequencyMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcFrequencyMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end -- (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; /** - * This API does not support setting autoResubscribe to NO in the - * MTRSubscribeParams. + * Cluster Electrical Measurement + * Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need + * to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. */ -- (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNeutralCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +@interface MTRBaseClusterElectricalMeasurement : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)getProfileInfoCommandWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTotalActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDcVoltageWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTotalReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDcVoltageMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTotalApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDcVoltageMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasured1stHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDcCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasured3rdHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDcCurrentMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasured5thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDcCurrentMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasured7thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDcPowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasured9thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeDcPowerMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasured11thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeDcPowerMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeDcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeDcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeDcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeDcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeDcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeDcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcFrequencyMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcFrequencyDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcFrequencyMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcFrequencyMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeNeutralCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributePhaseHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTotalReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInstantaneousVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeTotalApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInstantaneousLineCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInstantaneousActiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeInstantaneousReactiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInstantaneousPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActivePowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActivePowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcFrequencyMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcFrequencyDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePowerFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion; -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributePowerDivisorWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; - -- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (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)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAverageRmsUnderVoltageCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsExtremeOverVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeInstantaneousVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * 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; ++ (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeInstantaneousLineCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsExtremeUnderVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageSagPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageSwellPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeInstantaneousPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActivePowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; +- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePowerFactorWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcActivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcReactivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAverageRmsOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAverageRmsUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsExtremeOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsExtremeUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageSagWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageSwellWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLineCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeReactiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; ++ (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltagePhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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)readAttributeRmsVoltageMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; ++ (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * 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; ++ (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsCurrentMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsCurrentMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcActivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActivePowerMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcReactivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActivePowerMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAverageRmsOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeReactivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeApparentPowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePowerFactorPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageSagWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageSwellWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeLineCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeActiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageSagPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltagePhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLineCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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; -+ (void)readAttributeReactiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; ++ (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltagePhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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; ++ (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActivePowerMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsCurrentMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeReactivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsCurrentMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeApparentPowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributePowerFactorPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActivePowerMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActivePowerMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeReactivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeApparentPowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePowerFactorPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeLineCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeActiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageSagPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltagePhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (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)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Test Cluster - * - * The Test Cluster is meant to validate the generated code - */ -@interface MTRBaseClusterTestCluster : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - -/** - * Command Test - * - * Simple command without any parameters and without a specific response - */ --(void) testWithParams : (MTRTestClusterClusterTestParams * _Nullable) params completion : (MTRStatusCompletion) completion; -- (void)testWithCompletion:(MTRStatusCompletion)completion; +- (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)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestNotHandled - * - * Simple command without any parameters and without a specific response not handled by the server + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testNotHandledWithParams : (MTRTestClusterClusterTestNotHandledParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)testNotHandledWithCompletion:(MTRStatusCompletion)completion; +- (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; ++ (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestSpecific - * - * Simple command without any parameters and with a specific response + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testSpecificWithParams : (MTRTestClusterClusterTestSpecificParams * _Nullable) params completion - : (void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, NSError * _Nullable error)) completion; -- (void)testSpecificWithCompletion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completion; +- (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)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestUnknownCommand - * - * Simple command that should not be added to the server. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testUnknownCommandWithParams : (MTRTestClusterClusterTestUnknownCommandParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)testUnknownCommandWithCompletion:(MTRStatusCompletion)completion; +- (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)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeReactivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestAddArguments - * - * Command that takes two arguments and returns their sum. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testAddArgumentsWithParams : (MTRTestClusterClusterTestAddArgumentsParams *) params completion - : (void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeApparentPowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestSimpleArgumentRequest - * - * Command that takes an argument which is bool + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testSimpleArgumentRequestWithParams : (MTRTestClusterClusterTestSimpleArgumentRequestParams *) params completion - : (void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestStructArrayArgumentRequest - * - * Command that takes various arguments that are arrays, including an array of structs which have a list member. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testStructArrayArgumentRequestWithParams : (MTRTestClusterClusterTestStructArrayArgumentRequestParams *) params completion - : (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestStructArgumentRequest - * - * Command that takes an argument which is struct. The response echoes the - 'b' field of the single arg. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testStructArgumentRequestWithParams : (MTRTestClusterClusterTestStructArgumentRequestParams *) params completion - : (void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestNestedStructArgumentRequest - * - * Command that takes an argument which is nested struct. The response - echoes the 'b' field of ar1.c. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testNestedStructArgumentRequestWithParams : (MTRTestClusterClusterTestNestedStructArgumentRequestParams *) params completion - : (void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestListStructArgumentRequest - * - * Command that takes an argument which is a list of structs. The response - returns false if there is some struct in the list whose 'b' field is - false, and true otherwise (including if the list is empty). + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testListStructArgumentRequestWithParams : (MTRTestClusterClusterTestListStructArgumentRequestParams *) params completion - : (void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestListInt8UArgumentRequest - * - * Command that takes an argument which is a list of INT8U. The response - returns false if the list contains a 0 in it, true otherwise (including - if the list is empty). + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testListInt8UArgumentRequestWithParams : (MTRTestClusterClusterTestListInt8UArgumentRequestParams *) params completion - : (void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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; ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestNestedStructListArgumentRequest - * - * Command that takes an argument which is a Nested Struct List. The - response returns false if there is some struct in arg1 (either directly - in arg1.c or in the arg1.d list) whose 'b' field is false, and true - otherwise. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testNestedStructListArgumentRequestWithParams - : (MTRTestClusterClusterTestNestedStructListArgumentRequestParams *) params completion - : (void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestListNestedStructListArgumentRequest - * - * Command that takes an argument which is a list of Nested Struct List. - The response returns false if there is some struct in arg1 (either - directly in as the 'c' field of an entry 'd' list of an entry) whose 'b' - field is false, and true otherwise (including if the list is empty). + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testListNestedStructListArgumentRequestWithParams - : (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *) params completion - : (void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestListInt8UReverseRequest - * - * Command that takes an argument which is a list of INT8U and expects a - response that reverses the list. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testListInt8UReverseRequestWithParams : (MTRTestClusterClusterTestListInt8UReverseRequestParams *) params completion - : (void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestEnumsRequest - * - * Command that sends a vendor id and an enum. The server is expected to - echo them back. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testEnumsRequestWithParams : (MTRTestClusterClusterTestEnumsRequestParams *) params completion - : (void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TestNullableOptionalRequest - * - * Command that takes an argument which is nullable and optional. The - response returns a boolean indicating whether the argument was present, - if that's true a boolean indicating whether the argument was null, and - if that' false the argument it received. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testNullableOptionalRequestWithParams - : (MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable) params completion - : (void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command TestComplexNullableOptionalRequest - * - * Command that takes various arguments which can be nullable and/or optional. The - response returns information about which things were received and what - their state was. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) testComplexNullableOptionalRequestWithParams - : (MTRTestClusterClusterTestComplexNullableOptionalRequestParams *) params completion - : (void (^)( - MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, NSError * _Nullable error)) completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** - * Command SimpleStructEchoRequest - * - * Command that takes an argument which is a struct. The response echoes - the struct back. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) simpleStructEchoRequestWithParams : (MTRTestClusterClusterSimpleStructEchoRequestParams *) params completion - : (void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, NSError * _Nullable error)) 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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Command TimedInvokeRequest - * - * Command that just responds with a success status if the timed invoke - conditions are met. + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. */ --(void) timedInvokeRequestWithParams : (MTRTestClusterClusterTimedInvokeRequestParams * _Nullable) params completion - : (MTRStatusCompletion) completion; -- (void)timedInvokeRequestWithCompletion:(MTRStatusCompletion)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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * Command TestSimpleOptionalArgumentRequest - * - * Command that takes an optional argument which is bool. It responds with a success value if the optional is set to any value. - */ --(void) testSimpleOptionalArgumentRequestWithParams - : (MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable) params completion - : (MTRStatusCompletion) completion; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; -/** - * Command TestEmitTestEventRequest - * - * Command that takes identical arguments to the fields of the TestEvent and logs the TestEvent to the buffer. Command returns an - * event ID as the response. - */ --(void) testEmitTestEventRequestWithParams : (MTRTestClusterClusterTestEmitTestEventRequestParams *) params completion - : (void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, NSError * _Nullable error)) completion; +@end /** - * Command TestEmitTestFabricScopedEventRequest - * - * Command that takes identical arguments to the fields of the TestFabricScopedEvent and logs the TestFabricScopedEvent to the - * buffer. Command returns an event ID as the response. + * Cluster Test Cluster + * The Test Cluster is meant to validate the generated code */ --(void) testEmitTestFabricScopedEventRequestWithParams - : (MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *) params completion - : (void (^)( - MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, NSError * _Nullable error)) completion; +@interface MTRBaseClusterTestCluster : MTRCluster -- (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; +- (void)testWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)testNotHandledWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testSpecificWithCompletionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)testUnknownCommandWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params + completionHandler: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testListNestedStructListArgumentRequestWithParams: + (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params + completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params + completionHandler: + (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)timedInvokeRequestWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (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; - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeBitmap8WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBitmap8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeBitmap16WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBitmap16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeBitmap32WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBitmap32WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeBitmap64WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBitmap64WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt24uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt32uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt40uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt48uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt56uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt64uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt24sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt32sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt40sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt48sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt56sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt64sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEnum8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEnum16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeFloatSingleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFloatSingleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeFloatDoubleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFloatDoubleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeOctetStringWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeListInt8uWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeListInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeListOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeListOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeListStructOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeListStructOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeListStructOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLongOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeLongOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLongOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeCharStringWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCharStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLongCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeLongCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLongCharStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeLongCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeEpochUsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeEpochUsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEpochUsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeEpochUsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeEpochSWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeEpochSWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEpochSWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeEpochSWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeVendorIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorIdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeVendorIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeListNullablesAndOptionalsStructWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeListNullablesAndOptionalsStructWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeEnumAttrWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEnumAttrWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeStructAttrWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeStructAttrWithCompletionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler; - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeStructAttrWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRangeRestrictedInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRangeRestrictedInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRangeRestrictedInt16uWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRangeRestrictedInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRangeRestrictedInt16sWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRangeRestrictedInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeListLongOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeListLongOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeListLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion; + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeListFabricScopedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeListFabricScopedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTimedWriteBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeTimedWriteBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTimedWriteBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeTimedWriteBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneralErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeGeneralErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneralErrorBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeGeneralErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeClusterErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterErrorBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeClusterErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeUnsupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeUnsupportedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUnsupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeUnsupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableBitmap8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableBitmap16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableBitmap16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNullableBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableBitmap32WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableBitmap32WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNullableBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableBitmap64WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. - */ -- (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableBitmap64WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; + */ +- (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)readAttributeNullableBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt24uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt32uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt40uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt48uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt56uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt64uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt24sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt32sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt40sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt48sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt56sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt64sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableEnum8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableEnum16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableFloatSingleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableFloatSingleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableFloatDoubleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableFloatDoubleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableCharStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableEnumAttrWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableEnumAttrWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeNullableEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableStructWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completion; +- (void)readAttributeNullableStructWithCompletionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler; - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableStructWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableRangeRestrictedInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableRangeRestrictedInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableRangeRestrictedInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; -- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableRangeRestrictedInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeWriteOnlyInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; -- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion; +- (void)readAttributeWriteOnlyInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWriteOnlyInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWriteOnlyInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (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; ++ (void)readAttributeWriteOnlyInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion; +- (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 + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -19252,50 +22187,50 @@ typedef NS_OPTIONS(uint16_t, MTRActionsCommandBits) { MTRActionsCommandBitsDisableActionWithDuration = 0x800, }; -typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderOTAApplyUpdateAction) { - MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed = 0x00, - MTROTASoftwareUpdateProviderOTAApplyUpdateActionAwaitNextAction = 0x01, - MTROTASoftwareUpdateProviderOTAApplyUpdateActionDiscontinue = 0x02, +typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateProviderOTAApplyUpdateAction) { + MTROtaSoftwareUpdateProviderOTAApplyUpdateActionProceed = 0x00, + MTROtaSoftwareUpdateProviderOTAApplyUpdateActionAwaitNextAction = 0x01, + MTROtaSoftwareUpdateProviderOTAApplyUpdateActionDiscontinue = 0x02, }; -typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderOTADownloadProtocol) { - MTROTASoftwareUpdateProviderOTADownloadProtocolBDXSynchronous = 0x00, - MTROTASoftwareUpdateProviderOTADownloadProtocolBDXAsynchronous = 0x01, - MTROTASoftwareUpdateProviderOTADownloadProtocolHTTPS = 0x02, - MTROTASoftwareUpdateProviderOTADownloadProtocolVendorSpecific = 0x03, +typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateProviderOTADownloadProtocol) { + MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXSynchronous = 0x00, + MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXAsynchronous = 0x01, + MTROtaSoftwareUpdateProviderOTADownloadProtocolHTTPS = 0x02, + MTROtaSoftwareUpdateProviderOTADownloadProtocolVendorSpecific = 0x03, }; -typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderOTAQueryStatus) { - MTROTASoftwareUpdateProviderOTAQueryStatusUpdateAvailable = 0x00, - MTROTASoftwareUpdateProviderOTAQueryStatusBusy = 0x01, - MTROTASoftwareUpdateProviderOTAQueryStatusNotAvailable = 0x02, - MTROTASoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported = 0x03, +typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateProviderOTAQueryStatus) { + MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable = 0x00, + MTROtaSoftwareUpdateProviderOTAQueryStatusBusy = 0x01, + MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable = 0x02, + MTROtaSoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported = 0x03, }; -typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorOTAAnnouncementReason) { - MTROTASoftwareUpdateRequestorOTAAnnouncementReasonSimpleAnnouncement = 0x00, - MTROTASoftwareUpdateRequestorOTAAnnouncementReasonUpdateAvailable = 0x01, - MTROTASoftwareUpdateRequestorOTAAnnouncementReasonUrgentUpdateAvailable = 0x02, +typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateRequestorOTAAnnouncementReason) { + MTROtaSoftwareUpdateRequestorOTAAnnouncementReasonSimpleAnnouncement = 0x00, + MTROtaSoftwareUpdateRequestorOTAAnnouncementReasonUpdateAvailable = 0x01, + MTROtaSoftwareUpdateRequestorOTAAnnouncementReasonUrgentUpdateAvailable = 0x02, }; -typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorOTAChangeReason) { - MTROTASoftwareUpdateRequestorOTAChangeReasonUnknown = 0x00, - MTROTASoftwareUpdateRequestorOTAChangeReasonSuccess = 0x01, - MTROTASoftwareUpdateRequestorOTAChangeReasonFailure = 0x02, - MTROTASoftwareUpdateRequestorOTAChangeReasonTimeOut = 0x03, - MTROTASoftwareUpdateRequestorOTAChangeReasonDelayByProvider = 0x04, +typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateRequestorOTAChangeReason) { + MTROtaSoftwareUpdateRequestorOTAChangeReasonUnknown = 0x00, + MTROtaSoftwareUpdateRequestorOTAChangeReasonSuccess = 0x01, + MTROtaSoftwareUpdateRequestorOTAChangeReasonFailure = 0x02, + MTROtaSoftwareUpdateRequestorOTAChangeReasonTimeOut = 0x03, + MTROtaSoftwareUpdateRequestorOTAChangeReasonDelayByProvider = 0x04, }; -typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorOTAUpdateState) { - MTROTASoftwareUpdateRequestorOTAUpdateStateUnknown = 0x00, - MTROTASoftwareUpdateRequestorOTAUpdateStateIdle = 0x01, - MTROTASoftwareUpdateRequestorOTAUpdateStateQuerying = 0x02, - MTROTASoftwareUpdateRequestorOTAUpdateStateDelayedOnQuery = 0x03, - MTROTASoftwareUpdateRequestorOTAUpdateStateDownloading = 0x04, - MTROTASoftwareUpdateRequestorOTAUpdateStateApplying = 0x05, - MTROTASoftwareUpdateRequestorOTAUpdateStateDelayedOnApply = 0x06, - MTROTASoftwareUpdateRequestorOTAUpdateStateRollingBack = 0x07, - MTROTASoftwareUpdateRequestorOTAUpdateStateDelayedOnUserConsent = 0x08, +typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateRequestorOTAUpdateState) { + MTROtaSoftwareUpdateRequestorOTAUpdateStateUnknown = 0x00, + MTROtaSoftwareUpdateRequestorOTAUpdateStateIdle = 0x01, + MTROtaSoftwareUpdateRequestorOTAUpdateStateQuerying = 0x02, + MTROtaSoftwareUpdateRequestorOTAUpdateStateDelayedOnQuery = 0x03, + MTROtaSoftwareUpdateRequestorOTAUpdateStateDownloading = 0x04, + MTROtaSoftwareUpdateRequestorOTAUpdateStateApplying = 0x05, + MTROtaSoftwareUpdateRequestorOTAUpdateStateDelayedOnApply = 0x06, + MTROtaSoftwareUpdateRequestorOTAUpdateStateRollingBack = 0x07, + MTROtaSoftwareUpdateRequestorOTAUpdateStateDelayedOnUserConsent = 0x08, }; typedef NS_ENUM(uint8_t, MTRTimeFormatLocalizationCalendarType) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index ca61f4e073a805..8f5fec474c7a2b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -15,13 +15,15 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import +#import "MTRAttributeCacheContainer_Internal.h" #import "MTRBaseClusters_internal.h" #import "MTRBaseDevice.h" #import "MTRBaseDevice_Internal.h" #import "MTRCallbackBridge_internal.h" -#import "MTRClusterStateCacheContainer_Internal.h" #import "MTRCluster_internal.h" #import "MTRCommandPayloadsObjc.h" #import "MTRStructsObjc.h" @@ -39,7 +41,7 @@ // NOLINTBEGIN(clang-analyzer-cplusplus.NewDeleteLeaks): Linter is unable to locate the delete on these objects. @implementation MTRBaseClusterIdentify -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -47,19 +49,19 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completion:(MTRStatusCompletion)completion +- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -79,14 +81,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params completion:(MTRStatusCompletion)completion +- (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -109,9 +112,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeIdentifyTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeIdentifyTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -121,13 +125,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -136,7 +140,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -159,16 +163,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeIdentifyTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -178,27 +186,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeIdentifyTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeIdentifyTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -209,9 +219,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeIdentifyTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeIdentifyTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -221,16 +232,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -240,27 +255,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeIdentifyTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeIdentifyTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -271,9 +288,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -283,17 +301,22 @@ new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -303,29 +326,30 @@ new MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -336,9 +360,10 @@ new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -348,17 +373,22 @@ new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -368,41 +398,44 @@ new MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRIdentifyAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRIdentifyAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -412,16 +445,20 @@ new MTRIdentifyAttributeListListAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -431,40 +468,44 @@ new MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRIdentifyAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -474,16 +515,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -493,27 +538,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -524,9 +570,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -536,16 +583,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -555,28 +607,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -591,7 +644,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterGroups -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -599,17 +652,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params - completion:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRGroupsClusterAddGroupResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGroupsClusterAddGroupResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -630,12 +684,12 @@ new MTRGroupsClusterAddGroupResponseCallbackBridge(self.callbackQueue, self.devi } - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params - completion: - (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRGroupsClusterViewGroupResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGroupsClusterViewGroupResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -655,12 +709,12 @@ new MTRGroupsClusterViewGroupResponseCallbackBridge(self.callbackQueue, self.dev } - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params - completion:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -701,12 +755,12 @@ new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(self.callbackQueue, } - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params - completion: - (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRGroupsClusterRemoveGroupResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGroupsClusterRemoveGroupResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -725,19 +779,19 @@ new MTRGroupsClusterRemoveGroupResponseCallbackBridge(self.callbackQueue, self.d }); } -- (void)removeAllGroupsWithCompletion:(MTRStatusCompletion)completion +- (void)removeAllGroupsWithCompletionHandler:(StatusCompletion)completionHandler { - [self removeAllGroupsWithParams:nil completion:completion]; + [self removeAllGroupsWithParams:nil completionHandler:completionHandler]; } - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -757,14 +811,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -785,9 +839,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -797,16 +852,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -816,27 +875,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNameSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -847,9 +908,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGroupsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGroupsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -859,17 +921,22 @@ new MTRGroupsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -879,41 +946,44 @@ new MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRGroupsGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGroupsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGroupsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -923,17 +993,22 @@ new MTRGroupsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -943,41 +1018,44 @@ new MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRGroupsAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRGroupsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGroupsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -987,16 +1065,20 @@ new MTRGroupsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1006,27 +1088,29 @@ new MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRGroupsAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRGroupsAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -1037,9 +1121,10 @@ new MTRGroupsAttributeListListAttributeCallbackBridge(queue, completion, ^(Cance }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1049,16 +1134,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1068,27 +1157,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -1099,9 +1189,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1111,16 +1202,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1130,28 +1226,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -1166,7 +1263,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterScenes -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -1174,17 +1271,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params - completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterAddSceneResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRScenesClusterAddSceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1280,12 +1378,12 @@ new MTRScenesClusterAddSceneResponseCallbackBridge(self.callbackQueue, self.devi } - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params - completion: - (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterViewSceneResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRScenesClusterViewSceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1306,12 +1404,12 @@ new MTRScenesClusterViewSceneResponseCallbackBridge(self.callbackQueue, self.dev } - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params - completion: - (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterRemoveSceneResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRScenesClusterRemoveSceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1332,12 +1430,12 @@ new MTRScenesClusterRemoveSceneResponseCallbackBridge(self.callbackQueue, self.d } - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params - completion:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterRemoveAllScenesResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRScenesClusterRemoveAllScenesResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1357,12 +1455,12 @@ new MTRScenesClusterRemoveAllScenesResponseCallbackBridge(self.callbackQueue, se } - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params - completion: - (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterStoreSceneResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRScenesClusterStoreSceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1382,14 +1480,14 @@ new MTRScenesClusterStoreSceneResponseCallbackBridge(self.callbackQueue, self.de }); } -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completion:(MTRStatusCompletion)completion +- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1420,12 +1518,12 @@ new MTRCommandSuccessCallbackBridge( } - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params - completion:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterGetSceneMembershipResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRScenesClusterGetSceneMembershipResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1445,12 +1543,12 @@ new MTRScenesClusterGetSceneMembershipResponseCallbackBridge(self.callbackQueue, } - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params - completion:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1546,12 +1644,12 @@ new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(self.callbackQueue, s } - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params - completion:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1572,12 +1670,12 @@ new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(self.callbackQueue, } - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - completion: - (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterCopySceneResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRScenesClusterCopySceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1600,9 +1698,10 @@ new MTRScenesClusterCopySceneResponseCallbackBridge(self.callbackQueue, self.dev }); } -- (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSceneCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1612,16 +1711,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1631,27 +1734,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSceneCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSceneCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -1662,9 +1766,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentSceneWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1674,16 +1779,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1693,27 +1802,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentSceneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentSceneWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -1724,9 +1835,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentGroupWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1736,16 +1848,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1755,27 +1871,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentGroupWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentGroupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -1786,9 +1904,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSceneValidWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1798,16 +1917,20 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1817,27 +1940,28 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSceneValidWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSceneValidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -1848,9 +1972,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1860,16 +1985,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1879,27 +2008,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNameSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -1910,9 +2041,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLastConfiguredByWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1922,16 +2054,21 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -1941,28 +2078,29 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLastConfiguredByWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -1973,9 +2111,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRScenesGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRScenesGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1985,17 +2124,22 @@ new MTRScenesGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2005,41 +2149,44 @@ new MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRScenesGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRScenesAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRScenesAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2049,17 +2196,22 @@ new MTRScenesAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2069,41 +2221,44 @@ new MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRScenesAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRScenesAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRScenesAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2113,16 +2268,20 @@ new MTRScenesAttributeListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRScenesAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2132,27 +2291,29 @@ new MTRScenesAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRScenesAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRScenesAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -2163,9 +2324,10 @@ new MTRScenesAttributeListListAttributeCallbackBridge(queue, completion, ^(Cance }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2175,16 +2337,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2194,27 +2360,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -2225,9 +2392,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2237,16 +2405,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2256,28 +2429,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -2292,7 +2466,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterOnOff -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -2300,23 +2474,23 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)offWithCompletion:(MTRStatusCompletion)completion +- (void)offWithCompletionHandler:(StatusCompletion)completionHandler { - [self offWithParams:nil completion:completion]; + [self offWithParams:nil completionHandler:completionHandler]; } -- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)offWithParams:(MTROnOffClusterOffParams * _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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2335,18 +2509,18 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)onWithCompletion:(MTRStatusCompletion)completion +- (void)onWithCompletionHandler:(StatusCompletion)completionHandler { - [self onWithParams:nil completion:completion]; + [self onWithParams:nil completionHandler:completionHandler]; } -- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)onWithParams:(MTROnOffClusterOnParams * _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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2365,18 +2539,18 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)toggleWithCompletion:(MTRStatusCompletion)completion +- (void)toggleWithCompletionHandler:(StatusCompletion)completionHandler { - [self toggleWithParams:nil completion:completion]; + [self toggleWithParams:nil completionHandler:completionHandler]; } -- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)toggleWithParams:(MTROnOffClusterToggleParams * _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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2395,14 +2569,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completion:(MTRStatusCompletion)completion +- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2424,19 +2598,19 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)onWithRecallGlobalSceneWithCompletion:(MTRStatusCompletion)completion +- (void)onWithRecallGlobalSceneWithCompletionHandler:(StatusCompletion)completionHandler { - [self onWithRecallGlobalSceneWithParams:nil completion:completion]; + [self onWithRecallGlobalSceneWithParams:nil completionHandler:completionHandler]; } - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2455,14 +2629,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params completion:(MTRStatusCompletion)completion +- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2485,9 +2659,9 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2497,16 +2671,20 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2516,27 +2694,28 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOnOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -2547,9 +2726,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGlobalSceneControlWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2559,17 +2739,21 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2579,28 +2763,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGlobalSceneControlWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -2611,9 +2796,9 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeOnTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2623,13 +2808,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOnTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOnTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -2638,7 +2823,7 @@ - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -2661,16 +2846,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2680,27 +2869,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOnTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -2711,9 +2901,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeOffWaitTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2723,13 +2914,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -2738,7 +2929,7 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -2761,16 +2952,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2780,27 +2975,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOffWaitTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -2811,9 +3008,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeStartUpOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2823,13 +3021,13 @@ new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(self.callbac }); } -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -2838,7 +3036,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -2866,16 +3064,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2885,28 +3087,30 @@ new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStartUpOnOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -2917,9 +3121,10 @@ new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROnOffGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTROnOffGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2929,17 +3134,22 @@ new MTROnOffGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -2949,41 +3159,44 @@ new MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROnOffGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROnOffAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTROnOffAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2993,17 +3206,22 @@ new MTROnOffAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3013,41 +3231,44 @@ new MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROnOffAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROnOffAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTROnOffAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3057,16 +3278,20 @@ new MTROnOffAttributeListListAttributeCallbackBridge(self.callbackQueue, self.de }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTROnOffAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3076,27 +3301,29 @@ new MTROnOffAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROnOffAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTROnOffAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -3107,9 +3334,10 @@ new MTROnOffAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancel }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3119,16 +3347,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3138,27 +3370,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -3169,9 +3402,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3181,16 +3415,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3200,28 +3439,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -3236,7 +3476,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterOnOffSwitchConfiguration -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -3244,14 +3484,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3261,16 +3502,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3280,27 +3525,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSwitchTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -3311,9 +3557,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3323,13 +3570,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -3338,7 +3585,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -3361,16 +3608,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3380,27 +3632,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSwitchActionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -3411,9 +3665,11 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3423,17 +3679,22 @@ new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(s }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3443,29 +3704,30 @@ new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscrip chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -3477,9 +3739,11 @@ new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3489,17 +3753,22 @@ new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(se }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3509,29 +3778,30 @@ new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscript chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -3543,9 +3813,10 @@ new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3555,16 +3826,20 @@ new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3574,28 +3849,30 @@ new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBri chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -3606,9 +3883,10 @@ new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3618,16 +3896,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3637,27 +3919,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -3668,9 +3951,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3680,16 +3964,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -3699,28 +3988,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -3735,7 +4025,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterLevelControl -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -3743,19 +4033,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params completion:(MTRStatusCompletion)completion +- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3783,14 +4074,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MTRStatusCompletion)completion +- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3818,14 +4109,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MTRStatusCompletion)completion +- (void)stepWithParams:(MTRLevelControlClusterStepParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3854,14 +4145,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MTRStatusCompletion)completion +- (void)stopWithParams:(MTRLevelControlClusterStopParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3883,14 +4174,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3918,14 +4209,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params completion:(MTRStatusCompletion)completion +- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3953,14 +4245,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params completion:(MTRStatusCompletion)completion +- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3989,14 +4282,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params completion:(MTRStatusCompletion)completion +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -4018,14 +4312,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -4045,9 +4339,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4057,16 +4352,20 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4076,27 +4375,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -4107,9 +4408,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4119,16 +4421,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4138,27 +4445,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -4169,9 +4478,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4181,16 +4491,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4200,27 +4514,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -4231,9 +4546,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4243,16 +4559,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4262,27 +4582,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -4293,9 +4614,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4305,16 +4627,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4324,28 +4651,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -4356,9 +4684,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4368,16 +4697,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4387,27 +4720,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -4418,9 +4753,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4430,16 +4766,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4449,27 +4789,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -4480,9 +4822,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::Options::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4492,13 +4834,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -4507,7 +4849,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -4530,16 +4872,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4549,27 +4895,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::Options::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -4580,9 +4927,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4592,13 +4940,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -4607,7 +4955,7 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -4630,17 +4978,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4650,28 +5003,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOnOffTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -4682,9 +5036,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4694,13 +5048,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOnLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeOnLevelWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -4709,7 +5063,7 @@ - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -4737,16 +5091,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4756,27 +5114,28 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOnLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -4787,9 +5146,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4799,13 +5159,13 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -4814,7 +5174,7 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -4842,16 +5202,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4861,28 +5226,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOnTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -4893,9 +5259,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4905,13 +5272,13 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -4920,7 +5287,7 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -4948,16 +5315,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -4967,28 +5339,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOffTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -4999,9 +5372,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5011,13 +5385,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -5026,7 +5400,7 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5054,16 +5428,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5073,28 +5452,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDefaultMoveRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultMoveRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -5105,9 +5485,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeStartUpCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5117,13 +5498,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -5132,7 +5513,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5160,17 +5541,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5180,28 +5566,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStartUpCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -5212,9 +5599,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5224,17 +5612,22 @@ new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5244,29 +5637,30 @@ new MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -5277,9 +5671,10 @@ new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5289,17 +5684,22 @@ new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5309,29 +5709,30 @@ new MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -5342,9 +5743,10 @@ new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRLevelControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRLevelControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5354,16 +5756,20 @@ new MTRLevelControlAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5373,40 +5779,44 @@ new MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRLevelControlAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5416,16 +5826,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5435,27 +5849,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -5466,9 +5881,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5478,16 +5894,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5497,28 +5918,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -5533,7 +5955,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterBinaryInputBasic -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -5541,14 +5963,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveTextWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -5558,13 +5981,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeActiveTextWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeActiveTextWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -5573,7 +5996,7 @@ - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5596,16 +6019,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5615,27 +6042,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -5646,9 +6074,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -5658,13 +6087,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeDescriptionWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeDescriptionWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -5673,7 +6102,7 @@ - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5696,16 +6125,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5715,27 +6148,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -5746,9 +6181,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInactiveTextWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -5758,13 +6194,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInactiveTextWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInactiveTextWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -5773,7 +6209,7 @@ - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5796,16 +6232,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5815,27 +6255,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInactiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -5846,9 +6288,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5858,13 +6301,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -5873,7 +6316,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5896,16 +6339,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5915,27 +6362,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOutOfServiceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -5946,9 +6395,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePolarityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5958,16 +6408,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -5977,27 +6431,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePolarityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6008,9 +6463,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePresentValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6020,13 +6476,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributePresentValueWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributePresentValueWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -6035,7 +6491,7 @@ - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -6058,16 +6514,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6077,27 +6537,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePresentValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6108,9 +6570,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReliabilityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6120,13 +6583,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeReliabilityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeReliabilityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -6135,7 +6598,7 @@ - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -6158,16 +6621,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6177,27 +6644,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeReliabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6208,9 +6677,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6220,16 +6690,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6239,27 +6713,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStatusFlagsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6270,9 +6746,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeApplicationTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6282,16 +6759,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6301,28 +6783,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeApplicationTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6333,9 +6816,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6345,17 +6829,22 @@ new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(self.call }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6365,29 +6854,30 @@ new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBrid chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6398,9 +6888,10 @@ new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6410,17 +6901,22 @@ new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6430,29 +6926,30 @@ new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6463,9 +6960,10 @@ new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6475,16 +6973,20 @@ new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6494,28 +6996,30 @@ new MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6526,9 +7030,10 @@ new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6538,16 +7043,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6557,27 +7066,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6588,9 +7098,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6600,16 +7111,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6619,28 +7135,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6655,7 +7172,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterDescriptor -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -6663,14 +7180,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDeviceListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDescriptorDeviceTypeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDescriptorDeviceTypeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6680,16 +7198,20 @@ new MTRDescriptorDeviceTypeListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6699,40 +7221,43 @@ new MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDeviceTypeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDeviceListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDescriptorDeviceTypeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeServerListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeServerListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDescriptorServerListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDescriptorServerListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6742,16 +7267,20 @@ new MTRDescriptorServerListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorServerListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6761,27 +7290,28 @@ new MTRDescriptorServerListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeServerListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDescriptorServerListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRDescriptorServerListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6792,9 +7322,10 @@ new MTRDescriptorServerListListAttributeCallbackBridge(queue, completion, ^(Canc }); } -- (void)readAttributeClientListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClientListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDescriptorClientListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDescriptorClientListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6804,16 +7335,20 @@ new MTRDescriptorClientListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorClientListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6823,27 +7358,28 @@ new MTRDescriptorClientListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClientListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDescriptorClientListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRDescriptorClientListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6854,9 +7390,10 @@ new MTRDescriptorClientListListAttributeCallbackBridge(queue, completion, ^(Canc }); } -- (void)readAttributePartsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePartsListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDescriptorPartsListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDescriptorPartsListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6866,16 +7403,20 @@ new MTRDescriptorPartsListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6885,27 +7426,28 @@ new MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePartsListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDescriptorPartsListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRDescriptorPartsListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6916,9 +7458,10 @@ new MTRDescriptorPartsListListAttributeCallbackBridge(queue, completion, ^(Cance }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6928,17 +7471,22 @@ new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6948,29 +7496,30 @@ new MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -6981,9 +7530,10 @@ new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6993,17 +7543,22 @@ new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7013,29 +7568,30 @@ new MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -7046,9 +7602,10 @@ new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDescriptorAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDescriptorAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7058,16 +7615,20 @@ new MTRDescriptorAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7077,40 +7638,44 @@ new MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDescriptorAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7120,16 +7685,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7139,27 +7708,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -7170,9 +7740,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7182,16 +7753,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7201,28 +7777,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -7237,7 +7814,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterBinding -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -7245,33 +7822,33 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRBindingBindingListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBindingBindingListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::Binding::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute( - successFn->mContext, successFn->mCall, failureFn->mCall, params.fabricFiltered); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBindingWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBindingWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -7280,7 +7857,7 @@ - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -7340,16 +7917,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBindingBindingListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7359,27 +7940,28 @@ new MTRBindingBindingListAttributeCallbackSubscriptionBridge( chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBindingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBindingBindingListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBindingBindingListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Binding::Attributes::Binding::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -7390,9 +7972,10 @@ new MTRBindingBindingListAttributeCallbackBridge(queue, completion, ^(Cancelable }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBindingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBindingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7402,17 +7985,22 @@ new MTRBindingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7422,41 +8010,44 @@ new MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBindingGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBindingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBindingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7466,17 +8057,22 @@ new MTRBindingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7486,41 +8082,44 @@ new MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBindingAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBindingAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBindingAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7530,16 +8129,20 @@ new MTRBindingAttributeListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRBindingAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7549,27 +8152,29 @@ new MTRBindingAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBindingAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBindingAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -7580,9 +8185,10 @@ new MTRBindingAttributeListListAttributeCallbackBridge(queue, completion, ^(Canc }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7592,16 +8198,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7611,27 +8221,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -7642,9 +8253,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7654,16 +8266,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7673,28 +8290,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -7709,7 +8327,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterAccessControl -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -7717,33 +8335,33 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeACLWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAclWithParams:(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 MTRAccessControlACLListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAccessControlAclListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute( - successFn->mContext, successFn->mCall, failureFn->mCall, params.fabricFiltered); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeACLWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeAclWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -7752,7 +8370,7 @@ - (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -7873,47 +8491,52 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACLWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRAccessControlACLListAttributeCallbackSubscriptionBridge( + new MTRAccessControlAclListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAccessControlACLListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRAccessControlAclListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeACLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRAccessControlACLListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRAccessControlAclListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -7924,27 +8547,27 @@ new MTRAccessControlACLListAttributeCallbackBridge(queue, completion, ^(Cancelab } - (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRAccessControlExtensionListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAccessControlExtensionListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute( - successFn->mContext, successFn->mCall, failureFn->mCall, params.fabricFiltered); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeExtensionWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeExtensionWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -7953,7 +8576,7 @@ - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -7998,16 +8621,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8017,41 +8644,43 @@ new MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeExtensionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRAccessControlExtensionListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8061,18 +8690,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8082,28 +8715,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSubjectsPerAccessControlEntryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -8114,10 +8748,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeTargetsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8127,18 +8761,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8148,28 +8786,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTargetsPerAccessControlEntryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -8180,10 +8819,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeAccessControlEntriesPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8193,18 +8832,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8214,28 +8857,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAccessControlEntriesPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -8246,9 +8890,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8258,17 +8903,22 @@ new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8278,29 +8928,30 @@ new MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -8311,9 +8962,10 @@ new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8323,17 +8975,22 @@ new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8343,29 +9000,30 @@ new MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -8376,9 +9034,10 @@ new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRAccessControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAccessControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8388,16 +9047,20 @@ new MTRAccessControlAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8407,40 +9070,44 @@ new MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRAccessControlAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8450,16 +9117,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8469,27 +9140,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -8500,9 +9172,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8512,16 +9185,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8531,28 +9209,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -8567,7 +9246,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterActions -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -8575,19 +9254,19 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completion:(MTRStatusCompletion)completion +- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8612,14 +9291,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8644,14 +9323,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completion:(MTRStatusCompletion)completion +- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8676,14 +9355,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8708,14 +9387,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completion:(MTRStatusCompletion)completion +- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8739,14 +9418,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completion:(MTRStatusCompletion)completion +- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8771,14 +9450,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8803,14 +9482,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completion:(MTRStatusCompletion)completion +- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8834,14 +9513,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completion:(MTRStatusCompletion)completion +- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8866,14 +9545,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8898,14 +9577,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params completion:(MTRStatusCompletion)completion +- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8930,14 +9609,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8962,9 +9641,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeActionListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActionListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRActionsActionListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRActionsActionListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::ActionList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8974,16 +9654,20 @@ new MTRActionsActionListListAttributeCallbackBridge(self.callbackQueue, self.dev }); } -- (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRActionsActionListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8993,27 +9677,28 @@ new MTRActionsActionListListAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActionListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRActionsActionListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRActionsActionListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Actions::Attributes::ActionList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -9024,9 +9709,10 @@ new MTRActionsActionListListAttributeCallbackBridge(queue, completion, ^(Cancela }); } -- (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEndpointListsWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRActionsEndpointListsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRActionsEndpointListsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9036,16 +9722,20 @@ new MTRActionsEndpointListsListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9055,27 +9745,29 @@ new MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEndpointListsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRActionsEndpointListsListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRActionsEndpointListsListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -9086,9 +9778,10 @@ new MTRActionsEndpointListsListAttributeCallbackBridge(queue, completion, ^(Canc }); } -- (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetupURLWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9098,16 +9791,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9117,27 +9814,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSetupURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -9148,9 +9846,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRActionsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRActionsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9160,17 +9859,22 @@ new MTRActionsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9180,41 +9884,44 @@ new MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRActionsGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRActionsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRActionsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9224,17 +9931,22 @@ new MTRActionsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9244,41 +9956,44 @@ new MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRActionsAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRActionsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRActionsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9288,16 +10003,20 @@ new MTRActionsAttributeListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRActionsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9307,27 +10026,29 @@ new MTRActionsAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRActionsAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRActionsAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -9338,9 +10059,10 @@ new MTRActionsAttributeListListAttributeCallbackBridge(queue, completion, ^(Canc }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9350,16 +10072,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9369,27 +10095,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -9400,9 +10127,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9412,16 +10140,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9431,28 +10164,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -9467,7 +10201,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterBasic -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -9475,24 +10209,24 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)mfgSpecificPingWithCompletion:(MTRStatusCompletion)completion +- (void)mfgSpecificPingWithCompletionHandler:(StatusCompletion)completionHandler { - [self mfgSpecificPingWithParams:nil completion:completion]; + [self mfgSpecificPingWithParams:nil completionHandler:completionHandler]; } - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9511,9 +10245,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeDataModelRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9523,16 +10258,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9542,28 +10282,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDataModelRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -9574,9 +10315,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::VendorName::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9586,16 +10328,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9605,27 +10351,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::VendorName::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -9636,9 +10383,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::VendorID::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9648,16 +10396,20 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completi }); } -- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9667,27 +10419,28 @@ new MTRVendorIdAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRVendorIdAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::VendorID::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -9698,9 +10451,10 @@ new MTRVendorIdAttributeCallbackBridge(queue, completion, ^(Cancelable * success }); } -- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ProductName::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9710,16 +10464,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9729,27 +10487,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::ProductName::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -9760,9 +10520,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ProductID::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9772,16 +10533,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9791,27 +10556,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::ProductID::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -9822,9 +10588,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9834,13 +10601,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -9849,7 +10616,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -9872,16 +10639,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9891,27 +10662,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -9922,9 +10694,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeLocationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocationWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::Location::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9934,13 +10707,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLocationWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLocationWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -9949,7 +10722,7 @@ - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -9972,16 +10745,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -9991,27 +10768,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLocationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::Location::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10022,9 +10800,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10034,16 +10813,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10053,28 +10837,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10085,9 +10870,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10097,17 +10883,22 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10117,28 +10908,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10149,9 +10941,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10161,16 +10954,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10180,28 +10978,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10212,9 +11011,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10224,17 +11024,22 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10244,28 +11049,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10276,9 +11082,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10288,16 +11095,21 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10307,28 +11119,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10339,9 +11152,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePartNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10351,16 +11165,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10370,27 +11188,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10401,9 +11220,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductURLWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10413,16 +11233,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10432,27 +11256,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10463,9 +11288,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10475,16 +11301,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10494,27 +11324,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10525,9 +11357,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10537,16 +11370,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10556,27 +11393,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10587,9 +11426,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeLocalConfigDisabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocalConfigDisabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10599,13 +11439,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -10614,7 +11454,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -10637,17 +11477,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10657,28 +11502,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLocalConfigDisabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10689,9 +11535,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReachableWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::Reachable::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10701,16 +11548,20 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10720,27 +11571,28 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::Reachable::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10751,9 +11603,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10763,16 +11616,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10782,27 +11639,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -10813,10 +11671,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBasicCapabilityMinimaStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBasicCapabilityMinimaStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10826,17 +11684,21 @@ new MTRBasicCapabilityMinimaStructAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10846,41 +11708,44 @@ new MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCapabilityMinimaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBasicCapabilityMinimaStructAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10890,17 +11755,22 @@ new MTRBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10910,41 +11780,44 @@ new MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBasicGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10954,17 +11827,22 @@ new MTRBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -10974,41 +11852,44 @@ new MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBasicAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11018,16 +11899,20 @@ new MTRBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.de }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11037,27 +11922,29 @@ new MTRBasicAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBasicAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBasicAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -11068,9 +11955,10 @@ new MTRBasicAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancel }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11080,16 +11968,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11099,27 +11991,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -11130,9 +12023,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11142,16 +12036,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11161,28 +12060,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -11195,9 +12095,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @end -@implementation MTRBaseClusterOTASoftwareUpdateProvider +@implementation MTRBaseClusterOtaSoftwareUpdateProvider -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -11205,18 +12105,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParams *)params - completion:(void (^)(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -11269,20 +12169,20 @@ new MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(self.cal definedValue_0 = [self asByteSpan:params.metadataForProvider]; } - auto successFn = Callback::FromCancelable(success); + 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); }); } -- (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams *)params - completion:(void (^)(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -11295,22 +12195,22 @@ new MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(self.ca request.updateToken = [self asByteSpan:params.updateToken]; request.newVersion = params.newVersion.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); + 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); }); } -- (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params - completion:(MTRStatusCompletion)completion +- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -11331,63 +12231,71 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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 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); }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + 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 successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, 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); } @@ -11397,63 +12305,71 @@ new MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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 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); }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + 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 successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, 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); } @@ -11463,60 +12379,67 @@ new MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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 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); }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; - new MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( + new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + 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 successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -11526,9 +12449,10 @@ new MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -11538,16 +12462,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11557,27 +12485,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -11588,9 +12517,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -11600,16 +12530,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11619,28 +12554,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -11653,9 +12589,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @end -@implementation MTRBaseClusterOTASoftwareUpdateRequestor +@implementation MTRBaseClusterOtaSoftwareUpdateRequestor -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -11663,20 +12599,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)announceOtaProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params - completion:(MTRStatusCompletion)completion +- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -11705,27 +12641,28 @@ new MTRCommandSuccessCallbackBridge( } - (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::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, params.fabricFiltered); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -11734,7 +12671,7 @@ - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -11757,11 +12694,11 @@ new MTRDefaultSuccessCallbackBridge( } listFreer.add(listHolder_0); for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTROTASoftwareUpdateRequestorClusterProviderLocation class]]) { + if (![value[i_0] isKindOfClass:[MTROtaSoftwareUpdateRequestorClusterProviderLocation class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (MTROTASoftwareUpdateRequestorClusterProviderLocation *) value[i_0]; + 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; @@ -11780,51 +12717,57 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeDefaultOtaProvidersWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; - new MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( + new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + 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 successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDefaultOtaProvidersWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, 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); } @@ -11834,9 +12777,10 @@ new MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge( }); } -- (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -11846,16 +12790,21 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11865,27 +12814,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUpdatePossibleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -11896,64 +12847,72 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); + = 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)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; - new MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( + new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + 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); + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge:: + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUpdateStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, 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); } @@ -11963,9 +12922,10 @@ new MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridg }); } -- (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -11975,17 +12935,22 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11995,28 +12960,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUpdateStateProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -12027,63 +12993,71 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::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); }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + 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); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, 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); } @@ -12093,63 +13067,71 @@ new MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::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); }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + 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; - 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.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, 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); } @@ -12159,60 +13141,67 @@ new MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::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); }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; - new MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( + new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + 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); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -12222,9 +13211,10 @@ new MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12234,16 +13224,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12253,27 +13247,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -12284,9 +13279,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12296,16 +13292,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12315,28 +13316,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -12351,7 +13353,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterLocalizationConfiguration -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -12359,14 +13361,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -12376,13 +13379,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeActiveLocaleWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeActiveLocaleWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12391,7 +13394,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -12414,16 +13417,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12433,27 +13440,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveLocaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -12464,9 +13473,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12476,16 +13486,21 @@ new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12495,29 +13510,30 @@ new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptio chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSupportedLocalesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -12528,9 +13544,11 @@ new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12540,17 +13558,22 @@ new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12560,29 +13583,30 @@ new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscri chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -12594,9 +13618,11 @@ new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12606,17 +13632,22 @@ new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(s }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12626,29 +13657,30 @@ new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscrip chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -12660,9 +13692,10 @@ new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12672,16 +13705,20 @@ new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12691,28 +13728,30 @@ new MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBr chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -12723,9 +13762,10 @@ new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12735,16 +13775,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12754,27 +13798,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -12785,9 +13830,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12797,16 +13843,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12816,28 +13867,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -12852,7 +13904,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterTimeFormatLocalization -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -12860,14 +13912,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHourFormatWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12877,13 +13930,13 @@ new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(self.callb }); } -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeHourFormatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeHourFormatWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12892,7 +13945,7 @@ - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -12915,16 +13968,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -12934,28 +13991,29 @@ new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridg chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeHourFormatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -12966,9 +14024,10 @@ new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge( }); } -- (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveCalendarTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12978,13 +14037,13 @@ new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(self.cal }); } -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12993,7 +14052,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -13016,17 +14075,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13036,29 +14099,30 @@ new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBri chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveCalendarTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -13069,9 +14133,11 @@ new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge( }); } -- (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedCalendarTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -13081,17 +14147,22 @@ new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(s }); } -- (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13101,29 +14172,30 @@ new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscrip chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSupportedCalendarTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -13135,9 +14207,10 @@ new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -13147,17 +14220,22 @@ new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(sel }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13167,29 +14245,30 @@ new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscripti chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -13200,9 +14279,10 @@ new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -13212,17 +14292,22 @@ new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13232,29 +14317,30 @@ new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptio chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -13265,9 +14351,10 @@ new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -13277,16 +14364,20 @@ new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13296,28 +14387,30 @@ new MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridg chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -13328,9 +14421,10 @@ new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -13340,16 +14434,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13359,27 +14457,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -13390,9 +14489,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -13402,16 +14502,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13421,28 +14526,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -13457,7 +14563,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterUnitLocalization -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -13465,14 +14571,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -13482,13 +14589,13 @@ new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(self.callbackQueue }); } -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -13497,7 +14604,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -13520,16 +14627,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13539,41 +14651,44 @@ new MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTemperatureUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + 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); + 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)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -13583,17 +14698,22 @@ new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(self.call }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13603,29 +14723,30 @@ new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBrid chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -13636,9 +14757,10 @@ new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -13648,17 +14770,22 @@ new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13668,29 +14795,30 @@ new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -13701,9 +14829,10 @@ new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUnitLocalizationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRUnitLocalizationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -13713,16 +14842,20 @@ new MTRUnitLocalizationAttributeListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13732,28 +14865,30 @@ new MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUnitLocalizationAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -13764,9 +14899,10 @@ new MTRUnitLocalizationAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -13776,16 +14912,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13795,27 +14935,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -13826,9 +14967,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -13838,16 +14980,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13857,28 +15004,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -13893,7 +15041,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterPowerSourceConfiguration -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -13901,14 +15049,14 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -13918,16 +15066,20 @@ new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -13937,28 +15089,29 @@ new MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSourcesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -13969,9 +15122,11 @@ new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -13981,17 +15136,22 @@ new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(s }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14001,29 +15161,30 @@ new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscrip chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -14035,9 +15196,11 @@ new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -14047,17 +15210,22 @@ new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(se }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14067,29 +15235,30 @@ new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscript chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -14101,9 +15270,10 @@ new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -14113,16 +15283,20 @@ new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14132,28 +15306,30 @@ new MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBri chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14164,9 +15340,10 @@ new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -14176,16 +15353,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14195,27 +15376,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14226,9 +15408,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -14238,16 +15421,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14257,28 +15445,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14293,7 +15482,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterPowerSource -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -14301,14 +15490,14 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -14318,16 +15507,20 @@ new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14337,28 +15530,29 @@ new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14369,9 +15563,9 @@ new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge( }); } -- (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -14381,16 +15575,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14400,27 +15598,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOrderWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14431,9 +15630,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::Description::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -14443,16 +15643,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14462,27 +15666,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14493,10 +15699,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -14506,17 +15712,22 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14526,28 +15737,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWiredAssessedInputVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14558,10 +15770,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -14571,17 +15783,22 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14591,28 +15808,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWiredAssessedInputFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14623,9 +15841,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -14635,16 +15854,21 @@ new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14654,29 +15878,30 @@ new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWiredCurrentTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14687,9 +15912,10 @@ new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge( }); } -- (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -14699,17 +15925,22 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14719,28 +15950,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWiredAssessedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14751,9 +15983,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -14763,17 +15996,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14783,28 +16021,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWiredNominalVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14815,9 +16054,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -14827,17 +16067,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14847,28 +16092,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWiredMaximumCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14879,9 +16125,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -14891,16 +16138,20 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14910,27 +16161,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWiredPresentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -14941,9 +16194,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -14953,16 +16207,21 @@ new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -14972,29 +16231,30 @@ new MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveWiredFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15005,9 +16265,10 @@ new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge( }); } -- (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatVoltageWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15017,16 +16278,20 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15036,27 +16301,28 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15067,9 +16333,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15079,17 +16346,22 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15099,28 +16371,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatPercentRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15131,9 +16404,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15143,16 +16417,21 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15162,28 +16441,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatTimeRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15194,9 +16474,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15206,16 +16487,21 @@ new MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15225,28 +16511,30 @@ new MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatChargeLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15257,9 +16545,10 @@ new MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge( }); } -- (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15269,17 +16558,22 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15289,28 +16583,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatReplacementNeededWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15321,9 +16616,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15333,16 +16629,21 @@ new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15352,29 +16653,30 @@ new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatReplaceabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15385,9 +16687,10 @@ new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge( }); } -- (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatPresentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15397,16 +16700,20 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15416,27 +16723,28 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatPresentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15447,9 +16755,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveBatFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15459,16 +16768,21 @@ new MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15478,41 +16792,44 @@ new MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveBatFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15522,17 +16839,22 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15542,28 +16864,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatReplacementDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15574,9 +16897,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15586,17 +16910,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15606,28 +16935,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatCommonDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15638,9 +16968,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15650,17 +16981,21 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15670,28 +17005,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatANSIDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15702,9 +17038,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15714,16 +17051,21 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15733,28 +17075,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatIECDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15765,9 +17108,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15777,17 +17121,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15797,28 +17146,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatApprovedChemistryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15829,9 +17179,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15841,16 +17192,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15860,27 +17215,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15891,9 +17248,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatQuantityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15903,16 +17261,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15922,27 +17284,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -15953,9 +17317,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -15965,16 +17330,21 @@ new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -15984,28 +17354,30 @@ new MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatChargeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -16016,9 +17388,10 @@ new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge( }); } -- (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -16028,17 +17401,22 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16048,28 +17426,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatTimeToFullChargeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -16080,10 +17459,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -16093,17 +17472,22 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16113,28 +17497,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatFunctionalWhileChargingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -16145,9 +17530,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -16157,17 +17543,21 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16177,28 +17567,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBatChargingCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -16209,9 +17600,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveBatChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -16221,17 +17613,22 @@ new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16241,29 +17638,30 @@ new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveBatChargeFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -16274,9 +17672,10 @@ new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -16286,17 +17685,22 @@ new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16306,29 +17710,30 @@ new MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -16339,9 +17744,10 @@ new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -16351,17 +17757,22 @@ new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16371,29 +17782,30 @@ new MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -16404,9 +17816,10 @@ new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRPowerSourceAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPowerSourceAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -16416,16 +17829,20 @@ new MTRPowerSourceAttributeListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16435,40 +17852,44 @@ new MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRPowerSourceAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -16478,16 +17899,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16497,27 +17922,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -16528,9 +17954,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -16540,16 +17967,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16559,28 +17991,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -16595,7 +18028,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterGeneralCommissioning -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -16603,18 +18036,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params - completion:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16635,12 +18068,12 @@ new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(self.callbac } - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params - completion:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16662,20 +18095,21 @@ new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(self }); } -- (void)commissioningCompleteWithCompletion:(void (^)( - MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)commissioningCompleteWithCompletionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self commissioningCompleteWithParams:nil completion:completion]; + [self commissioningCompleteWithParams:nil completionHandler:completionHandler]; } - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params - completion: - (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16694,9 +18128,10 @@ new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(se }); } -- (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -16706,13 +18141,13 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -16721,7 +18156,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -16744,16 +18179,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16763,27 +18202,28 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBreadcrumbWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -16794,10 +18234,11 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBasicCommissioningInfoWithCompletion: - (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBasicCommissioningInfoWithCompletionHandler: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -16807,18 +18248,23 @@ new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(s }); } -- (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16828,32 +18274,31 @@ new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscrip chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void) - readAttributeBasicCommissioningInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)( - MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -16865,9 +18310,11 @@ new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge( }); } -- (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -16877,16 +18324,21 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( }); } -- (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16896,29 +18348,30 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscri chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRegulatoryConfigWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -16930,9 +18383,11 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( }); } -- (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -16942,17 +18397,21 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( }); } -- (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -16962,29 +18421,30 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscri chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLocationCapabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -16996,10 +18456,10 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( }); } -- (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -17009,18 +18469,22 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17030,28 +18494,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSupportsConcurrentConnectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -17062,9 +18527,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -17074,17 +18540,22 @@ new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17094,29 +18565,30 @@ new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscription chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -17127,9 +18599,10 @@ new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -17139,17 +18612,22 @@ new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17159,29 +18637,30 @@ new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionB chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -17192,9 +18671,10 @@ new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -17204,16 +18684,20 @@ new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17223,28 +18707,30 @@ new MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -17255,9 +18741,10 @@ new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -17267,16 +18754,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17286,27 +18777,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -17317,9 +18809,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -17329,16 +18822,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17348,28 +18846,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -17384,7 +18883,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterNetworkCommissioning -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -17392,18 +18891,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params - completion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, - NSError * _Nullable error))completion + 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, completion, + new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17437,12 +18936,12 @@ new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(self.callba } - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params - completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17467,12 +18966,12 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callb } - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params - completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17496,12 +18995,12 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callb } - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params - completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17525,12 +19024,12 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callb } - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params - completion:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17554,12 +19053,12 @@ new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(self.call } - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params - completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17583,9 +19082,10 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callb }); } -- (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -17595,16 +19095,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17614,27 +19118,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -17645,9 +19151,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNetworkCommissioningNetworksListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNetworkCommissioningNetworksListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -17657,16 +19163,20 @@ new MTRNetworkCommissioningNetworksListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17676,28 +19186,29 @@ new MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNetworkCommissioningNetworksListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -17708,9 +19219,10 @@ new MTRNetworkCommissioningNetworksListAttributeCallbackBridge( }); } -- (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -17720,17 +19232,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17740,28 +19256,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeScanMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -17772,9 +19289,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -17784,17 +19302,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17804,28 +19327,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeConnectMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -17836,9 +19360,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -17848,13 +19373,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -17863,7 +19388,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -17886,16 +19411,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17905,28 +19435,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -17937,10 +19468,11 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(self.callbackQueue, self.device, - completion, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; auto successFn @@ -17951,17 +19483,22 @@ new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCal }); } -- (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -17972,30 +19509,31 @@ new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCal chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLastNetworkingStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable( success); @@ -18008,9 +19546,10 @@ new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCal }); } -- (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18020,16 +19559,20 @@ new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18039,27 +19582,29 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLastNetworkIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18070,9 +19615,10 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelabl }); } -- (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18082,17 +19628,22 @@ new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18102,28 +19653,29 @@ new MTRNullableInt32sAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLastConnectErrorValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18134,9 +19686,10 @@ new MTRNullableInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18146,17 +19699,22 @@ new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18166,29 +19724,30 @@ new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscription chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18199,9 +19758,10 @@ new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18211,17 +19771,22 @@ new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18231,29 +19796,30 @@ new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionB chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18264,9 +19830,10 @@ new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18276,16 +19843,20 @@ new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18295,28 +19866,30 @@ new MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18327,9 +19900,10 @@ new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18339,16 +19913,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18358,27 +19936,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18389,9 +19968,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18401,16 +19981,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18420,28 +20005,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18456,7 +20042,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterDiagnosticLogs -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -18464,18 +20050,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params - completion:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18497,9 +20083,10 @@ new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(self.callbackQueu }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18509,17 +20096,22 @@ new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18529,29 +20121,30 @@ new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18562,9 +20155,10 @@ new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18574,17 +20168,22 @@ new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18594,29 +20193,30 @@ new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18627,9 +20227,10 @@ new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18639,16 +20240,20 @@ new MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18658,40 +20263,44 @@ new MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18701,16 +20310,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18720,27 +20333,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18751,9 +20365,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18763,16 +20378,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18782,28 +20402,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18818,7 +20439,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterGeneralDiagnostics -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -18826,20 +20447,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -18860,9 +20481,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -18872,16 +20494,21 @@ new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18891,29 +20518,30 @@ new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridg chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNetworkInterfacesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18924,9 +20552,10 @@ new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge( }); } -- (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRebootCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -18936,16 +20565,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -18955,27 +20588,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRebootCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -18986,9 +20621,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -18998,16 +20633,20 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19017,27 +20656,28 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUpTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19048,9 +20688,10 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -19060,17 +20701,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19080,28 +20726,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTotalOperationalHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19112,9 +20759,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBootReasonsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -19124,16 +20772,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeBootReasonsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19143,27 +20795,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBootReasonsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19174,9 +20828,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -19186,17 +20841,22 @@ new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19206,29 +20866,30 @@ new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBr chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveHardwareFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19239,9 +20900,10 @@ new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge( }); } -- (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -19251,16 +20913,21 @@ new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19270,29 +20937,30 @@ new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridg chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveRadioFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19303,9 +20971,10 @@ new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge( }); } -- (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -19315,17 +20984,22 @@ new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19335,29 +21009,30 @@ new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBri chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveNetworkFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19368,10 +21043,10 @@ new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( }); } -- (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -19381,17 +21056,22 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19401,28 +21081,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTestEventTriggersEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19433,9 +21114,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -19445,17 +21127,22 @@ new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19465,29 +21152,30 @@ new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBr chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19498,9 +21186,10 @@ new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -19510,17 +21199,22 @@ new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19530,29 +21224,30 @@ new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBri chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19563,9 +21258,10 @@ new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -19575,16 +21271,20 @@ new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19594,28 +21294,30 @@ new MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19626,9 +21328,10 @@ new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -19638,16 +21341,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19657,27 +21364,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19688,9 +21396,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -19700,16 +21409,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19719,28 +21433,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19755,7 +21470,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterSoftwareDiagnostics -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -19763,24 +21478,24 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)resetWatermarksWithCompletion:(MTRStatusCompletion)completion +- (void)resetWatermarksWithCompletionHandler:(StatusCompletion)completionHandler { - [self resetWatermarksWithParams:nil completion:completion]; + [self resetWatermarksWithParams:nil completionHandler:completionHandler]; } - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -19799,9 +21514,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -19811,16 +21527,20 @@ new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19830,28 +21550,30 @@ new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeThreadMetricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19862,9 +21584,10 @@ new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge( }); } -- (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -19874,16 +21597,21 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19893,28 +21621,29 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentHeapFreeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19925,9 +21654,10 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -19937,16 +21667,21 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -19956,28 +21691,29 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentHeapUsedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -19988,10 +21724,10 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -20001,17 +21737,22 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20021,28 +21762,29 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentHeapHighWatermarkWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20053,9 +21795,10 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -20065,17 +21808,22 @@ new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20085,29 +21833,30 @@ new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionB chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20118,9 +21867,10 @@ new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -20130,17 +21880,22 @@ new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20150,29 +21905,30 @@ new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBr chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20183,9 +21939,10 @@ new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -20195,16 +21952,20 @@ new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20214,28 +21975,30 @@ new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20246,9 +22009,10 @@ new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -20258,16 +22022,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20277,27 +22045,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20308,9 +22077,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -20320,16 +22090,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20339,28 +22114,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20375,7 +22151,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterThreadNetworkDiagnostics -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -20383,24 +22159,24 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion +- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler { - [self resetCountsWithParams:nil completion:completion]; + [self resetCountsWithParams:nil completionHandler:completionHandler]; } - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -20419,9 +22195,9 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChannelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -20431,16 +22207,20 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20450,27 +22230,28 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeChannelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20481,9 +22262,11 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRoutingRoleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -20493,16 +22276,20 @@ new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge }); } -- (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20512,28 +22299,30 @@ new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscr chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRoutingRoleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -20545,9 +22334,10 @@ new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge }); } -- (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNetworkNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -20557,16 +22347,20 @@ new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, self.device }); } -- (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20576,27 +22370,29 @@ new MTRNullableCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNetworkNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20607,9 +22403,9 @@ new MTRNullableCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable }); } -- (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -20619,16 +22415,20 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20638,27 +22438,28 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePanIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20669,9 +22470,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeExtendedPanIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -20681,16 +22483,21 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20700,27 +22507,29 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeExtendedPanIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20731,9 +22540,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeshLocalPrefixWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -20743,16 +22553,21 @@ new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20762,27 +22577,29 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeshLocalPrefixWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20793,9 +22610,10 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelabl }); } -- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -20805,16 +22623,20 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20824,27 +22646,29 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20855,9 +22679,10 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeNeighborTableListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNeighborTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -20867,16 +22692,21 @@ new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeNeighborTableListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20886,29 +22716,30 @@ new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptio chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNeighborTableListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20919,9 +22750,10 @@ new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge( }); } -- (void)readAttributeRouteTableListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRouteTableListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -20931,16 +22763,21 @@ new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeRouteTableListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -20950,28 +22787,30 @@ new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBr chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRouteTableListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -20982,9 +22821,10 @@ new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge( }); } -- (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePartitionIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -20994,16 +22834,20 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21013,27 +22857,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePartitionIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21044,9 +22890,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWeightingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21056,16 +22903,20 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21075,27 +22926,28 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWeightingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21106,9 +22958,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDataVersionWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21118,16 +22971,20 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21137,27 +22994,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDataVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21168,9 +23027,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStableDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21180,16 +23040,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21199,28 +23064,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStableDataVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21231,9 +23097,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLeaderRouterIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21243,16 +23110,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21262,27 +23134,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLeaderRouterIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21293,9 +23167,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDetachedRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21305,16 +23180,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21324,28 +23204,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDetachedRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21356,9 +23237,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChildRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21368,16 +23250,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21387,27 +23274,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeChildRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21418,9 +23307,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRouterRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21430,16 +23320,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21449,28 +23344,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRouterRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21481,9 +23377,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLeaderRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21493,16 +23390,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21512,28 +23414,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLeaderRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21544,9 +23447,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21556,17 +23460,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21576,28 +23484,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttachAttemptCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21608,10 +23517,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePartitionIdChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21621,17 +23530,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21641,28 +23555,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePartitionIdChangeCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21673,10 +23588,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21686,18 +23601,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21707,29 +23626,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBetterPartitionAttachAttemptCountWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21740,9 +23659,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeParentChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21752,16 +23672,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21771,28 +23696,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeParentChangeCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21803,9 +23729,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxTotalCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -21815,16 +23742,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21834,27 +23765,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxTotalCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21865,9 +23798,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21877,16 +23811,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21896,27 +23835,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxUnicastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21927,9 +23868,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -21939,16 +23881,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -21958,28 +23905,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxBroadcastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -21990,9 +23938,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22002,17 +23951,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22022,28 +23976,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxAckRequestedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22054,9 +24009,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxAckedCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22066,16 +24022,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22085,27 +24045,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxAckedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22116,9 +24078,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxNoAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22128,17 +24091,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22148,28 +24116,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxNoAckRequestedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22180,9 +24149,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDataCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22192,16 +24162,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22211,27 +24185,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxDataCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22242,9 +24218,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22254,16 +24231,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22273,28 +24255,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxDataPollCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22305,9 +24288,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxBeaconCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -22317,16 +24301,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22336,27 +24325,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxBeaconCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22367,9 +24358,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -22379,17 +24371,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22399,28 +24396,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxBeaconRequestCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22431,9 +24429,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxOtherCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -22443,16 +24442,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22462,27 +24465,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22493,9 +24498,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxRetryCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22505,16 +24511,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22524,27 +24534,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxRetryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22555,10 +24567,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22568,17 +24580,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22588,28 +24605,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxDirectMaxRetryExpiryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22620,10 +24638,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22633,18 +24651,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22654,28 +24676,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxIndirectMaxRetryExpiryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22686,9 +24709,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrCcaCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22698,16 +24722,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22717,27 +24746,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxErrCcaCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22748,9 +24779,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrAbortCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22760,16 +24792,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22779,28 +24816,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxErrAbortCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22811,9 +24849,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrBusyChannelCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22823,17 +24862,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22843,28 +24887,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxErrBusyChannelCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22875,9 +24920,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxTotalCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22887,16 +24933,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22906,27 +24956,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxTotalCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22937,9 +24989,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -22949,16 +25002,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -22968,27 +25026,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxUnicastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -22999,9 +25059,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23011,16 +25072,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23030,28 +25096,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxBroadcastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23062,9 +25129,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDataCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23074,16 +25142,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23093,27 +25165,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxDataCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23124,9 +25198,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23136,16 +25211,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23155,28 +25235,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxDataPollCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23187,9 +25268,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxBeaconCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23199,16 +25281,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23218,27 +25305,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxBeaconCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23249,9 +25338,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23261,17 +25351,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23281,28 +25376,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxBeaconRequestCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23313,9 +25409,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxOtherCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23325,16 +25422,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23344,27 +25445,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23375,10 +25478,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxAddressFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23388,17 +25491,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23408,28 +25516,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxAddressFilteredCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23440,10 +25549,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23453,17 +25562,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23473,28 +25587,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxDestAddrFilteredCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23505,9 +25620,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDuplicatedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23517,16 +25633,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23536,28 +25657,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxDuplicatedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23568,9 +25690,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrNoFrameCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23580,16 +25703,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23599,28 +25727,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxErrNoFrameCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23631,10 +25760,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23644,17 +25773,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23664,28 +25798,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxErrUnknownNeighborCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23696,10 +25831,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23709,17 +25844,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23729,28 +25869,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxErrInvalidSrcAddrCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23761,9 +25902,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrSecCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23773,16 +25915,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23792,27 +25939,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxErrSecCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23823,9 +25972,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrFcsCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23835,16 +25985,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23854,27 +26009,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxErrFcsCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23885,9 +26042,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23897,16 +26055,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23916,28 +26079,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRxErrOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -23948,9 +26112,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -23960,16 +26125,21 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -23979,28 +26149,29 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -24011,9 +26182,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePendingTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -24023,16 +26195,21 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24042,28 +26219,29 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePendingTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -24074,9 +26252,9 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -24086,16 +26264,20 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24105,27 +26287,28 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -24136,10 +26319,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeSecurityPolicyWithCompletionHandler: + (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -24149,17 +26332,22 @@ new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24169,30 +26357,30 @@ new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscription chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSecurityPolicyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -24203,9 +26391,10 @@ new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge( }); } -- (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChannelPage0MaskWithCompletionHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -24215,16 +26404,21 @@ new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24234,27 +26428,29 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeChannelPage0MaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -24265,12 +26461,12 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelabl }); } -- (void)readAttributeOperationalDatasetComponentsWithCompletion: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalDatasetComponentsWithCompletionHandler: + (void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge(self.callbackQueue, self.device, - completion, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; auto successFn @@ -24282,19 +26478,24 @@ new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallba } - (void) - subscribeAttributeOperationalDatasetComponentsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))reportHandler + 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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24305,33 +26506,34 @@ new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallba chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } + (void) - readAttributeOperationalDatasetComponentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))completion + readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable( success); @@ -24344,10 +26546,11 @@ new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallba }); } -- (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; auto successFn @@ -24358,17 +26561,22 @@ new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridg }); } -- (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24379,30 +26587,31 @@ new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubsc chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveNetworkFaultsListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -24414,9 +26623,11 @@ new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridg }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -24426,17 +26637,22 @@ new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(s }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24446,29 +26662,30 @@ new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscrip chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -24480,9 +26697,11 @@ new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -24492,17 +26711,22 @@ new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(se }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24512,29 +26736,30 @@ new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscript chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -24546,9 +26771,10 @@ new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -24558,16 +26784,20 @@ new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24577,28 +26807,30 @@ new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBri chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -24609,9 +26841,10 @@ new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -24621,16 +26854,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24640,27 +26877,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -24671,9 +26909,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -24683,16 +26922,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24702,28 +26946,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -24738,7 +26983,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterWiFiNetworkDiagnostics -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -24746,24 +26991,24 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion +- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler { - [self resetCountsWithParams:nil completion:completion]; + [self resetCountsWithParams:nil completionHandler:completionHandler]; } - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -24782,9 +27027,9 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeBssidWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -24794,16 +27039,20 @@ new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)subscribeAttributeBssidWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24813,27 +27062,28 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBssidWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -24844,9 +27094,11 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelabl }); } -- (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSecurityTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -24856,16 +27108,20 @@ new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge( }); } -- (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24875,28 +27131,30 @@ new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscri chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSecurityTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -24908,9 +27166,11 @@ new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge( }); } -- (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiFiVersionWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; auto successFn @@ -24921,16 +27181,20 @@ new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBrid }); } -- (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -24941,29 +27205,31 @@ new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubs chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWiFiVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -24975,9 +27241,10 @@ new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBrid }); } -- (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChannelNumberWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -24987,16 +27254,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25006,27 +27278,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeChannelNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25037,9 +27311,9 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeRssiWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25049,16 +27323,20 @@ new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeRssiWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25068,27 +27346,28 @@ new MTRNullableInt8sAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRssiWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25099,9 +27378,10 @@ new MTRNullableInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBeaconLostCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25111,16 +27391,21 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25130,28 +27415,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBeaconLostCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25162,9 +27448,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBeaconRxCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25174,16 +27461,21 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25193,27 +27485,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBeaconRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25224,10 +27518,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePacketMulticastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25237,17 +27531,22 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25257,28 +27556,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePacketMulticastRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25289,10 +27589,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePacketMulticastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25302,17 +27602,22 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25322,28 +27627,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePacketMulticastTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25354,9 +27660,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePacketUnicastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25366,17 +27673,22 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25386,28 +27698,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePacketUnicastRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25418,9 +27731,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePacketUnicastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25430,17 +27744,22 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25450,28 +27769,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePacketUnicastTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25482,9 +27802,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentMaxRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25494,16 +27815,21 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25513,27 +27839,29 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentMaxRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25544,9 +27872,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25556,16 +27885,20 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25575,27 +27908,29 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25606,9 +27941,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25618,17 +27954,22 @@ new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(sel }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25638,29 +27979,30 @@ new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscripti chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25671,9 +28013,10 @@ new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25683,17 +28026,22 @@ new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25703,29 +28051,30 @@ new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptio chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25736,9 +28085,10 @@ new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -25748,16 +28098,20 @@ new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25767,28 +28121,30 @@ new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridg chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25799,9 +28155,10 @@ new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25811,16 +28168,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25830,27 +28191,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25861,9 +28223,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -25873,16 +28236,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -25892,28 +28260,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -25928,7 +28297,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterEthernetNetworkDiagnostics -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -25936,24 +28305,24 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion +- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler { - [self resetCountsWithParams:nil completion:completion]; + [self resetCountsWithParams:nil completionHandler:completionHandler]; } - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -25972,9 +28341,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; auto successFn @@ -25985,16 +28355,20 @@ new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBrid }); } -- (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26005,29 +28379,30 @@ new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubs chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePHYRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -26039,9 +28414,10 @@ new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBrid }); } -- (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -26051,16 +28427,20 @@ new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, c }); } -- (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26070,27 +28450,28 @@ new MTRNullableBooleanAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFullDuplexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26101,9 +28482,10 @@ new MTRNullableBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * }); } -- (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -26113,16 +28495,21 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26132,27 +28519,29 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePacketRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26163,9 +28552,10 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -26175,16 +28565,21 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26194,27 +28589,29 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePacketTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26225,9 +28622,10 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -26237,16 +28635,20 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26256,27 +28658,28 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTxErrCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26287,9 +28690,10 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -26299,16 +28703,21 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26318,27 +28727,29 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCollisionCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26349,9 +28760,10 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -26361,16 +28773,20 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26380,27 +28796,29 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26411,9 +28829,10 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -26423,16 +28842,21 @@ new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, c }); } -- (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26442,27 +28866,29 @@ new MTRNullableBooleanAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCarrierDetectWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26473,9 +28899,10 @@ new MTRNullableBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * }); } -- (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -26485,16 +28912,21 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26504,27 +28936,29 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTimeSinceResetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26535,9 +28969,11 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -26547,17 +28983,22 @@ new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26567,29 +29008,30 @@ new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscr chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -26601,9 +29043,11 @@ new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -26613,17 +29057,22 @@ new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26633,29 +29082,30 @@ new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscri chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -26667,9 +29117,10 @@ new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -26679,16 +29130,20 @@ new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26698,28 +29153,30 @@ new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionB chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26730,9 +29187,10 @@ new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -26742,16 +29200,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26761,27 +29223,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26792,9 +29255,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -26804,16 +29268,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26823,28 +29292,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26859,7 +29329,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterBridgedDeviceBasic -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -26867,14 +29337,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -26884,16 +29355,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26903,27 +29378,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26934,9 +29410,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -26946,16 +29423,20 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completi }); } -- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -26965,27 +29446,28 @@ new MTRVendorIdAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRVendorIdAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -26996,9 +29478,10 @@ new MTRVendorIdAttributeCallbackBridge(queue, completion, ^(Cancelable * success }); } -- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27008,16 +29491,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27027,27 +29514,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27058,9 +29547,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27070,13 +29560,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -27085,7 +29575,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -27108,16 +29598,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27127,27 +29621,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27158,9 +29653,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27170,16 +29666,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27189,28 +29690,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27221,9 +29723,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27233,17 +29736,22 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27253,28 +29761,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27285,9 +29794,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27297,16 +29807,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27316,28 +29831,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27348,9 +29864,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27360,17 +29877,22 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27380,28 +29902,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27412,9 +29935,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27424,16 +29948,21 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27443,28 +29972,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27475,9 +30005,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePartNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27487,16 +30018,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27506,27 +30041,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27537,9 +30073,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductURLWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27549,16 +30086,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27568,27 +30109,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27599,9 +30141,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27611,16 +30154,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27630,27 +30177,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27661,9 +30210,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27673,16 +30223,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27692,27 +30246,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27723,9 +30279,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReachableWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27735,16 +30292,20 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27754,27 +30315,28 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27785,9 +30347,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27797,16 +30360,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27816,27 +30383,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27847,9 +30415,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27859,17 +30428,22 @@ new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27879,29 +30453,30 @@ new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBr chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27912,9 +30487,10 @@ new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27924,17 +30500,22 @@ new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -27944,29 +30525,30 @@ new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBri chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -27977,9 +30559,10 @@ new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -27989,16 +30572,20 @@ new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28008,28 +30595,30 @@ new MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -28040,9 +30629,10 @@ new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -28052,16 +30642,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28071,27 +30665,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -28102,9 +30697,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -28114,16 +30710,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28133,28 +30734,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -28169,7 +30771,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterSwitch -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -28177,14 +30779,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -28194,16 +30797,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28213,28 +30821,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfPositionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -28245,9 +30854,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -28257,16 +30867,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28276,28 +30891,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -28308,9 +30924,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -28320,16 +30937,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28339,27 +30961,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMultiPressMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -28370,9 +30994,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRSwitchGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -28382,17 +31007,22 @@ new MTRSwitchGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28402,41 +31032,44 @@ new MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRSwitchGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRSwitchAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -28446,17 +31079,22 @@ new MTRSwitchAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28466,41 +31104,44 @@ new MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRSwitchAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRSwitchAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -28510,16 +31151,20 @@ new MTRSwitchAttributeListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28529,27 +31174,29 @@ new MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRSwitchAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -28560,9 +31207,10 @@ new MTRSwitchAttributeListListAttributeCallbackBridge(queue, completion, ^(Cance }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -28572,16 +31220,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28591,27 +31243,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -28622,9 +31275,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -28634,16 +31288,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28653,28 +31312,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -28689,7 +31349,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterAdministratorCommissioning -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -28697,20 +31357,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -28738,14 +31398,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -28768,19 +31428,19 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)revokeCommissioningWithCompletion:(MTRStatusCompletion)completion +- (void)revokeCommissioningWithCompletionHandler:(StatusCompletion)completionHandler { - [self revokeCommissioningWithParams:nil completion:completion]; + [self revokeCommissioningWithParams:nil completionHandler:completionHandler]; } - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -28802,10 +31462,11 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWindowStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(self.callbackQueue, self.device, - completion, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; auto successFn @@ -28816,16 +31477,20 @@ new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallba }); } -- (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28836,29 +31501,31 @@ new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallba chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable( success); @@ -28871,9 +31538,10 @@ new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallba }); } -- (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -28883,16 +31551,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28902,28 +31575,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAdminFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -28934,9 +31608,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -28946,16 +31621,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -28965,27 +31645,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAdminVendorIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -28996,9 +31678,11 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -29008,17 +31692,22 @@ new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29028,29 +31717,30 @@ new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscr chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -29062,9 +31752,11 @@ new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -29074,17 +31766,22 @@ new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29094,29 +31791,30 @@ new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscri chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -29128,9 +31826,10 @@ new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -29140,16 +31839,20 @@ new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29159,28 +31862,30 @@ new MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionB chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -29191,9 +31896,10 @@ new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -29203,16 +31909,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29222,27 +31932,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -29253,9 +31964,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -29265,16 +31977,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29284,28 +32001,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -29320,7 +32038,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterOperationalCredentials -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -29328,18 +32046,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params - completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29359,12 +32077,12 @@ new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callb } - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params - completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29384,12 +32102,12 @@ new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self. } - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params - completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29413,12 +32131,12 @@ new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue } - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29446,12 +32164,12 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue } - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29475,12 +32193,12 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue } - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29500,12 +32218,12 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue } - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29525,14 +32243,14 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue } - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -29553,30 +32271,34 @@ new MTRCommandSuccessCallbackBridge( } - (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + 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, completion, + new MTROperationalCredentialsNOCsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(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.fabricFiltered); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29586,62 +32308,68 @@ new MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNOCsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROperationalCredentialsNOCsListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTROperationalCredentialsNOCsListAttributeCallbackBridge( + queue, completionHandler, ^(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 err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + 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, completion, + new MTROperationalCredentialsFabricsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OperationalCredentials::Attributes::Fabrics::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.fabricFiltered); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29651,28 +32379,29 @@ new MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsFabricsListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -29683,9 +32412,10 @@ new MTROperationalCredentialsFabricsListAttributeCallbackBridge( }); } -- (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -29695,16 +32425,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29714,28 +32449,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSupportedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -29746,9 +32482,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -29758,17 +32495,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29778,28 +32520,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCommissionedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -29810,10 +32553,11 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -29823,17 +32567,22 @@ new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( }); } -- (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29843,29 +32592,30 @@ new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscri chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTrustedRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -29877,9 +32627,10 @@ new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( }); } -- (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -29889,17 +32640,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29909,28 +32664,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -29941,9 +32697,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -29953,17 +32710,22 @@ new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(sel }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -29973,29 +32735,30 @@ new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscripti chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -30006,9 +32769,10 @@ new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -30018,17 +32782,22 @@ new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30038,29 +32807,30 @@ new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptio chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -30071,9 +32841,10 @@ new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROperationalCredentialsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -30083,16 +32854,20 @@ new MTROperationalCredentialsAttributeListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30102,28 +32877,30 @@ new MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridg chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -30134,9 +32911,10 @@ new MTROperationalCredentialsAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -30146,16 +32924,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30165,27 +32947,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -30196,9 +32979,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -30208,16 +32992,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30227,28 +33016,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -30263,7 +33053,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterGroupKeyManagement -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -30271,19 +33061,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completion:(MTRStatusCompletion)completion +- (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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -30343,12 +33134,12 @@ new MTRCommandSuccessCallbackBridge( } - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params - completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -30367,14 +33158,15 @@ new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQu }); } -- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params completion:(MTRStatusCompletion)completion +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -30395,12 +33187,12 @@ new MTRCommandSuccessCallbackBridge( } - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params - completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completion + 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, completion, + new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -30441,27 +33233,27 @@ new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(self. } - (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + 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, completion, + 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.fabricFiltered); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -30470,7 +33262,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -30516,16 +33308,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30535,28 +33331,29 @@ new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGroupKeyMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -30568,30 +33365,34 @@ new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge( } - (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + 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, completion, + new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GroupKeyManagement::Attributes::GroupTable::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.fabricFiltered); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30601,28 +33402,29 @@ new MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGroupTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -30633,9 +33435,10 @@ new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge( }); } -- (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -30645,17 +33448,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30665,28 +33472,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxGroupsPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -30697,9 +33505,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -30709,17 +33518,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30729,28 +33543,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxGroupKeysPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -30761,9 +33576,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -30773,17 +33589,22 @@ new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30793,29 +33614,30 @@ new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBr chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -30826,9 +33648,10 @@ new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -30838,17 +33661,22 @@ new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30858,29 +33686,30 @@ new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBri chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -30891,9 +33720,10 @@ new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -30903,16 +33733,20 @@ new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30922,28 +33756,30 @@ new MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -30954,9 +33790,10 @@ new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -30966,16 +33803,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -30985,27 +33826,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -31016,9 +33858,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -31028,16 +33871,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31047,28 +33895,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -31083,7 +33932,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterFixedLabel -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -31091,14 +33940,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLabelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFixedLabelLabelListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRFixedLabelLabelListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -31108,16 +33958,20 @@ new MTRFixedLabelLabelListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31127,27 +33981,28 @@ new MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge( chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFixedLabelLabelListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRFixedLabelLabelListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -31158,9 +34013,10 @@ new MTRFixedLabelLabelListListAttributeCallbackBridge(queue, completion, ^(Cance }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -31170,17 +34026,22 @@ new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31190,29 +34051,30 @@ new MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -31223,9 +34085,10 @@ new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -31235,17 +34098,22 @@ new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31255,29 +34123,30 @@ new MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -31288,9 +34157,10 @@ new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFixedLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRFixedLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -31300,16 +34170,20 @@ new MTRFixedLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31319,40 +34193,44 @@ new MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFixedLabelAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRFixedLabelAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + 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); + 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)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -31362,16 +34240,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31381,27 +34263,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -31412,9 +34295,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -31424,16 +34308,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31443,28 +34332,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -31479,7 +34369,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterUserLabel -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -31487,14 +34377,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLabelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUserLabelLabelListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -31504,13 +34395,13 @@ new MTRUserLabelLabelListListAttributeCallbackBridge(self.callbackQueue, self.de }); } -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLabelListWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLabelListWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -31519,7 +34410,7 @@ - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -31564,16 +34455,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31583,27 +34478,28 @@ new MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge( chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUserLabelLabelListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -31614,9 +34510,10 @@ new MTRUserLabelLabelListListAttributeCallbackBridge(queue, completion, ^(Cancel }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -31626,17 +34523,22 @@ new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31646,29 +34548,30 @@ new MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -31679,9 +34582,10 @@ new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -31691,17 +34595,22 @@ new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31711,29 +34620,30 @@ new MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -31744,9 +34654,10 @@ new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUserLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -31756,16 +34667,20 @@ new MTRUserLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, sel }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31775,40 +34690,44 @@ new MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUserLabelAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -31818,16 +34737,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31837,27 +34760,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -31868,9 +34792,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -31880,16 +34805,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31899,28 +34829,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -31935,7 +34866,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterBooleanState -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -31943,14 +34874,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStateValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -31960,16 +34892,20 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -31979,27 +34915,28 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStateValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -32010,9 +34947,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -32022,17 +34960,22 @@ new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32042,29 +34985,30 @@ new MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -32075,9 +35019,10 @@ new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -32087,17 +35032,22 @@ new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32107,29 +35057,30 @@ new MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -32140,9 +35091,10 @@ new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanStateAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -32152,16 +35104,20 @@ new MTRBooleanStateAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32171,40 +35127,44 @@ new MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanStateAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -32214,16 +35174,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32233,27 +35197,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -32264,9 +35229,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -32276,16 +35242,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32295,28 +35266,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -32331,7 +35303,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterModeSelect -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -32339,19 +35311,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion +- (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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -32371,9 +35344,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -32383,16 +35357,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32402,27 +35380,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -32433,9 +35413,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -32445,16 +35426,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32464,28 +35450,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStandardNamespaceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -32496,9 +35483,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRModeSelectSupportedModesListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRModeSelectSupportedModesListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -32508,16 +35496,21 @@ new MTRModeSelectSupportedModesListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32527,40 +35520,44 @@ new MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRModeSelectSupportedModesListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -32570,16 +35567,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32589,27 +35590,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -32620,9 +35623,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -32632,13 +35636,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -32647,7 +35651,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -32675,16 +35679,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32694,27 +35702,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -32725,9 +35735,9 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -32737,13 +35747,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -32752,7 +35762,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -32780,16 +35790,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32799,27 +35813,28 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -32830,9 +35845,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -32842,17 +35858,22 @@ new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32862,29 +35883,30 @@ new MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -32895,9 +35917,10 @@ new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -32907,17 +35930,22 @@ new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32927,29 +35955,30 @@ new MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -32960,9 +35989,10 @@ new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRModeSelectAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRModeSelectAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -32972,16 +36002,20 @@ new MTRModeSelectAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -32991,40 +36025,44 @@ new MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRModeSelectAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -33034,16 +36072,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33053,27 +36095,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -33084,9 +36127,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -33096,16 +36140,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33115,28 +36164,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -33151,7 +36201,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterDoorLock -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -33159,19 +36209,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -33199,14 +36250,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -33234,14 +36286,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params completion:(MTRStatusCompletion)completion +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -33268,14 +36321,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params completion:(MTRStatusCompletion)completion +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -33302,12 +36356,12 @@ new MTRCommandSuccessCallbackBridge( } - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params - completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33328,14 +36382,14 @@ new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueu } - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -33356,14 +36410,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params completion:(MTRStatusCompletion)completion +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -33387,12 +36442,12 @@ new MTRCommandSuccessCallbackBridge( } - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params - completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33413,14 +36468,14 @@ new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueu } - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -33441,14 +36496,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params completion:(MTRStatusCompletion)completion +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -33473,12 +36529,12 @@ new MTRCommandSuccessCallbackBridge( } - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params - completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion + 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, completion, + new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33498,14 +36554,14 @@ new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(self.callbackQueu } - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -33525,14 +36581,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:(MTRStatusCompletion)completion +- (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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -33590,11 +36646,12 @@ new MTRCommandSuccessCallbackBridge( } - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params - completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion + 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, completion, + new MTRDoorLockClusterGetUserResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33613,14 +36670,14 @@ new MTRDoorLockClusterGetUserResponseCallbackBridge(self.callbackQueue, self.dev }); } -- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completion:(MTRStatusCompletion)completion +- (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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -33644,12 +36701,12 @@ new MTRCommandSuccessCallbackBridge( } - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params - completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completion + 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, completion, + new MTRDoorLockClusterSetCredentialResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33696,12 +36753,12 @@ new MTRDoorLockClusterSetCredentialResponseCallbackBridge(self.callbackQueue, se } - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params - completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completion + 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, completion, + new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33722,14 +36779,15 @@ new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(self.callbackQue }); } -- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params completion:(MTRStatusCompletion)completion +- (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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -33759,9 +36817,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLockStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -33771,16 +36830,20 @@ new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33790,28 +36853,29 @@ new MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -33822,9 +36886,10 @@ new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge( }); } -- (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLockTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -33834,16 +36899,20 @@ new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33853,40 +36922,43 @@ new MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLockTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActuatorEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -33896,16 +36968,21 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33915,28 +36992,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActuatorEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -33947,9 +37025,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDoorStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -33959,16 +37038,20 @@ new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -33978,28 +37061,29 @@ new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDoorStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34010,9 +37094,10 @@ new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge( }); } -- (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDoorOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -34022,13 +37107,13 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -34037,7 +37122,7 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -34060,16 +37145,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34079,27 +37169,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDoorOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34110,9 +37202,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDoorClosedEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -34122,13 +37215,13 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -34137,7 +37230,7 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -34160,16 +37253,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34179,28 +37277,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDoorClosedEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34211,9 +37310,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOpenPeriodWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -34223,13 +37323,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -34238,7 +37338,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -34261,16 +37361,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34280,27 +37384,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34311,10 +37416,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -34324,17 +37429,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34344,28 +37454,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34376,10 +37487,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -34389,17 +37500,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34409,28 +37525,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfPINUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34441,10 +37558,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -34454,17 +37571,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34474,28 +37596,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34506,10 +37629,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -34519,18 +37642,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34540,29 +37667,30 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34573,10 +37701,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -34586,18 +37714,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34607,29 +37739,30 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34640,10 +37773,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -34653,18 +37786,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34674,29 +37811,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34707,9 +37844,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -34719,16 +37857,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34738,28 +37881,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34770,9 +37914,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -34782,16 +37927,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34801,28 +37951,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34833,9 +37984,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -34845,16 +37997,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34864,28 +38021,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34896,9 +38054,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -34908,16 +38067,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34927,28 +38091,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -34959,10 +38124,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCredentialRulesSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -34972,17 +38137,22 @@ new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -34992,42 +38162,44 @@ new MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCredentialRulesSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge( + queue, completionHandler, ^(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 err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -35037,18 +38209,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35058,29 +38234,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -35091,9 +38267,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLanguageWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::Language::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -35103,13 +38280,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -35118,7 +38295,7 @@ - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -35141,16 +38318,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35160,27 +38341,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -35191,9 +38373,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLEDSettingsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -35203,13 +38386,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -35218,7 +38401,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -35241,16 +38424,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35260,27 +38447,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLEDSettingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -35291,9 +38480,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -35303,13 +38493,13 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -35318,7 +38508,7 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -35341,16 +38531,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35360,27 +38555,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAutoRelockTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -35391,9 +38588,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoundVolumeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -35403,13 +38601,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -35418,7 +38616,7 @@ - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -35441,16 +38639,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35460,27 +38662,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSoundVolumeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -35491,9 +38695,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperatingModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -35503,13 +38708,13 @@ new MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(self.callbackQueue, }); } -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -35518,7 +38723,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -35541,16 +38746,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35560,41 +38770,44 @@ new MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -35604,17 +38817,22 @@ new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35624,42 +38842,44 @@ new MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + 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); + 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)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -35669,18 +38889,22 @@ new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35690,29 +38914,30 @@ new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -35723,10 +38948,10 @@ new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge( }); } -- (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnableLocalProgrammingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -35736,13 +38961,14 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -35751,7 +38977,7 @@ - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -35774,17 +39000,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35794,28 +39025,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -35826,9 +39058,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -35838,13 +39071,14 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -35853,7 +39087,7 @@ - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -35876,17 +39110,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35896,28 +39135,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -35928,9 +39168,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnableInsideStatusLEDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -35940,13 +39181,14 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -35955,7 +39197,7 @@ - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -35978,17 +39220,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -35998,28 +39245,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEnableInsideStatusLEDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -36030,10 +39278,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -36043,13 +39291,16 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -36058,7 +39309,7 @@ - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -36081,17 +39332,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36101,28 +39357,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -36133,10 +39390,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -36146,13 +39403,16 @@ new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(self.callbackQueu }); } -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -36161,7 +39421,7 @@ - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)val new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -36184,17 +39444,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36204,29 +39469,30 @@ new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLocalProgrammingFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -36237,9 +39503,10 @@ new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge( }); } -- (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -36249,13 +39516,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -36264,7 +39531,7 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -36287,17 +39554,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36307,28 +39579,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWrongCodeEntryLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -36339,10 +39612,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -36352,13 +39625,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -36367,7 +39643,7 @@ - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -36390,18 +39666,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36411,28 +39691,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -36443,9 +39724,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSendPINOverTheAirWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -36455,13 +39737,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -36470,7 +39752,7 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -36493,16 +39775,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36512,28 +39799,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -36544,10 +39832,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -36557,13 +39845,16 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -36572,7 +39863,7 @@ - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -36595,18 +39886,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36616,28 +39911,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -36648,9 +39944,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeExpiringUserTimeoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -36660,13 +39957,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -36675,7 +39972,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -36698,17 +39995,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36718,28 +40020,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -36750,9 +40053,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -36762,17 +40066,22 @@ new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36782,29 +40091,30 @@ new MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -36815,9 +40125,10 @@ new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -36827,17 +40138,22 @@ new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36847,41 +40163,44 @@ new MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -36891,16 +40210,20 @@ new MTRDoorLockAttributeListListAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36910,40 +40233,44 @@ new MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -36953,16 +40280,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -36972,27 +40303,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -37003,9 +40335,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -37015,16 +40348,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37034,28 +40372,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -37070,7 +40409,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterWindowCovering -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -37078,23 +40417,24 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)upOrOpenWithCompletion:(MTRStatusCompletion)completion +- (void)upOrOpenWithCompletionHandler:(StatusCompletion)completionHandler { - [self upOrOpenWithParams:nil completion:completion]; + [self upOrOpenWithParams:nil completionHandler:completionHandler]; } -- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -37113,19 +40453,19 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)downOrCloseWithCompletion:(MTRStatusCompletion)completion +- (void)downOrCloseWithCompletionHandler:(StatusCompletion)completionHandler { - [self downOrCloseWithParams:nil completion:completion]; + [self downOrCloseWithParams:nil completionHandler:completionHandler]; } - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -37144,18 +40484,19 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stopMotionWithCompletion:(MTRStatusCompletion)completion +- (void)stopMotionWithCompletionHandler:(StatusCompletion)completionHandler { - [self stopMotionWithParams:nil completion:completion]; + [self stopMotionWithParams:nil completionHandler:completionHandler]; } -- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -37174,14 +40515,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params completion:(MTRStatusCompletion)completion +- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -37202,14 +40544,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -37229,14 +40571,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params completion:(MTRStatusCompletion)completion +- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -37257,14 +40600,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -37284,9 +40627,9 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWindowCoveringClusterTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRWindowCoveringClusterTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -37296,16 +40639,20 @@ new MTRWindowCoveringClusterTypeAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37315,41 +40662,43 @@ new MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWindowCoveringClusterTypeAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRWindowCoveringClusterTypeAttributeCallbackBridge( + queue, completionHandler, ^(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 err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePhysicalClosedLimitLiftWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -37359,17 +40708,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37379,28 +40733,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePhysicalClosedLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -37411,10 +40766,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePhysicalClosedLimitTiltWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -37424,17 +40779,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37444,28 +40804,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePhysicalClosedLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -37476,9 +40837,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -37488,17 +40850,22 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37508,28 +40875,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentPositionLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -37540,9 +40908,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -37552,17 +40921,22 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37572,28 +40946,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentPositionTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -37604,10 +40979,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNumberOfActuationsLiftWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -37617,17 +40992,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37637,28 +41017,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfActuationsLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -37669,10 +41050,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeNumberOfActuationsTiltWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -37682,17 +41063,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37702,28 +41088,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfActuationsTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -37734,9 +41121,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeConfigStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWindowCoveringConfigStatusAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -37746,16 +41134,20 @@ new MTRWindowCoveringConfigStatusAttributeCallbackBridge(self.callbackQueue, sel }); } -- (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37765,41 +41157,44 @@ new MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeConfigStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWindowCoveringConfigStatusAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCurrentPositionLiftPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -37809,18 +41204,22 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37830,28 +41229,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentPositionLiftPercentageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -37862,10 +41262,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeCurrentPositionTiltPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -37875,18 +41275,22 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37896,28 +41300,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentPositionTiltPercentageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -37928,9 +41333,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRWindowCoveringOperationalStatusAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRWindowCoveringOperationalStatusAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -37940,16 +41346,21 @@ new MTRWindowCoveringOperationalStatusAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -37959,42 +41370,44 @@ new MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOperationalStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWindowCoveringOperationalStatusAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRWindowCoveringOperationalStatusAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + 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); + 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)readAttributeTargetPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -38004,18 +41417,22 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38025,29 +41442,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTargetPositionLiftPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38058,10 +41475,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeTargetPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -38071,18 +41488,22 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38092,29 +41513,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTargetPositionTiltPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38125,9 +41546,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEndProductTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -38137,16 +41559,21 @@ new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38156,28 +41583,30 @@ new MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEndProductTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38188,10 +41617,10 @@ new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge( }); } -- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -38201,18 +41630,22 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38222,29 +41655,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentPositionLiftPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38255,10 +41688,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -38268,18 +41701,22 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38289,29 +41726,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentPositionTiltPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38322,10 +41759,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeInstalledOpenLimitLiftWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -38335,17 +41772,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38355,28 +41797,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInstalledOpenLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38387,10 +41830,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInstalledClosedLimitLiftWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -38400,17 +41843,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38420,28 +41868,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInstalledClosedLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38452,10 +41901,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInstalledOpenLimitTiltWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -38465,17 +41914,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38485,28 +41939,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInstalledOpenLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38517,10 +41972,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInstalledClosedLimitTiltWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -38530,17 +41985,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38550,28 +42010,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInstalledClosedLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38582,9 +42043,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWindowCoveringModeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRWindowCoveringModeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -38594,13 +42055,13 @@ new MTRWindowCoveringModeAttributeCallbackBridge(self.callbackQueue, self.device }); } -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -38609,7 +42070,7 @@ - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -38632,16 +42093,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38651,27 +42116,28 @@ new MTRWindowCoveringModeAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWindowCoveringModeAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38682,9 +42148,10 @@ new MTRWindowCoveringModeAttributeCallbackBridge(queue, completion, ^(Cancelable }); } -- (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSafetyStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWindowCoveringSafetyStatusAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRWindowCoveringSafetyStatusAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -38694,16 +42161,20 @@ new MTRWindowCoveringSafetyStatusAttributeCallbackBridge(self.callbackQueue, sel }); } -- (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38713,40 +42184,44 @@ new MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWindowCoveringSafetyStatusAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRWindowCoveringSafetyStatusAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + 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); + 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)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -38756,17 +42231,22 @@ new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38776,29 +42256,30 @@ new MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38809,9 +42290,10 @@ new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -38821,17 +42303,22 @@ new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38841,29 +42328,30 @@ new MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38874,9 +42362,10 @@ new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWindowCoveringAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -38886,16 +42375,20 @@ new MTRWindowCoveringAttributeListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38905,40 +42398,44 @@ new MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWindowCoveringAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -38948,16 +42445,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -38967,27 +42468,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -38998,9 +42500,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -39010,16 +42513,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39029,28 +42537,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -39065,7 +42574,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterBarrierControl -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -39073,20 +42582,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -39106,19 +42615,19 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion +- (void)barrierControlStopWithCompletionHandler:(StatusCompletion)completionHandler { - [self barrierControlStopWithParams:nil completion:completion]; + [self barrierControlStopWithParams:nil completionHandler:completionHandler]; } - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -39137,9 +42646,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierMovingStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -39149,17 +42659,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39169,28 +42683,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBarrierMovingStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -39201,9 +42716,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -39213,17 +42729,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39233,28 +42754,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBarrierSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -39265,9 +42787,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -39277,17 +42800,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39297,28 +42825,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBarrierCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -39329,9 +42858,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -39341,13 +42871,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -39356,7 +42886,7 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -39379,16 +42909,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39398,28 +42933,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBarrierOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -39430,9 +42966,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -39442,13 +42979,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -39457,7 +42994,7 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -39480,17 +43017,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39500,28 +43041,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBarrierCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -39532,10 +43074,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -39545,13 +43087,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -39560,7 +43105,7 @@ - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)val new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -39583,17 +43128,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39603,28 +43153,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBarrierCommandOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -39635,10 +43186,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -39648,13 +43199,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -39663,7 +43217,7 @@ - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)va new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -39686,17 +43240,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39706,28 +43265,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBarrierCommandCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -39738,9 +43298,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -39750,13 +43311,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -39765,7 +43326,7 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -39788,16 +43349,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39807,28 +43373,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBarrierOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -39839,9 +43406,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -39851,13 +43419,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -39866,7 +43434,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -39889,17 +43457,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39909,28 +43481,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBarrierClosePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -39941,9 +43514,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -39953,16 +43527,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -39972,28 +43551,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBarrierPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40004,9 +43584,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -40016,17 +43597,22 @@ new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40036,29 +43622,30 @@ new MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40069,9 +43656,10 @@ new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -40081,17 +43669,22 @@ new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40101,29 +43694,30 @@ new MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40134,9 +43728,10 @@ new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBarrierControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -40146,16 +43741,20 @@ new MTRBarrierControlAttributeListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40165,40 +43764,44 @@ new MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBarrierControlAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -40208,16 +43811,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40227,27 +43834,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40258,9 +43866,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -40270,16 +43879,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40289,28 +43903,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40325,7 +43940,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterPumpConfigurationAndControl -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -40333,14 +43948,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -40350,16 +43966,20 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40369,27 +43989,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40400,9 +44022,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -40412,16 +44035,20 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40431,27 +44058,28 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40462,9 +44090,9 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -40474,16 +44102,20 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40493,27 +44125,28 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40524,9 +44157,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -40536,16 +44170,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40555,28 +44194,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40587,9 +44227,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -40599,16 +44240,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40618,28 +44264,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40650,9 +44297,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -40662,16 +44310,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40681,28 +44334,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40713,9 +44367,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -40725,16 +44380,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40744,28 +44404,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40776,9 +44437,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -40788,16 +44450,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40807,27 +44474,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40838,9 +44507,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -40850,16 +44520,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40869,27 +44544,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40900,9 +44577,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -40912,16 +44590,20 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40931,27 +44613,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -40962,9 +44646,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -40974,16 +44659,20 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -40993,27 +44682,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -41024,9 +44715,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -41036,16 +44728,20 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41055,27 +44751,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -41086,9 +44784,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -41098,16 +44797,20 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41117,27 +44820,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -41148,9 +44853,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePumpStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -41160,16 +44866,20 @@ new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41179,28 +44889,29 @@ new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePumpStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -41211,10 +44922,11 @@ new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge( }); } -- (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; auto successFn @@ -41225,17 +44937,22 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridg }); } -- (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41246,30 +44963,31 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubsc chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEffectiveOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -41281,9 +44999,11 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridg }); } -- (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -41293,17 +45013,22 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( }); } -- (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41313,29 +45038,30 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscri chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEffectiveControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -41347,9 +45073,10 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( }); } -- (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -41359,16 +45086,20 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41378,27 +45109,28 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -41409,9 +45141,9 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -41421,16 +45153,20 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41440,27 +45176,28 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -41471,9 +45208,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -41483,13 +45221,14 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -41498,7 +45237,7 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -41526,17 +45265,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41546,28 +45290,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLifetimeRunningHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -41578,9 +45323,9 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -41590,16 +45335,20 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41609,27 +45358,28 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -41640,10 +45390,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -41653,13 +45403,16 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -41668,7 +45421,7 @@ - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -41696,17 +45449,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41716,28 +45474,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLifetimeEnergyConsumedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -41748,9 +45507,11 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; auto successFn @@ -41761,13 +45522,13 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridg }); } -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -41776,7 +45537,7 @@ - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -41799,16 +45560,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41819,29 +45585,31 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubsc chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -41853,9 +45621,11 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridg }); } -- (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeControlModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -41865,13 +45635,13 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( }); } -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeControlModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeControlModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -41880,7 +45650,7 @@ - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -41903,16 +45673,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41922,28 +45696,30 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscri chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -41955,9 +45731,11 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; auto successFn @@ -41968,17 +45746,22 @@ new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridg }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -41989,30 +45772,31 @@ new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubsc chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -42024,9 +45808,11 @@ new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridg }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -42036,17 +45822,22 @@ new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42056,29 +45847,30 @@ new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscr chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -42090,9 +45882,10 @@ new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -42102,16 +45895,20 @@ new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42121,28 +45918,30 @@ new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscription chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -42153,9 +45952,10 @@ new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -42165,16 +45965,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42184,27 +45988,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -42215,9 +46020,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -42227,16 +46033,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42246,28 +46057,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -42282,7 +46094,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterThermostat -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -42290,20 +46102,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -42324,14 +46136,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params completion:(MTRStatusCompletion)completion +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -42390,12 +46203,12 @@ new MTRCommandSuccessCallbackBridge( } - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params - completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -42417,19 +46230,19 @@ new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQue }); } -- (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion +- (void)clearWeeklyScheduleWithCompletionHandler:(StatusCompletion)completionHandler { - [self clearWeeklyScheduleWithParams:nil completion:completion]; + [self clearWeeklyScheduleWithParams:nil completionHandler:completionHandler]; } - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -42448,9 +46261,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -42460,16 +46274,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42479,28 +46298,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLocalTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -42511,9 +46331,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -42523,17 +46344,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42543,28 +46368,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOutdoorTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -42575,9 +46401,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -42587,16 +46414,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42606,27 +46437,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -42637,10 +46469,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -42650,17 +46482,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42670,28 +46507,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -42702,10 +46540,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -42715,17 +46553,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42735,28 +46578,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -42767,10 +46611,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -42780,17 +46624,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42800,28 +46649,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -42832,10 +46682,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -42845,17 +46695,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42865,28 +46720,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -42897,9 +46753,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePICoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -42909,16 +46766,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42928,28 +46790,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePICoolingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -42960,9 +46823,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePIHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -42972,16 +46836,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -42991,28 +46860,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -43023,10 +46893,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -43036,13 +46906,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -43051,7 +46924,7 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -43074,17 +46947,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43094,28 +46972,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -43126,10 +47005,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -43139,13 +47018,16 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -43154,7 +47036,7 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -43177,17 +47059,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43197,28 +47084,29 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLocalTemperatureCalibrationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -43229,10 +47117,10 @@ new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -43242,13 +47130,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -43257,7 +47148,7 @@ - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -43280,17 +47171,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43300,28 +47196,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -43332,10 +47229,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -43345,13 +47242,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -43360,7 +47260,7 @@ - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -43383,17 +47283,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43403,28 +47308,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -43435,10 +47341,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -43448,13 +47354,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -43463,7 +47372,7 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)va new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -43486,17 +47395,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43506,28 +47420,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -43538,10 +47453,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -43551,13 +47466,16 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -43566,7 +47484,7 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)va new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -43589,17 +47507,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43609,28 +47532,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -43641,9 +47565,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -43653,13 +47578,13 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -43668,7 +47593,7 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -43691,17 +47616,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43711,28 +47641,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -43743,9 +47674,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -43755,13 +47687,13 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -43770,7 +47702,7 @@ - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -43793,17 +47725,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43813,28 +47750,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -43845,9 +47783,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -43857,13 +47796,13 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -43872,7 +47811,7 @@ - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -43895,17 +47834,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -43915,28 +47859,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -43947,9 +47892,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -43959,13 +47905,13 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -43974,7 +47920,7 @@ - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -43997,17 +47943,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44017,28 +47968,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -44049,9 +48001,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -44061,13 +48014,13 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -44076,7 +48029,7 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -44099,17 +48052,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44119,28 +48077,29 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinSetpointDeadBandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -44151,9 +48110,10 @@ new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -44163,13 +48123,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -44178,7 +48138,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -44201,16 +48161,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44220,27 +48185,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRemoteSensingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -44251,10 +48218,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -44264,13 +48231,16 @@ new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(self.ca }); } -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -44279,7 +48249,7 @@ - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)v new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -44302,17 +48272,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44322,29 +48297,30 @@ new MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBr chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeControlSequenceOfOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -44355,9 +48331,10 @@ new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge( }); } -- (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSystemModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -44367,13 +48344,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -44382,7 +48359,7 @@ - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -44405,16 +48382,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44424,27 +48405,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSystemModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -44455,9 +48437,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -44467,17 +48450,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44487,28 +48475,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeThermostatRunningModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -44519,9 +48508,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -44531,16 +48521,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44550,27 +48544,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStartOfWeekWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -44581,10 +48577,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -44594,17 +48590,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44614,28 +48615,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -44646,10 +48648,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -44659,17 +48661,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44679,28 +48686,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfDailyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -44711,10 +48719,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -44724,13 +48732,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -44739,7 +48750,7 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -44762,17 +48773,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44782,28 +48798,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTemperatureSetpointHoldWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -44814,10 +48831,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -44828,13 +48845,15 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co } - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -44843,7 +48862,7 @@ - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Null new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -44871,18 +48890,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44892,29 +48915,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -44925,10 +48948,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -44939,13 +48962,15 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, } - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -44954,7 +48979,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _N new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -44977,18 +49002,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -44998,29 +49027,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45031,10 +49060,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeThermostatRunningStateWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45044,17 +49073,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45064,28 +49098,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeThermostatRunningStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45096,9 +49131,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45108,17 +49144,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45128,28 +49169,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSetpointChangeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45160,9 +49202,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45172,17 +49215,22 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45192,28 +49240,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45224,10 +49273,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45237,18 +49286,22 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45258,28 +49311,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45290,9 +49344,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45302,13 +49357,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -45317,7 +49372,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -45345,16 +49400,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45364,28 +49424,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45396,9 +49457,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45408,17 +49470,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45428,28 +49494,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45460,9 +49527,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45472,17 +49540,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45492,28 +49564,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45524,9 +49597,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45536,13 +49610,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -45551,7 +49625,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -45579,16 +49653,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45598,28 +49677,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45630,9 +49710,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45642,17 +49723,22 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45662,28 +49748,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45694,9 +49781,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45706,17 +49794,22 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45726,28 +49819,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45758,9 +49852,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEmergencyHeatDeltaWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45770,13 +49865,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -45785,7 +49880,7 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -45808,17 +49903,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45828,28 +49927,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45860,9 +49960,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45872,13 +49972,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeACTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeACTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -45887,7 +49987,7 @@ - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -45910,16 +50010,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -45929,27 +50033,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -45960,9 +50065,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -45972,13 +50078,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeACCapacityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeACCapacityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -45987,7 +50093,7 @@ - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -46010,16 +50116,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46029,27 +50139,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeACCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -46060,9 +50171,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -46072,13 +50184,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -46087,7 +50199,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -46110,16 +50222,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46129,28 +50246,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -46161,9 +50279,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -46173,13 +50292,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -46188,7 +50307,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -46211,16 +50330,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46230,28 +50354,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -46262,9 +50387,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACErrorCodeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -46274,13 +50400,13 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -46289,7 +50415,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -46312,16 +50438,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46331,27 +50461,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -46362,9 +50494,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -46374,13 +50507,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -46389,7 +50522,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -46412,16 +50545,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46431,28 +50569,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -46463,9 +50602,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -46475,16 +50615,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46494,28 +50639,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -46526,9 +50672,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCapacityformatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -46538,13 +50685,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -46553,7 +50700,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -46576,16 +50723,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46595,28 +50747,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeACCapacityformatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -46627,9 +50780,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRThermostatGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -46639,17 +50793,22 @@ new MTRThermostatGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46659,29 +50818,30 @@ new MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -46692,9 +50852,10 @@ new MTRThermostatGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRThermostatAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -46704,17 +50865,22 @@ new MTRThermostatAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46724,29 +50890,30 @@ new MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -46757,9 +50924,10 @@ new MTRThermostatAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRThermostatAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -46769,16 +50937,20 @@ new MTRThermostatAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46788,40 +50960,44 @@ new MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRThermostatAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -46831,16 +51007,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46850,27 +51030,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -46881,9 +51062,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -46893,16 +51075,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -46912,28 +51099,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -46948,7 +51136,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterFanControl -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -46956,14 +51144,14 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFanControlClusterFanModeTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRFanControlClusterFanModeTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -46973,13 +51161,13 @@ new MTRFanControlClusterFanModeTypeAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeFanModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeFanModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -46988,7 +51176,7 @@ - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -47011,16 +51199,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47030,40 +51222,43 @@ new MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFanModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFanControlClusterFanModeTypeAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -47073,13 +51268,13 @@ new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(self.callback }); } -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -47088,7 +51283,7 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -47111,16 +51306,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47130,29 +51330,30 @@ new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFanModeSequenceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -47163,9 +51364,10 @@ new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( }); } -- (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -47175,13 +51377,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributePercentSettingWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributePercentSettingWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -47190,7 +51392,7 @@ - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -47218,16 +51420,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47237,27 +51444,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePercentSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -47268,9 +51477,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -47280,16 +51490,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47299,27 +51514,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePercentCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -47330,9 +51547,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -47342,16 +51560,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47361,27 +51583,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSpeedMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -47392,9 +51615,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -47404,13 +51628,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -47419,7 +51643,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -47447,16 +51671,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47466,27 +51694,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSpeedSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -47497,9 +51727,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -47509,16 +51740,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47528,27 +51763,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -47559,9 +51796,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRockSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -47571,16 +51809,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47590,27 +51832,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRockSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -47621,9 +51865,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRockSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -47633,13 +51878,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRockSettingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRockSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -47648,7 +51893,7 @@ - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -47671,16 +51916,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47690,27 +51939,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRockSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -47721,9 +51972,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWindSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -47733,16 +51985,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47752,27 +52008,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWindSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -47783,9 +52041,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWindSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -47795,13 +52054,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeWindSettingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeWindSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -47810,7 +52069,7 @@ - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -47833,16 +52092,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47852,27 +52115,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWindSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -47883,9 +52148,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRFanControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRFanControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -47895,17 +52161,22 @@ new MTRFanControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47915,29 +52186,30 @@ new MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFanControlGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -47948,9 +52220,10 @@ new MTRFanControlGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRFanControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRFanControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -47960,17 +52233,22 @@ new MTRFanControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -47980,29 +52258,30 @@ new MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFanControlAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -48013,9 +52292,10 @@ new MTRFanControlAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFanControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRFanControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -48025,16 +52305,20 @@ new MTRFanControlAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48044,40 +52328,44 @@ new MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFanControlAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRFanControlAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(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 err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -48087,16 +52375,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48106,27 +52398,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -48137,9 +52430,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -48149,16 +52443,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48168,28 +52467,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -48204,7 +52504,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterThermostatUserInterfaceConfiguration -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -48212,15 +52512,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -48230,13 +52530,14 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -48245,7 +52546,7 @@ - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -48268,17 +52569,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48288,28 +52594,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTemperatureDisplayModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -48320,9 +52627,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeKeypadLockoutWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -48332,13 +52640,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -48347,7 +52655,7 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -48370,16 +52678,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48389,27 +52702,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeKeypadLockoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -48420,10 +52735,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -48433,13 +52748,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -48448,7 +52766,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnul new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -48471,18 +52789,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48492,28 +52814,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeScheduleProgrammingVisibilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -48524,10 +52847,11 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completion, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; auto successFn @@ -48538,17 +52862,22 @@ new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCall }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48559,30 +52888,31 @@ new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCall chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable( success); @@ -48595,10 +52925,11 @@ new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCall }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completion, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; auto successFn @@ -48609,17 +52940,22 @@ new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallb }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48630,30 +52966,31 @@ new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallb chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable( success); @@ -48666,9 +53003,11 @@ new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallb }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; auto successFn @@ -48679,16 +53018,20 @@ new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBri }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48699,29 +53042,31 @@ new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSub chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -48733,9 +53078,10 @@ new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBri }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -48745,16 +53091,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48764,27 +53114,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -48795,9 +53146,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -48807,16 +53159,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -48826,28 +53183,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -48862,7 +53220,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterColorControl -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -48870,19 +53228,19 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completion:(MTRStatusCompletion)completion +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -48907,14 +53265,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completion:(MTRStatusCompletion)completion +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -48937,14 +53295,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completion:(MTRStatusCompletion)completion +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -48968,14 +53326,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params completion:(MTRStatusCompletion)completion +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -48998,14 +53357,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params completion:(MTRStatusCompletion)completion +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49028,14 +53388,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params completion:(MTRStatusCompletion)completion +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49060,14 +53421,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49091,14 +53452,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completion:(MTRStatusCompletion)completion +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49122,14 +53484,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completion:(MTRStatusCompletion)completion +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49152,14 +53514,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completion:(MTRStatusCompletion)completion +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49184,14 +53546,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49215,14 +53577,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49247,14 +53609,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params completion:(MTRStatusCompletion)completion +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49277,14 +53640,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params completion:(MTRStatusCompletion)completion +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49309,14 +53673,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49340,14 +53704,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params completion:(MTRStatusCompletion)completion +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49375,14 +53740,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params completion:(MTRStatusCompletion)completion +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49404,14 +53770,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49437,14 +53803,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -49470,9 +53836,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -49482,16 +53849,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49501,27 +53872,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -49532,9 +53904,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -49544,16 +53917,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49563,28 +53941,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentSaturationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -49595,9 +53974,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -49607,16 +53987,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49626,27 +54011,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -49657,9 +54044,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -49669,16 +54057,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49688,27 +54080,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -49719,9 +54112,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -49731,16 +54125,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49750,27 +54148,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -49781,9 +54180,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -49793,16 +54193,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49812,28 +54217,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDriftCompensationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -49844,9 +54250,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -49856,16 +54263,21 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49875,28 +54287,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCompensationTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -49907,10 +54320,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -49920,17 +54333,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -49940,28 +54358,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -49972,9 +54391,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -49984,16 +54404,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50003,27 +54427,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50034,9 +54459,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Options::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -50046,13 +54471,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -50061,7 +54486,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -50084,16 +54509,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50103,27 +54532,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50134,9 +54564,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -50146,16 +54577,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50165,28 +54601,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfPrimariesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50197,9 +54634,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -50209,16 +54647,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50228,27 +54670,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary1XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50259,9 +54702,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -50271,16 +54715,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50290,27 +54738,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary1YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50321,9 +54770,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -50333,16 +54783,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50352,28 +54807,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary1IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50384,9 +54840,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary2XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -50396,16 +54853,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50415,27 +54876,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary2XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50446,9 +54908,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary2YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -50458,16 +54921,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50477,27 +54944,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary2YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50508,9 +54976,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -50520,16 +54989,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50539,28 +55013,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary2IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50571,9 +55046,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -50583,16 +55059,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50602,27 +55082,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary3XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50633,9 +55114,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -50645,16 +55127,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50664,27 +55150,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary3YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50695,9 +55182,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -50707,16 +55195,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50726,28 +55219,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary3IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50758,9 +55252,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -50770,16 +55265,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50789,27 +55288,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary4XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50820,9 +55320,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -50832,16 +55333,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50851,27 +55356,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary4YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50882,9 +55388,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -50894,16 +55401,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50913,28 +55425,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary4IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -50945,9 +55458,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -50957,16 +55471,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -50976,27 +55494,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary5XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -51007,9 +55526,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -51019,16 +55539,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51038,27 +55562,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary5YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -51069,9 +55594,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -51081,16 +55607,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51100,28 +55631,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary5IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -51132,9 +55664,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary6XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -51144,16 +55677,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51163,27 +55700,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary6XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -51194,9 +55732,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary6YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -51206,16 +55745,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51225,27 +55768,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary6YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -51256,9 +55800,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -51268,16 +55813,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51287,28 +55837,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePrimary6IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -51319,9 +55870,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -51331,13 +55883,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -51346,7 +55898,7 @@ - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -51369,16 +55921,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51388,27 +55944,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWhitePointXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -51419,9 +55977,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -51431,13 +55990,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -51446,7 +56005,7 @@ - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -51469,16 +56028,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51488,27 +56051,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWhitePointYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -51519,9 +56084,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -51531,13 +56097,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -51546,7 +56112,7 @@ - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -51569,16 +56135,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51588,27 +56158,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointRXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -51619,9 +56191,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -51631,13 +56204,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -51646,7 +56219,7 @@ - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -51669,16 +56242,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51688,27 +56265,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointRYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -51719,9 +56298,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -51731,13 +56311,14 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -51746,7 +56327,7 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -51774,17 +56355,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51794,28 +56380,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointRIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -51826,9 +56413,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -51838,13 +56426,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -51853,7 +56441,7 @@ - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -51876,16 +56464,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51895,27 +56487,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointGXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -51926,9 +56520,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -51938,13 +56533,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -51953,7 +56548,7 @@ - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -51976,16 +56571,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -51995,27 +56594,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointGYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52026,9 +56627,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -52038,13 +56640,14 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -52053,7 +56656,7 @@ - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -52081,17 +56684,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52101,28 +56709,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointGIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52133,9 +56742,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -52145,13 +56755,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -52160,7 +56770,7 @@ - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -52183,16 +56793,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52202,27 +56816,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointBXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52233,9 +56849,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -52245,13 +56862,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -52260,7 +56877,7 @@ - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -52283,16 +56900,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52302,27 +56923,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointBYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52333,9 +56956,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -52345,13 +56969,14 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -52360,7 +56985,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -52388,17 +57013,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52408,28 +57038,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointBIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52440,9 +57071,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -52452,17 +57084,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52472,28 +57108,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEnhancedCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52504,9 +57141,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -52516,16 +57154,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52535,28 +57178,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEnhancedColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52567,9 +57211,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -52579,16 +57224,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52598,28 +57248,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorLoopActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52630,9 +57281,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -52642,17 +57294,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52662,28 +57318,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52694,9 +57351,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -52706,16 +57364,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52725,27 +57388,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorLoopTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52756,10 +57421,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -52769,17 +57434,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52789,28 +57459,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorLoopStartEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52821,10 +57492,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -52834,17 +57505,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52854,28 +57530,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52886,9 +57563,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -52898,16 +57576,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52917,28 +57600,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -52949,10 +57633,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -52962,17 +57646,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -52982,28 +57671,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53014,10 +57704,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -53027,17 +57717,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53047,28 +57742,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53079,10 +57775,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -53092,18 +57788,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53113,29 +57813,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53146,10 +57846,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -53159,13 +57859,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -53174,7 +57877,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullab new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -53202,18 +57905,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53223,28 +57930,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53255,9 +57963,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRColorControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -53267,17 +57976,22 @@ new MTRColorControlGeneratedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53287,29 +58001,30 @@ new MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRColorControlGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53320,9 +58035,10 @@ new MTRColorControlGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRColorControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -53332,17 +58048,22 @@ new MTRColorControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53352,29 +58073,30 @@ new MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRColorControlAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53385,9 +58107,10 @@ new MTRColorControlAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRColorControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -53397,16 +58120,20 @@ new MTRColorControlAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53416,40 +58143,44 @@ new MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRColorControlAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -53459,16 +58190,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53478,27 +58213,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53509,9 +58245,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -53521,16 +58258,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53540,28 +58282,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53576,7 +58319,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterBallastConfiguration -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -53584,14 +58327,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -53601,16 +58345,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53620,28 +58369,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePhysicalMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53652,9 +58402,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -53664,16 +58415,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53683,28 +58439,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePhysicalMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53715,9 +58472,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBallastStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -53727,16 +58485,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53746,27 +58509,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBallastStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53777,9 +58542,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -53789,13 +58555,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeMinLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeMinLevelWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -53804,7 +58570,7 @@ - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -53827,16 +58593,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53846,27 +58616,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53877,9 +58648,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -53889,13 +58661,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -53904,7 +58676,7 @@ - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -53927,16 +58699,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -53946,27 +58722,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -53977,10 +58754,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeIntrinsicBalanceFactorWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeIntrinsicBalanceFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -53990,13 +58767,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -54005,7 +58785,7 @@ - (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -54033,17 +58813,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeIntrinsicBalanceFactorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54053,28 +58838,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeIntrinsicBalanceFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -54085,10 +58871,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBallastFactorAdjustmentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -54098,13 +58884,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -54113,7 +58902,7 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)val new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -54141,17 +58930,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54161,28 +58955,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBallastFactorAdjustmentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -54193,9 +58988,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampQuantityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -54205,16 +59001,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54224,27 +59024,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLampQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -54255,9 +59057,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampTypeWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -54267,13 +59070,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLampTypeWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLampTypeWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -54282,7 +59085,7 @@ - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -54305,16 +59108,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54324,27 +59131,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLampTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -54355,9 +59163,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampManufacturerWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -54367,13 +59176,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLampManufacturerWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLampManufacturerWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -54382,7 +59191,7 @@ - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -54405,16 +59214,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54424,28 +59238,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLampManufacturerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -54456,9 +59271,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampRatedHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -54468,13 +59284,13 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -54483,7 +59299,7 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -54511,16 +59327,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54530,27 +59351,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLampRatedHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -54561,9 +59384,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampBurnHoursWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -54573,13 +59397,13 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -54588,7 +59412,7 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -54616,16 +59440,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54635,27 +59464,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLampBurnHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -54666,9 +59497,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampAlarmModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -54678,13 +59510,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -54693,7 +59525,7 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -54716,16 +59548,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54735,27 +59572,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLampAlarmModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -54766,10 +59605,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampBurnHoursTripPointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -54779,13 +59618,16 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -54794,7 +59636,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -54822,17 +59664,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54842,28 +59689,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLampBurnHoursTripPointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -54874,9 +59722,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -54886,17 +59735,22 @@ new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54906,29 +59760,30 @@ new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscription chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -54939,9 +59794,10 @@ new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -54951,17 +59807,22 @@ new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -54971,29 +59832,30 @@ new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionB chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55004,9 +59866,10 @@ new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBallastConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBallastConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55016,16 +59879,20 @@ new MTRBallastConfigurationAttributeListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55035,28 +59902,30 @@ new MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBallastConfigurationAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55067,9 +59936,10 @@ new MTRBallastConfigurationAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -55079,16 +59949,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55098,27 +59972,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55129,9 +60004,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55141,16 +60017,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55160,28 +60041,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55196,7 +60078,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterIlluminanceMeasurement -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -55204,14 +60086,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55221,16 +60104,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55240,27 +60128,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55271,9 +60161,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55283,16 +60174,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55302,28 +60198,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55334,9 +60231,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55346,16 +60244,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55365,28 +60268,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55397,9 +60301,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55409,16 +60314,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55428,27 +60337,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55459,9 +60369,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55471,16 +60382,21 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55490,28 +60406,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLightSensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55522,9 +60439,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55534,17 +60452,22 @@ new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(sel }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55554,29 +60477,30 @@ new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscripti chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55587,9 +60511,10 @@ new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55599,17 +60524,22 @@ new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55619,29 +60549,30 @@ new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptio chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55652,9 +60583,10 @@ new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -55664,16 +60596,20 @@ new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55683,28 +60619,30 @@ new MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridg chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55715,9 +60653,10 @@ new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55727,16 +60666,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55746,27 +60689,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55777,9 +60721,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55789,16 +60734,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55808,28 +60758,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55844,7 +60795,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterTemperatureMeasurement -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -55852,14 +60803,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55869,16 +60821,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55888,27 +60845,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55919,9 +60878,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55931,16 +60891,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -55950,28 +60915,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -55982,9 +60948,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -55994,16 +60961,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56013,28 +60985,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56045,9 +61018,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -56057,16 +61031,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56076,27 +61054,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56107,9 +61086,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -56119,17 +61099,22 @@ new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(sel }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56139,29 +61124,30 @@ new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscripti chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56172,9 +61158,10 @@ new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -56184,17 +61171,22 @@ new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56204,29 +61196,30 @@ new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptio chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56237,9 +61230,10 @@ new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -56249,16 +61243,20 @@ new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56268,28 +61266,30 @@ new MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridg chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56300,9 +61300,10 @@ new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -56312,16 +61313,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56331,27 +61336,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56362,9 +61368,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -56374,16 +61381,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56393,28 +61405,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56429,7 +61442,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterPressureMeasurement -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -56437,14 +61450,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -56454,16 +61468,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56473,27 +61492,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56504,9 +61525,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -56516,16 +61538,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56535,28 +61562,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56567,9 +61595,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -56579,16 +61608,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56598,28 +61632,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56630,9 +61665,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -56642,16 +61678,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56661,27 +61701,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56692,9 +61733,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -56704,16 +61746,20 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56723,27 +61769,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56754,9 +61802,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -56766,16 +61815,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56785,27 +61839,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56816,9 +61872,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -56828,16 +61885,21 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56847,27 +61909,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56878,9 +61942,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -56890,16 +61955,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56909,28 +61979,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeScaledToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -56941,9 +62012,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -56953,16 +62024,20 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -56972,27 +62047,28 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeScaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57003,9 +62079,10 @@ new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -57015,17 +62092,22 @@ new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57035,29 +62117,30 @@ new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionB chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57068,9 +62151,10 @@ new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -57080,17 +62164,22 @@ new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57100,29 +62189,30 @@ new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBr chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57133,9 +62223,10 @@ new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRPressureMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRPressureMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -57145,16 +62236,20 @@ new MTRPressureMeasurementAttributeListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57164,28 +62259,30 @@ new MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPressureMeasurementAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57196,9 +62293,10 @@ new MTRPressureMeasurementAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -57208,16 +62306,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57227,27 +62329,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57258,9 +62361,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -57270,16 +62374,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57289,28 +62398,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57325,7 +62435,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterFlowMeasurement -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -57333,14 +62443,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -57350,16 +62461,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57369,27 +62485,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57400,9 +62518,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -57412,16 +62531,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57431,28 +62555,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57463,9 +62588,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, 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); @@ -57475,16 +62601,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57494,28 +62625,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57526,9 +62658,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -57538,16 +62671,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57557,27 +62694,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57588,9 +62726,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -57600,17 +62739,22 @@ new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57620,29 +62764,30 @@ new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57653,9 +62798,10 @@ new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -57665,17 +62811,22 @@ new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57685,29 +62836,30 @@ new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57718,9 +62870,10 @@ new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFlowMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRFlowMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -57730,16 +62883,20 @@ new MTRFlowMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57749,28 +62906,30 @@ new MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFlowMeasurementAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57781,9 +62940,10 @@ new MTRFlowMeasurementAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -57793,16 +62953,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57812,27 +62976,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57843,9 +63008,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -57855,16 +63021,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57874,28 +63045,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57910,7 +63082,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterRelativeHumidityMeasurement -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -57918,14 +63090,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -57935,16 +63108,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -57954,27 +63132,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -57985,9 +63165,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -57997,16 +63178,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58016,28 +63202,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -58048,9 +63235,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -58060,16 +63248,21 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58079,28 +63272,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -58111,9 +63305,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -58123,16 +63318,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58142,27 +63341,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -58173,9 +63373,11 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; auto successFn @@ -58186,17 +63388,22 @@ new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridg }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58207,30 +63414,31 @@ new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubsc chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -58242,9 +63450,11 @@ new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridg }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -58254,17 +63464,22 @@ new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58274,29 +63489,30 @@ new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscr chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { @@ -58308,9 +63524,10 @@ new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -58320,16 +63537,20 @@ new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58339,28 +63560,30 @@ new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscription chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -58371,9 +63594,10 @@ new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -58383,16 +63607,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58402,27 +63630,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -58433,9 +63662,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -58445,16 +63675,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58464,28 +63699,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -58500,7 +63736,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterOccupancySensing -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -58508,14 +63744,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -58525,16 +63762,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58544,27 +63785,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -58575,9 +63817,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -58587,17 +63830,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58607,28 +63855,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOccupancySensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -58639,10 +63888,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -58652,17 +63901,22 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58672,28 +63926,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOccupancySensorTypeBitmapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -58704,10 +63959,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -58717,13 +63972,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -58732,7 +63990,7 @@ - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -58755,18 +64013,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58776,28 +64038,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -58808,10 +64071,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -58821,13 +64084,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -58836,7 +64102,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -58859,18 +64125,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58880,28 +64150,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -58912,10 +64183,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -58925,14 +64196,16 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -58941,7 +64214,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Non new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -58964,18 +64237,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -58985,29 +64262,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -59018,10 +64295,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -59032,13 +64309,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion } - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -59047,7 +64326,7 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _ new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -59070,18 +64349,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59091,29 +64374,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -59124,10 +64407,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -59138,13 +64421,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -59153,7 +64438,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _ new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -59176,18 +64461,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59197,29 +64486,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -59230,10 +64519,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -59244,15 +64533,15 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value params:nil - completion:completion]; + completionHandler:completionHandler]; } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -59261,7 +64550,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -59284,18 +64573,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59305,29 +64598,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -59338,10 +64631,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -59352,15 +64645,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion } - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil - completion:completion]; + completionHandler:completionHandler]; } - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -59369,7 +64662,7 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumbe new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -59392,18 +64685,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59413,29 +64710,30 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -59446,10 +64744,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -59460,15 +64758,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil - completion:completion]; + completionHandler:completionHandler]; } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -59477,7 +64775,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumbe new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -59500,18 +64798,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59521,29 +64823,30 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -59554,10 +64857,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -59568,15 +64871,15 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value params:nil - completion:completion]; + completionHandler:completionHandler]; } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -59585,7 +64888,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSN new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -59608,18 +64911,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59629,29 +64936,30 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -59662,9 +64970,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -59674,17 +64983,22 @@ new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(self.call }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59694,29 +65008,30 @@ new MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBrid chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -59727,9 +65042,10 @@ new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -59739,17 +65055,22 @@ new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59759,29 +65080,30 @@ new MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -59792,9 +65114,10 @@ new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROccupancySensingAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -59804,16 +65127,20 @@ new MTROccupancySensingAttributeListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59823,28 +65150,30 @@ new MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROccupancySensingAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -59855,9 +65184,10 @@ new MTROccupancySensingAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -59867,16 +65197,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59886,27 +65220,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -59917,9 +65252,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -59929,16 +65265,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -59948,28 +65289,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -59982,9 +65324,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @end -@implementation MTRBaseClusterWakeOnLAN +@implementation MTRBaseClusterWakeOnLan -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -59992,14 +65334,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMACAddressWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -60009,16 +65352,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60028,27 +65375,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMACAddressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -60059,62 +65407,69 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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 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)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + 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 successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -60124,62 +65479,69 @@ new MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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 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)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + 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 successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -60189,71 +65551,80 @@ new MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWakeOnLANAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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 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)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; - new MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge( + new MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + 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 successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWakeOnLANAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -60263,16 +65634,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60282,27 +65657,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -60313,9 +65689,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -60325,16 +65702,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60344,28 +65726,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -60380,7 +65763,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterChannel -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -60388,18 +65771,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params - completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRChannelClusterChangeChannelResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRChannelClusterChangeChannelResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -60419,14 +65802,14 @@ new MTRChannelClusterChangeChannelResponseCallbackBridge(self.callbackQueue, sel } - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -60447,14 +65830,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completion:(MTRStatusCompletion)completion +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -60474,9 +65857,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChannelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelChannelListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -60486,16 +65870,20 @@ new MTRChannelChannelListListAttributeCallbackBridge(self.callbackQueue, self.de }); } -- (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRChannelChannelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60505,27 +65893,28 @@ new MTRChannelChannelListListAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeChannelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelChannelListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -60536,10 +65925,10 @@ new MTRChannelChannelListListAttributeCallbackBridge(queue, completion, ^(Cancel }); } -- (void)readAttributeLineupWithCompletion:(void (^)( - MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLineupWithCompletionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRChannelLineupStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -60549,17 +65938,21 @@ new MTRChannelLineupStructAttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRChannelLineupStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60569,28 +65962,29 @@ new MTRChannelLineupStructAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLineupWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRChannelLineupStructAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -60601,10 +65995,10 @@ new MTRChannelLineupStructAttributeCallbackBridge(queue, completion, ^(Cancelabl }); } -- (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRChannelCurrentChannelStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -60614,17 +66008,21 @@ new MTRChannelCurrentChannelStructAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60634,41 +66032,44 @@ new MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentChannelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRChannelCurrentChannelStructAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRChannelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -60678,17 +66079,22 @@ new MTRChannelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60698,41 +66104,44 @@ new MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRChannelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -60742,17 +66151,22 @@ new MTRChannelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60762,41 +66176,44 @@ new MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -60806,16 +66223,20 @@ new MTRChannelAttributeListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRChannelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60825,27 +66246,29 @@ new MTRChannelAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -60856,9 +66279,10 @@ new MTRChannelAttributeListListAttributeCallbackBridge(queue, completion, ^(Canc }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -60868,16 +66292,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60887,27 +66315,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -60918,9 +66347,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -60930,16 +66360,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -60949,28 +66384,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -60985,7 +66421,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterTargetNavigator -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -60993,18 +66429,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params - completion:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61027,9 +66463,10 @@ new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(self.callbackQ }); } -- (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTargetListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTargetNavigatorTargetListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -61039,16 +66476,20 @@ new MTRTargetNavigatorTargetListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61058,40 +66499,43 @@ new MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge( chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTargetListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTargetNavigatorTargetListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -61101,16 +66545,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61120,27 +66569,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentTargetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -61151,9 +66602,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -61163,17 +66615,22 @@ new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61183,29 +66640,30 @@ new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -61216,9 +66674,10 @@ new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -61228,17 +66687,22 @@ new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61248,29 +66712,30 @@ new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -61281,9 +66746,10 @@ new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTargetNavigatorAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTargetNavigatorAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -61293,16 +66759,20 @@ new MTRTargetNavigatorAttributeListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61312,28 +66782,30 @@ new MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTargetNavigatorAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -61344,9 +66816,10 @@ new MTRTargetNavigatorAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -61356,16 +66829,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61375,27 +66852,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -61406,9 +66884,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -61418,16 +66897,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61437,28 +66921,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -61473,7 +66958,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterMediaPlayback -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -61481,23 +66966,23 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)playWithCompletion:(void (^)( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)playWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self playWithParams:nil completion:completion]; + [self playWithParams:nil completionHandler:completionHandler]; } - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + 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, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61515,18 +67000,18 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, se }); } -- (void)pauseWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)pauseWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self pauseWithParams:nil completion:completion]; + [self pauseWithParams:nil completionHandler:completionHandler]; } - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + 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, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61544,18 +67029,18 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, se }); } -- (void)stopPlaybackWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)stopPlaybackWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self stopPlaybackWithParams:nil completion:completion]; + [self stopPlaybackWithParams:nil completionHandler:completionHandler]; } - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + 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, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61573,18 +67058,18 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, se }); } -- (void)startOverWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)startOverWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self startOverWithParams:nil completion:completion]; + [self startOverWithParams:nil completionHandler:completionHandler]; } - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + 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, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61602,18 +67087,18 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, se }); } -- (void)previousWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)previousWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self previousWithParams:nil completion:completion]; + [self previousWithParams:nil completionHandler:completionHandler]; } - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + 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, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61631,18 +67116,18 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, se }); } -- (void)nextWithCompletion:(void (^)( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)nextWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self nextWithParams:nil completion:completion]; + [self nextWithParams:nil completionHandler:completionHandler]; } - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + 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, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61660,18 +67145,18 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, se }); } -- (void)rewindWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)rewindWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self rewindWithParams:nil completion:completion]; + [self rewindWithParams:nil completionHandler:completionHandler]; } - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + 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, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61689,18 +67174,18 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, se }); } -- (void)fastForwardWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)fastForwardWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self fastForwardWithParams:nil completion:completion]; + [self fastForwardWithParams:nil completionHandler:completionHandler]; } - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + 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, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61719,12 +67204,12 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, se } - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + 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, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61744,12 +67229,12 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, se } - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + 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, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61769,12 +67254,12 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, se } - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + 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, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61793,9 +67278,10 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, se }); } -- (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -61805,16 +67291,20 @@ new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61824,28 +67314,30 @@ new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -61856,9 +67348,10 @@ new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge( }); } -- (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -61868,16 +67361,20 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61887,27 +67384,28 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStartTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -61918,9 +67416,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDurationWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -61930,16 +67429,20 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -61949,27 +67452,28 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -61980,10 +67484,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -61993,17 +67497,21 @@ new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62013,29 +67521,30 @@ new MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSampledPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -62046,9 +67555,10 @@ new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge( }); } -- (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFloatAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -62058,16 +67568,21 @@ new MTRFloatAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRFloatAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62077,27 +67592,29 @@ new MTRFloatAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePlaybackSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFloatAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRFloatAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -62108,9 +67625,10 @@ new MTRFloatAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -62120,16 +67638,20 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62139,27 +67661,29 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSeekRangeEndWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -62170,9 +67694,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -62182,16 +67707,21 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62201,27 +67731,29 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSeekRangeStartWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -62232,9 +67764,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -62244,17 +67777,22 @@ new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62264,29 +67802,30 @@ new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -62297,9 +67836,10 @@ new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -62309,17 +67849,22 @@ new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62329,29 +67874,30 @@ new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -62362,9 +67908,10 @@ new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaPlaybackAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRMediaPlaybackAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -62374,16 +67921,20 @@ new MTRMediaPlaybackAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62393,40 +67944,44 @@ new MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaPlaybackAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -62436,16 +67991,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62455,27 +68014,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -62486,9 +68046,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -62498,16 +68059,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62517,28 +68083,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -62553,7 +68120,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterMediaInput -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -62561,19 +68128,19 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completion:(MTRStatusCompletion)completion +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -62593,19 +68160,19 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)showInputStatusWithCompletion:(MTRStatusCompletion)completion +- (void)showInputStatusWithCompletionHandler:(StatusCompletion)completionHandler { - [self showInputStatusWithParams:nil completion:completion]; + [self showInputStatusWithParams:nil completionHandler:completionHandler]; } - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -62624,19 +68191,19 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)hideInputStatusWithCompletion:(MTRStatusCompletion)completion +- (void)hideInputStatusWithCompletionHandler:(StatusCompletion)completionHandler { - [self hideInputStatusWithParams:nil completion:completion]; + [self hideInputStatusWithParams:nil completionHandler:completionHandler]; } - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -62655,14 +68222,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completion:(MTRStatusCompletion)completion +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -62683,9 +68250,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInputListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaInputInputListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -62695,16 +68263,20 @@ new MTRMediaInputInputListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaInputInputListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62714,27 +68286,28 @@ new MTRMediaInputInputListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInputListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaInputInputListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -62745,9 +68318,10 @@ new MTRMediaInputInputListListAttributeCallbackBridge(queue, completion, ^(Cance }); } -- (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -62757,16 +68331,20 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62776,27 +68354,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentInputWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -62807,9 +68387,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -62819,17 +68400,22 @@ new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62839,29 +68425,30 @@ new MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -62872,9 +68459,10 @@ new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -62884,17 +68472,22 @@ new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62904,29 +68497,30 @@ new MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -62937,9 +68531,10 @@ new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaInputAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -62949,16 +68544,20 @@ new MTRMediaInputAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -62968,40 +68567,44 @@ new MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaInputAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -63011,16 +68614,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63030,27 +68637,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -63061,9 +68669,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -63073,16 +68682,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63092,28 +68706,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -63128,7 +68743,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterLowPower -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -63136,23 +68751,23 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)sleepWithCompletion:(MTRStatusCompletion)completion +- (void)sleepWithCompletionHandler:(StatusCompletion)completionHandler { - [self sleepWithParams:nil completion:completion]; + [self sleepWithParams:nil completionHandler:completionHandler]; } -- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -63171,9 +68786,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -63183,17 +68799,22 @@ new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63203,29 +68824,30 @@ new MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -63236,9 +68858,10 @@ new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -63248,17 +68871,22 @@ new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63268,41 +68896,44 @@ new MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRLowPowerAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRLowPowerAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -63312,16 +68943,20 @@ new MTRLowPowerAttributeListListAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63331,40 +68966,44 @@ new MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRLowPowerAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRLowPowerAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -63374,16 +69013,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63393,27 +69036,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -63424,9 +69068,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -63436,16 +69081,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63455,28 +69105,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -63491,7 +69142,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterKeypadInput -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -63499,18 +69150,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - completion: - (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRKeypadInputClusterSendKeyResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRKeypadInputClusterSendKeyResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -63529,9 +69180,10 @@ new MTRKeypadInputClusterSendKeyResponseCallbackBridge(self.callbackQueue, self. }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -63541,17 +69193,22 @@ new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63561,29 +69218,30 @@ new MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -63594,9 +69252,10 @@ new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -63606,17 +69265,22 @@ new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63626,29 +69290,30 @@ new MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -63659,9 +69324,10 @@ new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRKeypadInputAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -63671,16 +69337,20 @@ new MTRKeypadInputAttributeListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63690,40 +69360,44 @@ new MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRKeypadInputAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -63733,16 +69407,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63752,27 +69430,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -63783,9 +69462,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -63795,16 +69475,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -63814,28 +69499,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -63850,7 +69536,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterContentLauncher -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -63858,18 +69544,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params - completion:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -63945,12 +69631,12 @@ new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, se } - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params - completion: - (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -64067,9 +69753,10 @@ new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, se }); } -- (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -64079,16 +69766,20 @@ new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64098,41 +69789,44 @@ new MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge( chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptHeaderWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -64142,13 +69836,16 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -64157,7 +69854,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -64180,17 +69877,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64200,28 +69902,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeSupportedStreamingProtocolsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -64232,9 +69935,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -64244,17 +69948,22 @@ new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64264,29 +69973,30 @@ new MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -64297,9 +70007,10 @@ new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -64309,17 +70020,22 @@ new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64329,29 +70045,30 @@ new MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -64362,9 +70079,10 @@ new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRContentLauncherAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRContentLauncherAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -64374,16 +70092,20 @@ new MTRContentLauncherAttributeListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64393,28 +70115,30 @@ new MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRContentLauncherAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -64425,9 +70149,10 @@ new MTRContentLauncherAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -64437,16 +70162,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64456,27 +70185,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -64487,9 +70217,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -64499,16 +70230,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64518,28 +70254,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -64554,7 +70291,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterAudioOutput -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -64562,19 +70299,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completion:(MTRStatusCompletion)completion +- (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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -64594,14 +70332,15 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completion:(MTRStatusCompletion)completion +- (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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -64622,9 +70361,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOutputListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRAudioOutputOutputListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAudioOutputOutputListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -64634,16 +70374,20 @@ new MTRAudioOutputOutputListListAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64653,40 +70397,43 @@ new MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOutputListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRAudioOutputOutputListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentOutputWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -64696,16 +70443,21 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64715,27 +70467,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentOutputWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -64746,9 +70500,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -64758,17 +70513,22 @@ new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64778,29 +70538,30 @@ new MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -64811,9 +70572,10 @@ new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -64823,17 +70585,22 @@ new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64843,29 +70610,30 @@ new MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -64876,9 +70644,10 @@ new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRAudioOutputAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAudioOutputAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -64888,16 +70657,20 @@ new MTRAudioOutputAttributeListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64907,40 +70680,44 @@ new MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRAudioOutputAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -64950,16 +70727,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -64969,27 +70750,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65000,9 +70782,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -65012,16 +70795,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65031,28 +70819,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65067,7 +70856,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterApplicationLauncher -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -65075,18 +70864,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params - completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -65111,12 +70900,12 @@ new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQue } - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params - completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -65137,12 +70926,12 @@ new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQue } - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params - completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -65162,9 +70951,10 @@ new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQue }); } -- (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCatalogListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRApplicationLauncherCatalogListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationLauncherCatalogListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -65174,16 +70964,20 @@ new MTRApplicationLauncherCatalogListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65193,28 +70987,29 @@ new MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCatalogListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationLauncherCatalogListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65225,10 +71020,10 @@ new MTRApplicationLauncherCatalogListListAttributeCallbackBridge( }); } -- (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeCurrentAppWithCompletionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -65239,15 +71034,15 @@ new MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(self.callbackQ } - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable) value params:nil - completion:completion]; + completionHandler:completionHandler]; } - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -65256,7 +71051,7 @@ - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicat new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -65289,17 +71084,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))reportHandler +- (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]; new MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65309,29 +71108,30 @@ new MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentAppWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65342,9 +71142,10 @@ new MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -65354,17 +71155,22 @@ new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(self.c }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65374,29 +71180,30 @@ new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionB chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65407,9 +71214,10 @@ new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -65419,17 +71227,22 @@ new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(self.ca }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65439,29 +71252,30 @@ new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBr chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65472,9 +71286,10 @@ new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRApplicationLauncherAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationLauncherAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -65484,16 +71299,20 @@ new MTRApplicationLauncherAttributeListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65503,28 +71322,30 @@ new MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationLauncherAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65535,9 +71356,10 @@ new MTRApplicationLauncherAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -65547,16 +71369,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65566,27 +71392,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65597,9 +71424,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -65609,16 +71437,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65628,28 +71461,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65664,7 +71498,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterApplicationBasic -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -65672,14 +71506,15 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -65689,16 +71524,20 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65708,27 +71547,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65739,9 +71579,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -65751,16 +71592,20 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completi }); } -- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65770,27 +71615,28 @@ new MTRVendorIdAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRVendorIdAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65801,9 +71647,10 @@ new MTRVendorIdAttributeCallbackBridge(queue, completion, ^(Cancelable * success }); } -- (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeApplicationNameWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -65813,16 +71660,21 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65832,28 +71684,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeApplicationNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65864,9 +71717,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -65876,16 +71730,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65895,27 +71753,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65926,10 +71785,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeApplicationWithCompletionHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRApplicationBasicApplicationStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationBasicApplicationStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -65939,17 +71798,22 @@ new MTRApplicationBasicApplicationStructAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -65959,30 +71823,31 @@ new MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRApplicationBasicApplicationStructAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -65993,9 +71858,9 @@ new MTRApplicationBasicApplicationStructAttributeCallbackBridge( }); } -- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -66005,16 +71870,20 @@ new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66024,28 +71893,29 @@ new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscription chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -66056,9 +71926,10 @@ new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge( }); } -- (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -66068,17 +71939,21 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66088,28 +71963,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeApplicationVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -66120,9 +71996,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -66132,16 +72009,21 @@ new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66151,29 +72033,30 @@ new MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAllowedVendorListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -66184,9 +72067,10 @@ new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -66196,17 +72080,22 @@ new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(self.call }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66216,29 +72105,30 @@ new MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBrid chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -66249,9 +72139,10 @@ new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -66261,17 +72152,22 @@ new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66281,29 +72177,30 @@ new MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridg chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -66314,9 +72211,10 @@ new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRApplicationBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRApplicationBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -66326,16 +72224,20 @@ new MTRApplicationBasicAttributeListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66345,28 +72247,30 @@ new MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -66377,9 +72281,10 @@ new MTRApplicationBasicAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -66389,16 +72294,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66408,27 +72317,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -66439,9 +72349,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -66451,16 +72362,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66470,28 +72386,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -66506,7 +72423,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterAccountLogin -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -66514,18 +72431,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params - completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -66547,14 +72464,14 @@ new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(self.callbackQueue, }); } -- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:(MTRStatusCompletion)completion +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -66578,18 +72495,19 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)logoutWithCompletion:(MTRStatusCompletion)completion +- (void)logoutWithCompletionHandler:(StatusCompletion)completionHandler { - [self logoutWithParams:nil completion:completion]; + [self logoutWithParams:nil completionHandler:completionHandler]; } -- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -66611,9 +72529,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -66623,17 +72542,22 @@ new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66643,29 +72567,30 @@ new MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -66676,9 +72601,10 @@ new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -66688,17 +72614,22 @@ new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66708,29 +72639,30 @@ new MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -66741,9 +72673,10 @@ new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRAccountLoginAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -66753,16 +72686,20 @@ new MTRAccountLoginAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66772,40 +72709,44 @@ new MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRAccountLoginAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -66815,16 +72756,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66834,27 +72779,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -66865,9 +72811,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -66877,16 +72824,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -66896,28 +72848,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -66932,7 +72885,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterElectricalMeasurement -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -66940,24 +72893,24 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)getProfileInfoCommandWithCompletion:(MTRStatusCompletion)completion +- (void)getProfileInfoCommandWithCompletionHandler:(StatusCompletion)completionHandler { - [self getProfileInfoCommandWithParams:nil completion:completion]; + [self getProfileInfoCommandWithParams:nil completionHandler:completionHandler]; } - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -66977,14 +72930,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -67006,9 +72959,10 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -67018,16 +72972,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67037,28 +72996,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasurementTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67069,9 +73029,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcVoltageWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67081,16 +73042,20 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67100,27 +73065,28 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67131,9 +73097,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcVoltageMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67143,16 +73110,20 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67162,27 +73133,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67193,9 +73166,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcVoltageMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67205,16 +73179,20 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67224,27 +73202,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67255,9 +73235,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67267,16 +73248,20 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67286,27 +73271,28 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67317,9 +73303,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcCurrentMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67329,16 +73316,20 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67348,27 +73339,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67379,9 +73372,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcCurrentMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67391,16 +73385,20 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67410,27 +73408,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67441,9 +73441,9 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67453,16 +73453,20 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67472,27 +73476,28 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67503,9 +73508,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcPowerMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67515,16 +73521,20 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67534,27 +73544,28 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcPowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67565,9 +73576,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcPowerMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67577,16 +73589,20 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67596,27 +73612,28 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcPowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67627,9 +73644,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67639,17 +73657,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67659,28 +73682,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67691,9 +73715,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67703,16 +73728,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67722,28 +73752,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67754,9 +73785,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67766,17 +73798,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67786,28 +73823,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67818,9 +73856,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67830,16 +73869,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67849,28 +73893,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67881,9 +73926,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67893,16 +73939,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67912,28 +73963,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -67944,9 +73996,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -67956,16 +74009,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -67975,27 +74033,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeDcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68006,9 +74066,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -68018,16 +74079,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68037,27 +74102,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68068,9 +74135,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcFrequencyMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -68080,16 +74148,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68099,27 +74172,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcFrequencyMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68130,9 +74205,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcFrequencyMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -68142,16 +74218,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68161,27 +74242,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcFrequencyMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68192,9 +74275,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNeutralCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -68204,16 +74288,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68223,27 +74312,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNeutralCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68254,9 +74345,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -68266,16 +74358,21 @@ new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68285,28 +74382,29 @@ new MTRInt32sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTotalActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68317,9 +74415,10 @@ new MTRInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTotalReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -68329,17 +74428,21 @@ new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68349,28 +74452,29 @@ new MTRInt32sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTotalReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68381,9 +74485,10 @@ new MTRInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTotalApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -68393,17 +74498,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68413,28 +74522,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTotalApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68445,10 +74555,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -68458,17 +74568,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68478,28 +74593,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasured1stHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68510,10 +74626,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -68523,17 +74639,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68543,28 +74664,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasured3rdHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68575,10 +74697,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -68588,17 +74710,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68608,28 +74735,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasured5thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68640,10 +74768,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -68653,17 +74781,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68673,28 +74806,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasured7thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68705,10 +74839,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -68718,17 +74852,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68738,28 +74877,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasured9thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68770,10 +74910,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -68783,17 +74923,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68803,28 +74948,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasured11thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68835,10 +74981,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -68848,18 +74994,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68869,29 +75019,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68902,10 +75052,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -68915,18 +75065,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -68936,29 +75090,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -68969,10 +75123,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -68982,18 +75136,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69003,29 +75161,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69036,10 +75194,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69049,18 +75207,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69070,29 +75232,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69103,10 +75265,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69116,18 +75278,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69137,29 +75303,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69170,10 +75336,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69183,18 +75349,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69204,29 +75374,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69237,9 +75407,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcFrequencyMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69249,17 +75420,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69269,28 +75445,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcFrequencyMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69301,9 +75478,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcFrequencyDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69313,17 +75491,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69333,28 +75515,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcFrequencyDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69365,9 +75548,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69377,16 +75561,21 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69396,28 +75585,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69428,9 +75618,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerDivisorWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69440,16 +75631,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69459,27 +75654,29 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69490,10 +75687,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69503,17 +75700,22 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69523,28 +75725,29 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69555,10 +75758,10 @@ new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69568,18 +75771,22 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69589,28 +75796,29 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePhaseHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69621,9 +75829,10 @@ new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstantaneousVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69633,17 +75842,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69653,28 +75867,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInstantaneousVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69685,10 +75900,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstantaneousLineCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69698,17 +75913,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69718,28 +75938,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInstantaneousLineCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69750,10 +75971,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69763,17 +75984,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69783,28 +76009,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInstantaneousActiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69815,10 +76042,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69828,18 +76055,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69849,28 +76080,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInstantaneousReactiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69881,9 +76113,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstantaneousPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69893,17 +76126,21 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69913,28 +76150,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInstantaneousPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -69945,9 +76183,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -69957,16 +76196,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -69976,27 +76219,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70007,9 +76251,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70019,16 +76264,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70038,27 +76288,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70069,9 +76321,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70081,16 +76334,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70100,27 +76358,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70131,9 +76391,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70143,16 +76404,20 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70162,27 +76427,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70193,9 +76459,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70205,16 +76472,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70224,27 +76496,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70255,9 +76529,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70267,16 +76542,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70286,27 +76566,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70317,9 +76599,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActivePowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70329,16 +76612,20 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70348,27 +76635,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70379,9 +76668,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70391,16 +76681,21 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70410,27 +76705,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActivePowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70441,9 +76738,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70453,16 +76751,21 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70472,27 +76775,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActivePowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70503,9 +76808,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReactivePowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70515,16 +76821,21 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70534,27 +76845,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70565,9 +76878,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeApparentPowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70577,16 +76891,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70596,27 +76915,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70627,9 +76948,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerFactorWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70639,16 +76961,20 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70658,27 +76984,29 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePowerFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70689,10 +77017,10 @@ new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70703,13 +77031,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -70718,7 +77048,7 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _N new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -70741,18 +77071,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70762,29 +77096,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70795,10 +77129,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70808,13 +77142,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -70823,7 +77160,7 @@ - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnul new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -70846,18 +77183,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70867,28 +77208,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAverageRmsUnderVoltageCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -70899,10 +77241,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -70912,13 +77254,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -70927,7 +77272,7 @@ - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -70950,17 +77295,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -70970,28 +77320,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsExtremeOverVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71002,10 +77353,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -71015,13 +77366,16 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -71030,7 +77384,7 @@ - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -71053,18 +77407,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71074,28 +77432,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsExtremeUnderVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71106,9 +77465,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -71118,13 +77478,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -71133,7 +77493,7 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -71156,17 +77516,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71176,28 +77541,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageSagPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71208,9 +77574,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -71220,13 +77587,14 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -71235,7 +77603,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -71258,17 +77626,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71278,28 +77651,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageSwellPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71310,9 +77684,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -71322,17 +77697,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71342,28 +77722,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71374,9 +77755,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -71386,16 +77768,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71405,28 +77792,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71437,9 +77825,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -71449,17 +77838,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71469,28 +77863,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71501,9 +77896,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -71513,16 +77909,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71532,28 +77933,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71564,9 +77966,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -71576,16 +77979,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71595,28 +78003,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71627,9 +78036,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -71639,16 +78049,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71658,27 +78073,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71689,9 +78106,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -71701,13 +78119,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -71716,7 +78134,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -71739,17 +78157,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71759,28 +78181,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71791,9 +78214,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -71803,16 +78227,21 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71822,28 +78251,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71854,9 +78284,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -71866,16 +78297,21 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71885,28 +78321,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -71917,9 +78354,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -71929,13 +78367,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -71944,7 +78382,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -71967,17 +78405,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -71987,28 +78430,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72019,9 +78463,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -72031,16 +78476,21 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72050,28 +78500,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72082,9 +78533,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -72094,16 +78546,21 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72113,28 +78570,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72145,9 +78603,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcActivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -72157,17 +78616,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72177,28 +78641,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcActivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72209,10 +78674,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcReactivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -72222,17 +78687,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72242,28 +78712,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcReactivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72274,9 +78745,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageRmsOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -72286,17 +78758,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72306,28 +78783,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAverageRmsOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72338,10 +78816,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -72351,17 +78829,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72371,28 +78854,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAverageRmsUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72403,9 +78887,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -72415,17 +78900,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72435,28 +78925,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsExtremeOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72467,10 +78958,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -72480,17 +78971,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72500,28 +78996,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsExtremeUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72532,9 +79029,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageSagWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -72544,16 +79042,21 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72563,27 +79066,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageSagWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72594,9 +79099,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageSwellWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -72606,16 +79112,21 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72625,28 +79136,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageSwellWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72657,9 +79169,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLineCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -72669,16 +79182,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72688,28 +79206,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLineCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72720,9 +79239,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -72732,17 +79252,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72752,28 +79277,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72784,9 +79310,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -72796,17 +79323,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72816,28 +79348,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeReactiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72848,9 +79381,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltagePhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -72860,16 +79394,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72879,28 +79418,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltagePhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72911,9 +79451,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -72923,17 +79464,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -72943,28 +79489,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -72975,9 +79522,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -72987,17 +79535,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73007,28 +79560,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73039,9 +79593,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73051,16 +79606,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73070,28 +79630,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73102,9 +79663,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73114,17 +79676,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73134,28 +79701,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsCurrentMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73166,9 +79734,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73178,17 +79747,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73198,28 +79772,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsCurrentMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73230,9 +79805,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73242,16 +79818,21 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73261,28 +79842,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73293,9 +79875,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActivePowerMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73305,17 +79888,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73325,28 +79913,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActivePowerMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73357,9 +79946,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73369,17 +79959,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73389,28 +79984,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActivePowerMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73421,9 +80017,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReactivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73433,17 +80030,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73453,28 +80055,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeReactivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73485,9 +80088,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeApparentPowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73497,17 +80101,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73517,28 +80126,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeApparentPowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73549,9 +80159,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerFactorPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -73561,16 +80172,21 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73580,28 +80196,29 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePowerFactorPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73612,10 +80229,10 @@ new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73625,18 +80242,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73646,29 +80267,30 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73679,10 +80301,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73692,18 +80314,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73713,29 +80339,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73746,10 +80372,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73759,18 +80385,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73780,29 +80410,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73813,10 +80443,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73826,18 +80456,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73847,29 +80481,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73880,10 +80514,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73893,18 +80527,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73914,29 +80552,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -73947,10 +80585,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -73960,17 +80598,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -73980,28 +80623,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageSagPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74012,10 +80656,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74025,17 +80669,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74045,28 +80694,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74077,9 +80727,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLineCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74089,16 +80740,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74108,28 +80764,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLineCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74140,9 +80797,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74152,17 +80810,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74172,28 +80835,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74204,9 +80868,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -74216,17 +80881,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74236,28 +80906,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeReactiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74268,9 +80939,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltagePhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -74280,16 +80952,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74299,28 +80976,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltagePhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74331,9 +81009,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -74343,17 +81022,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74363,28 +81047,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74395,9 +81080,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74407,17 +81093,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74427,28 +81118,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74459,9 +81151,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74471,16 +81164,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74490,28 +81188,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74522,9 +81221,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74534,17 +81234,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74554,28 +81259,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsCurrentMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74586,9 +81292,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74598,17 +81305,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74618,28 +81330,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsCurrentMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74650,9 +81363,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74662,16 +81376,21 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74681,28 +81400,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74713,9 +81433,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActivePowerMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74725,17 +81446,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74745,28 +81471,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActivePowerMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74777,9 +81504,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74789,17 +81517,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74809,28 +81542,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeActivePowerMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74841,9 +81575,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReactivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74853,17 +81588,22 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74873,28 +81613,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeReactivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74905,9 +81646,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeApparentPowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74917,17 +81659,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -74937,28 +81684,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeApparentPowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -74969,9 +81717,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -74981,16 +81730,21 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75000,28 +81754,29 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributePowerFactorPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75032,10 +81787,10 @@ new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -75045,18 +81800,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75066,29 +81825,30 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75099,10 +81859,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -75112,18 +81872,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75133,29 +81897,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75166,10 +81930,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -75179,18 +81943,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75200,29 +81968,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75233,10 +82001,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -75246,18 +82014,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75267,29 +82039,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75300,10 +82072,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -75313,18 +82085,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75334,29 +82110,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75367,10 +82143,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -75380,17 +82156,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75400,28 +82181,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageSagPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75432,10 +82214,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -75445,17 +82227,22 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75465,28 +82252,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75497,9 +82285,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -75509,17 +82298,22 @@ new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(self }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75529,29 +82323,30 @@ new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptio chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75562,9 +82357,10 @@ new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -75574,17 +82370,22 @@ new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(self. }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75594,29 +82395,30 @@ new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscription chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75627,9 +82429,10 @@ new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -75639,16 +82442,20 @@ new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(self.callba }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75658,28 +82465,30 @@ new MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75690,9 +82499,10 @@ new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -75702,16 +82512,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75721,27 +82535,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75752,9 +82567,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -75764,16 +82580,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -75783,28 +82604,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -75819,7 +82641,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, @implementation MTRBaseClusterTestCluster -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { @@ -75827,23 +82649,23 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(NSNumber *)endp } _device = device; - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; } return self; } -- (void)testWithCompletion:(MTRStatusCompletion)completion +- (void)testWithCompletionHandler:(StatusCompletion)completionHandler { - [self testWithParams:nil completion:completion]; + [self testWithParams:nil completionHandler:completionHandler]; } -- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)testWithParams:(MTRTestClusterClusterTestParams * _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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -75862,19 +82684,19 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)testNotHandledWithCompletion:(MTRStatusCompletion)completion +- (void)testNotHandledWithCompletionHandler:(StatusCompletion)completionHandler { - [self testNotHandledWithParams:nil completion:completion]; + [self testNotHandledWithParams:nil completionHandler:completionHandler]; } - (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -75893,18 +82715,18 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)testSpecificWithCompletion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)testSpecificWithCompletionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self testSpecificWithParams:nil completion:completion]; + [self testSpecificWithParams:nil completionHandler:completionHandler]; } - (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params - completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -75922,19 +82744,19 @@ new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, }); } -- (void)testUnknownCommandWithCompletion:(MTRStatusCompletion)completion +- (void)testUnknownCommandWithCompletionHandler:(StatusCompletion)completionHandler { - [self testUnknownCommandWithParams:nil completion:completion]; + [self testUnknownCommandWithParams:nil completionHandler:completionHandler]; } - (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -75954,12 +82776,12 @@ new MTRCommandSuccessCallbackBridge( } - (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params - completion:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -75980,12 +82802,12 @@ new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQue } - (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params - completion:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -76005,13 +82827,13 @@ new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQ } - (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params - completion: - (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -76240,12 +83062,12 @@ new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.call } - (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -76272,12 +83094,12 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self. } - (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -76306,12 +83128,12 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self. } - (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -76361,12 +83183,12 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self. } - (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -76407,12 +83229,12 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self. } - (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -76539,12 +83361,12 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self. - (void)testListNestedStructListArgumentRequestWithParams: (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -76695,12 +83517,12 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self. } - (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params - completion:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -76741,12 +83563,12 @@ new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbac } - (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params - completion:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -76767,12 +83589,12 @@ new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, sel } - (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params - completion:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -76802,14 +83624,13 @@ new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbac } - (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params - completion: - (void (^)( - MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -76997,12 +83818,12 @@ new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self. } - (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params - completion:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -77028,19 +83849,19 @@ new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, }); } -- (void)timedInvokeRequestWithCompletion:(MTRStatusCompletion)completion +- (void)timedInvokeRequestWithCompletionHandler:(StatusCompletion)completionHandler { - [self timedInvokeRequestWithParams:nil completion:completion]; + [self timedInvokeRequestWithParams:nil completionHandler:completionHandler]; } - (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -77063,14 +83884,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params - completion:(MTRStatusCompletion)completion + 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) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -77096,12 +83917,12 @@ new MTRCommandSuccessCallbackBridge( } - (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params - completion:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -77122,16 +83943,15 @@ new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQu }); } -- (void) - testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params - completion: - (void (^)( - MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params + completionHandler: + (void (^)( + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -77150,9 +83970,9 @@ new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(sel }); } -- (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -77162,13 +83982,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBooleanWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -77177,7 +83997,7 @@ - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -77200,16 +84020,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77219,27 +84043,28 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -77250,9 +84075,9 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterBitmap8AttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterBitmap8AttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -77262,13 +84087,13 @@ new MTRTestClusterBitmap8AttributeCallbackBridge(self.callbackQueue, self.device }); } -- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBitmap8WithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBitmap8WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -77277,7 +84102,7 @@ - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -77300,16 +84125,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77319,27 +84148,28 @@ new MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBitmap8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterBitmap8AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRTestClusterBitmap8AttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -77350,9 +84180,10 @@ new MTRTestClusterBitmap8AttributeCallbackBridge(queue, completion, ^(Cancelable }); } -- (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBitmap16WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterBitmap16AttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterBitmap16AttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -77362,13 +84193,13 @@ new MTRTestClusterBitmap16AttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBitmap16WithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBitmap16WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -77377,7 +84208,7 @@ - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -77400,16 +84231,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77419,27 +84254,28 @@ new MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBitmap16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterBitmap16AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRTestClusterBitmap16AttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -77450,9 +84286,10 @@ new MTRTestClusterBitmap16AttributeCallbackBridge(queue, completion, ^(Cancelabl }); } -- (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBitmap32WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterBitmap32AttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterBitmap32AttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -77462,13 +84299,13 @@ new MTRTestClusterBitmap32AttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBitmap32WithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBitmap32WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -77477,7 +84314,7 @@ - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -77500,16 +84337,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77519,27 +84360,28 @@ new MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBitmap32WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterBitmap32AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRTestClusterBitmap32AttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -77550,9 +84392,10 @@ new MTRTestClusterBitmap32AttributeCallbackBridge(queue, completion, ^(Cancelabl }); } -- (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBitmap64WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterBitmap64AttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRTestClusterBitmap64AttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -77562,13 +84405,13 @@ new MTRTestClusterBitmap64AttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBitmap64WithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeBitmap64WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -77577,7 +84420,7 @@ - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -77600,16 +84443,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77619,27 +84466,28 @@ new MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeBitmap64WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterBitmap64AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRTestClusterBitmap64AttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -77650,9 +84498,9 @@ new MTRTestClusterBitmap64AttributeCallbackBridge(queue, completion, ^(Cancelabl }); } -- (void)readAttributeInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -77662,13 +84510,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt8uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt8uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -77677,7 +84525,7 @@ - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -77700,16 +84548,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77719,27 +84571,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -77750,9 +84603,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -77762,13 +84615,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt16uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt16uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -77777,7 +84630,7 @@ - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -77800,16 +84653,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77819,27 +84676,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -77850,9 +84708,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -77862,13 +84720,13 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt24uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt24uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -77877,7 +84735,7 @@ - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -77900,16 +84758,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -77919,27 +84781,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt24uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -77950,9 +84813,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -77962,13 +84825,13 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt32uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt32uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -77977,7 +84840,7 @@ - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -78000,16 +84863,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78019,27 +84886,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt32uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -78050,9 +84918,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -78062,13 +84930,13 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt40uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt40uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -78077,7 +84945,7 @@ - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -78100,16 +84968,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78119,27 +84991,28 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt40uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -78150,9 +85023,9 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -78162,13 +85035,13 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt48uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt48uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -78177,7 +85050,7 @@ - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -78200,16 +85073,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78219,27 +85096,28 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt48uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -78250,9 +85128,9 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -78262,13 +85140,13 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt56uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt56uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -78277,7 +85155,7 @@ - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -78300,16 +85178,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78319,27 +85201,28 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt56uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -78350,9 +85233,9 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -78362,13 +85245,13 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt64uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt64uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -78377,7 +85260,7 @@ - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -78400,16 +85283,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78419,27 +85306,28 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt64uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -78450,9 +85338,9 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -78462,13 +85350,13 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt8sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt8sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -78477,7 +85365,7 @@ - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -78500,16 +85388,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78519,27 +85411,28 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -78550,9 +85443,9 @@ new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -78562,13 +85455,13 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt16sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt16sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -78577,7 +85470,7 @@ - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -78600,16 +85493,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78619,27 +85516,28 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -78650,9 +85548,9 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -78662,13 +85560,13 @@ new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt24sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt24sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -78677,7 +85575,7 @@ - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -78700,16 +85598,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78719,27 +85621,28 @@ new MTRInt32sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt24sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -78750,9 +85653,9 @@ new MTRInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -78762,13 +85665,13 @@ new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt32sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt32sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -78777,7 +85680,7 @@ - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -78800,16 +85703,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78819,27 +85726,28 @@ new MTRInt32sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt32sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -78850,9 +85758,9 @@ new MTRInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -78862,13 +85770,13 @@ new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt40sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt40sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -78877,7 +85785,7 @@ - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -78900,16 +85808,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -78919,27 +85831,28 @@ new MTRInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt40sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -78950,9 +85863,9 @@ new MTRInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -78962,13 +85875,13 @@ new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt48sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt48sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -78977,7 +85890,7 @@ - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -79000,16 +85913,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79019,27 +85936,28 @@ new MTRInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt48sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -79050,9 +85968,9 @@ new MTRInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -79062,13 +85980,13 @@ new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt56sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt56sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -79077,7 +85995,7 @@ - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -79100,16 +86018,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79119,27 +86041,28 @@ new MTRInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt56sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -79150,9 +86073,9 @@ new MTRInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -79162,13 +86085,13 @@ new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt64sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInt64sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -79177,7 +86100,7 @@ - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -79200,16 +86123,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79219,27 +86146,28 @@ new MTRInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeInt64sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -79250,9 +86178,9 @@ new MTRInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -79262,13 +86190,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEnum8WithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeEnum8WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -79277,7 +86205,7 @@ - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -79300,16 +86228,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79319,27 +86251,28 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEnum8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -79350,9 +86283,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -79362,13 +86295,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEnum16WithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeEnum16WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -79377,7 +86310,7 @@ - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -79400,16 +86333,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79419,27 +86356,28 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEnum16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -79450,9 +86388,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFloatSingleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFloatAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -79462,13 +86401,13 @@ new MTRFloatAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -79477,7 +86416,7 @@ - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -79500,16 +86439,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRFloatAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79519,27 +86462,29 @@ new MTRFloatAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFloatSingleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFloatAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -79550,9 +86495,10 @@ new MTRFloatAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFloatDoubleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoubleAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -79562,13 +86508,13 @@ new MTRDoubleAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -79577,7 +86523,7 @@ - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -79600,16 +86546,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRDoubleAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79619,27 +86569,29 @@ new MTRDoubleAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFloatDoubleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoubleAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -79650,9 +86602,10 @@ new MTRDoubleAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOctetStringWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -79662,13 +86615,13 @@ new MTROctetStringAttributeCallbackBridge(self.callbackQueue, self.device, compl }); } -- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOctetStringWithValue:(NSData * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOctetStringWithValue:(NSData * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -79677,7 +86630,7 @@ - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -79700,16 +86653,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTROctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79719,27 +86676,28 @@ new MTROctetStringAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -79750,9 +86708,10 @@ new MTROctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succ }); } -- (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeListInt8uWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListInt8uListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -79762,13 +86721,13 @@ new MTRTestClusterListInt8uListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeListInt8uWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeListInt8uWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -79777,7 +86736,7 @@ - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -79821,16 +86780,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79840,27 +86803,28 @@ new MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeListInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListInt8uListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -79871,9 +86835,10 @@ new MTRTestClusterListInt8uListAttributeCallbackBridge(queue, completion, ^(Canc }); } -- (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeListOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterListOctetStringListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -79883,13 +86848,13 @@ new MTRTestClusterListOctetStringListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeListOctetStringWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeListOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -79898,7 +86863,7 @@ - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -79942,16 +86907,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -79961,40 +86931,44 @@ new MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeListOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListOctetStringListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeListStructOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterListStructOctetStringListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -80004,13 +86978,13 @@ new MTRTestClusterListStructOctetStringListAttributeCallbackBridge(self.callback }); } -- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -80019,7 +86993,7 @@ - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -80064,17 +87038,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80084,29 +87063,30 @@ new MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeListStructOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeListStructOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterListStructOctetStringListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -80117,9 +87097,10 @@ new MTRTestClusterListStructOctetStringListAttributeCallbackBridge( }); } -- (void)readAttributeLongOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLongOctetStringWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -80129,13 +87110,13 @@ new MTROctetStringAttributeCallbackBridge(self.callbackQueue, self.device, compl }); } -- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLongOctetStringWithValue:(NSData * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLongOctetStringWithValue:(NSData * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -80144,7 +87125,7 @@ - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -80167,16 +87148,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTROctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80186,27 +87172,29 @@ new MTROctetStringAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLongOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -80217,9 +87205,10 @@ new MTROctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succ }); } -- (void)readAttributeCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCharStringWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -80229,13 +87218,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeCharStringWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeCharStringWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -80244,7 +87233,7 @@ - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -80267,16 +87256,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80286,27 +87279,28 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeCharStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -80317,9 +87311,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeLongCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLongCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -80329,13 +87324,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLongCharStringWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLongCharStringWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -80344,7 +87339,7 @@ - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -80367,16 +87362,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80386,27 +87386,29 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeLongCharStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLongCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -80417,9 +87419,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * succe }); } -- (void)readAttributeEpochUsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEpochUsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -80429,13 +87431,13 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEpochUsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeEpochUsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -80444,7 +87446,7 @@ - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -80467,16 +87469,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80486,27 +87492,28 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEpochUsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEpochUsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -80517,9 +87524,9 @@ new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeEpochSWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEpochSWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -80529,13 +87536,13 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEpochSWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeEpochSWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -80544,7 +87551,7 @@ - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -80567,16 +87574,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80586,27 +87597,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEpochSWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEpochSWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -80617,9 +87629,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVendorIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -80629,13 +87642,13 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completi }); } -- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeVendorIdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeVendorIdWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -80644,7 +87657,7 @@ - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -80667,16 +87680,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeVendorIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80686,27 +87703,28 @@ new MTRVendorIdAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeVendorIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRVendorIdAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -80717,10 +87735,10 @@ new MTRVendorIdAttributeCallbackBridge(queue, completion, ^(Cancelable * success }); } -- (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeListNullablesAndOptionalsStructWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -80730,13 +87748,16 @@ new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(sel }); } -- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -80745,7 +87766,7 @@ - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -80961,18 +87982,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -80982,30 +88007,30 @@ new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscripti chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.fabricFiltered, params.keepPreviousSubscriptions); + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeListNullablesAndOptionalsStructWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -81016,9 +88041,10 @@ new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge( }); } -- (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnumAttrWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -81028,13 +88054,13 @@ new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -81043,7 +88069,7 @@ - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -81066,16 +88092,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -81085,41 +88115,43 @@ new MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeEnumAttrWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeStructAttrWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeStructAttrWithCompletionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterStructAttrStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -81130,13 +88162,15 @@ new MTRTestClusterStructAttrStructAttributeCallbackBridge(self.callbackQueue, se } - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull) value params:nil completion:completion]; + [self writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -81145,7 +88179,7 @@ - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _ new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -81175,17 +88209,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -81195,41 +88233,44 @@ new MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeStructAttrWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterStructAttrStructAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -81239,13 +88280,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -81254,7 +88295,7 @@ - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -81277,17 +88318,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -81297,28 +88343,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRangeRestrictedInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -81329,9 +88376,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -81341,13 +88389,13 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -81356,7 +88404,7 @@ - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -81379,17 +88427,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -81399,28 +88452,29 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRangeRestrictedInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -81431,9 +88485,10 @@ new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -81443,13 +88498,14 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -81458,7 +88514,7 @@ - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -81481,17 +88537,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -81501,28 +88562,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRangeRestrictedInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -81533,9 +88595,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -81545,13 +88608,14 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -81560,7 +88624,7 @@ - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -81583,17 +88647,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -81603,28 +88672,29 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeRangeRestrictedInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -81635,9 +88705,10 @@ new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeListLongOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterListLongOctetStringListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -81647,13 +88718,13 @@ new MTRTestClusterListLongOctetStringListAttributeCallbackBridge(self.callbackQu }); } -- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -81662,7 +88733,7 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -81706,17 +88777,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -81726,29 +88802,30 @@ new MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeListLongOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeListLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterListLongOctetStringListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -81760,27 +88837,27 @@ new MTRTestClusterListLongOctetStringListAttributeCallbackBridge( } - (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + 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, completion, + 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.fabricFiltered); + 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 +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -81789,7 +88866,7 @@ - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -81889,16 +88966,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -81908,41 +88990,44 @@ new MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeListFabricScopedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeListFabricScopedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListFabricScopedListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeTimedWriteBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTimedWriteBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -81952,13 +89037,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -81967,7 +89052,7 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -81990,16 +89075,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82009,28 +89099,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeTimedWriteBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTimedWriteBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -82041,9 +89132,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeGeneralErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneralErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -82053,13 +89145,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -82068,7 +89160,7 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -82091,17 +89183,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82111,28 +89208,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneralErrorBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneralErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -82143,9 +89241,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -82155,13 +89254,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -82170,7 +89269,7 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -82193,17 +89292,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82213,28 +89317,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterErrorBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -82245,9 +89350,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeUnsupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnsupportedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -82257,13 +89363,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -82272,7 +89378,7 @@ - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -82295,16 +89401,20 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82314,27 +89424,29 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeUnsupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnsupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -82345,9 +89457,10 @@ new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -82357,13 +89470,13 @@ new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, c }); } -- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -82372,7 +89485,7 @@ - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -82400,16 +89513,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82419,28 +89537,29 @@ new MTRNullableBooleanAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -82451,9 +89570,10 @@ new MTRNullableBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * }); } -- (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap8AttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -82463,13 +89583,13 @@ new MTRTestClusterNullableBitmap8AttributeCallbackBridge(self.callbackQueue, sel }); } -- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -82478,7 +89598,7 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -82506,16 +89626,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82525,41 +89650,44 @@ new MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableBitmap8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap8AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableBitmap16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap16AttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -82569,13 +89697,13 @@ new MTRTestClusterNullableBitmap16AttributeCallbackBridge(self.callbackQueue, se }); } -- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -82584,7 +89712,7 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -82612,16 +89740,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82631,41 +89764,44 @@ new MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableBitmap16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap16AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableBitmap32WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap32AttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -82675,13 +89811,13 @@ new MTRTestClusterNullableBitmap32AttributeCallbackBridge(self.callbackQueue, se }); } -- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -82690,7 +89826,7 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -82718,16 +89854,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82737,41 +89878,44 @@ new MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableBitmap32WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap32AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableBitmap64WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap64AttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -82781,13 +89925,13 @@ new MTRTestClusterNullableBitmap64AttributeCallbackBridge(self.callbackQueue, se }); } -- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -82796,7 +89940,7 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -82824,16 +89968,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82843,41 +89992,44 @@ new MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableBitmap64WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap64AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNullableInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt8uWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -82887,13 +90039,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -82902,7 +90054,7 @@ - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -82930,16 +90082,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -82949,27 +90106,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -82980,9 +90139,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeNullableInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -82992,13 +90152,13 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -83007,7 +90167,7 @@ - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -83035,16 +90195,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83054,27 +90219,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -83085,9 +90252,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -83097,13 +90265,13 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -83112,7 +90280,7 @@ - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -83140,16 +90308,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83159,27 +90332,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt24uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -83190,9 +90365,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -83202,13 +90378,13 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -83217,7 +90393,7 @@ - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -83245,16 +90421,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83264,27 +90445,29 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt32uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -83295,9 +90478,10 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -83307,13 +90491,13 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -83322,7 +90506,7 @@ - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -83350,16 +90534,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83369,27 +90558,29 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt40uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -83400,9 +90591,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -83412,13 +90604,13 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -83427,7 +90619,7 @@ - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -83455,16 +90647,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83474,27 +90671,29 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt48uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -83505,9 +90704,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -83517,13 +90717,13 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -83532,7 +90732,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -83560,16 +90760,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83579,27 +90784,29 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt56uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -83610,9 +90817,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -83622,13 +90830,13 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -83637,7 +90845,7 @@ - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -83665,16 +90873,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83684,27 +90897,29 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt64uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -83715,9 +90930,10 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt8sWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -83727,13 +90943,13 @@ new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -83742,7 +90958,7 @@ - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -83770,16 +90986,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83789,27 +91010,29 @@ new MTRNullableInt8sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -83820,9 +91043,10 @@ new MTRNullableInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeNullableInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -83832,13 +91056,13 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -83847,7 +91071,7 @@ - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -83875,16 +91099,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83894,27 +91123,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -83925,9 +91156,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -83937,13 +91169,13 @@ new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -83952,7 +91184,7 @@ - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -83980,16 +91212,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -83999,27 +91236,29 @@ new MTRNullableInt32sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt24sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -84030,9 +91269,10 @@ new MTRNullableInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -84042,13 +91282,13 @@ new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -84057,7 +91297,7 @@ - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -84085,16 +91325,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84104,27 +91349,29 @@ new MTRNullableInt32sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt32sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -84135,9 +91382,10 @@ new MTRNullableInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -84147,13 +91395,13 @@ new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -84162,7 +91410,7 @@ - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -84190,16 +91438,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84209,27 +91462,29 @@ new MTRNullableInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt40sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -84240,9 +91495,10 @@ new MTRNullableInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -84252,13 +91508,13 @@ new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -84267,7 +91523,7 @@ - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -84295,16 +91551,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84314,27 +91575,29 @@ new MTRNullableInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt48sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -84345,9 +91608,10 @@ new MTRNullableInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -84357,13 +91621,13 @@ new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -84372,7 +91636,7 @@ - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -84400,16 +91664,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84419,27 +91688,29 @@ new MTRNullableInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt56sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -84450,9 +91721,10 @@ new MTRNullableInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -84462,13 +91734,13 @@ new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -84477,7 +91749,7 @@ - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -84505,16 +91777,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84524,27 +91801,29 @@ new MTRNullableInt64sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt64sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -84555,9 +91834,10 @@ new MTRNullableInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableEnum8WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -84567,13 +91847,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -84582,7 +91862,7 @@ - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -84610,16 +91890,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84629,27 +91914,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableEnum8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -84660,9 +91947,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeNullableEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -84672,13 +91960,13 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -84687,7 +91975,7 @@ - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -84715,16 +92003,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84734,27 +92027,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableEnum16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -84765,9 +92060,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableFloatSingleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableFloatAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -84777,13 +92073,13 @@ new MTRNullableFloatAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -84792,7 +92088,7 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -84820,17 +92116,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableFloatAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84840,28 +92141,29 @@ new MTRNullableFloatAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableFloatSingleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableFloatAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -84872,9 +92174,10 @@ new MTRNullableFloatAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeNullableFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableFloatDoubleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableDoubleAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -84884,13 +92187,13 @@ new MTRNullableDoubleAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -84899,7 +92202,7 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -84927,17 +92230,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRNullableDoubleAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -84947,28 +92255,29 @@ new MTRNullableDoubleAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableFloatDoubleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableDoubleAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -84979,9 +92288,10 @@ new MTRNullableDoubleAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -84991,13 +92301,13 @@ new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.devic }); } -- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableOctetStringWithValue:(NSData * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableOctetStringWithValue:(NSData * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -85006,7 +92316,7 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -85034,16 +92344,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85053,28 +92369,29 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -85085,9 +92402,10 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelabl }); } -- (void)readAttributeNullableCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -85097,13 +92415,13 @@ new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, self.device }); } -- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableCharStringWithValue:(NSString * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableCharStringWithValue:(NSString * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -85112,7 +92430,7 @@ - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -85140,17 +92458,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85160,28 +92482,29 @@ new MTRNullableCharStringAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableCharStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -85192,9 +92515,10 @@ new MTRNullableCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable }); } -- (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNullableEnumAttrWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -85204,13 +92528,13 @@ new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(self.callback }); } -- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -85219,7 +92543,7 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -85247,16 +92571,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85266,29 +92595,30 @@ new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableEnumAttrWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNullableEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -85299,10 +92629,10 @@ new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge( }); } -- (void)readAttributeNullableStructWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeNullableStructWithCompletionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableStructStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -85313,15 +92643,15 @@ new MTRTestClusterNullableStructStructAttributeCallbackBridge(self.callbackQueue } - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable) value params:nil - completion:completion]; + completionHandler:completionHandler]; } - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -85330,7 +92660,7 @@ - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -85365,17 +92695,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85385,42 +92719,44 @@ new MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableStructWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableStructStructAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNullableRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -85430,13 +92766,16 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -85445,7 +92784,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullabl new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -85473,18 +92812,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85494,28 +92837,29 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableRangeRestrictedInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -85526,10 +92870,10 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeNullableRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -85539,13 +92883,16 @@ new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -85554,7 +92901,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullabl new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -85582,18 +92929,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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]; new MTRNullableInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85603,28 +92954,29 @@ new MTRNullableInt8sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableRangeRestrictedInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -85635,10 +92987,10 @@ new MTRNullableInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * su }); } -- (void)readAttributeNullableRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -85648,13 +93000,16 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -85663,7 +93018,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullab new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -85691,18 +93046,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85712,28 +93071,29 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableRangeRestrictedInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -85744,10 +93104,10 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeNullableRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -85757,13 +93117,16 @@ new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -85772,7 +93135,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullab new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -85800,18 +93163,22 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85821,28 +93188,29 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeNullableRangeRestrictedInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -85853,9 +93221,10 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * s }); } -- (void)readAttributeWriteOnlyInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWriteOnlyInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -85865,13 +93234,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, }); } -- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -85880,7 +93249,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -85903,16 +93272,21 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeWriteOnlyInt8uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85922,27 +93296,29 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeWriteOnlyInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWriteOnlyInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -85953,9 +93329,10 @@ new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, C }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -85965,17 +93342,22 @@ new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -85985,29 +93367,30 @@ new MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -86018,9 +93401,10 @@ new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -86030,17 +93414,22 @@ new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -86050,29 +93439,30 @@ new MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge( - queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -86083,9 +93473,10 @@ new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -86095,16 +93486,20 @@ new MTRTestClusterAttributeListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -86114,40 +93509,44 @@ new MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.fabricFiltered, params.keepPreviousSubscriptions); + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { - 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + 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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -86157,16 +93556,20 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))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 { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -86176,27 +93579,28 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); @@ -86207,9 +93611,10 @@ new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + 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); @@ -86219,16 +93624,21 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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]; new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (!params.autoResubscribe) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } @@ -86238,28 +93648,29 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.fabricFiltered, - params.keepPreviousSubscriptions); + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablished); + subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { - if (clusterStateCacheContainer.cppClusterStateCache) { + 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 = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_internal.h index 7bdd56dd3ec118..359f771f5b8910 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_internal.h @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import #import "MTRBaseClusters.h" @@ -82,12 +84,12 @@ @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end -@interface MTRBaseClusterOTASoftwareUpdateProvider () +@interface MTRBaseClusterOtaSoftwareUpdateProvider () @property (nonatomic, strong, readonly) MTRBaseDevice * device; @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end -@interface MTRBaseClusterOTASoftwareUpdateRequestor () +@interface MTRBaseClusterOtaSoftwareUpdateRequestor () @property (nonatomic, strong, readonly) MTRBaseDevice * device; @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @@ -277,7 +279,7 @@ @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end -@interface MTRBaseClusterWakeOnLAN () +@interface MTRBaseClusterWakeOnLan () @property (nonatomic, strong, readonly) MTRBaseDevice * device; @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index c2547565970663..25001f25f1f2a5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import "MTRCallbackBridge_internal.h" #import "MTRCommandPayloadsObjc.h" #import "MTRStructsObjc.h" @@ -2004,7 +2006,7 @@ } } -void MTRAccessControlACLListAttributeCallbackBridge::OnSuccessFn(void * context, +void MTRAccessControlAclListAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value) { @@ -2086,9 +2088,9 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlACLListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAccessControlAclListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -2627,7 +2629,7 @@ } } -void MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2650,10 +2652,10 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -2667,7 +2669,7 @@ } } -void MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2690,10 +2692,10 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -2707,7 +2709,7 @@ } } -void MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2730,9 +2732,9 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -2746,7 +2748,7 @@ } } -void MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge::OnSuccessFn(void * context, +void MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & value) { @@ -2756,8 +2758,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; - newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; + MTROtaSoftwareUpdateRequestorClusterProviderLocation * newElement_0; + newElement_0 = [MTROtaSoftwareUpdateRequestorClusterProviderLocation new]; newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; @@ -2773,10 +2775,10 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -2790,7 +2792,7 @@ } } -void MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2813,10 +2815,10 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -2830,7 +2832,7 @@ } } -void MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2853,10 +2855,10 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -2870,7 +2872,7 @@ } } -void MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2893,9 +2895,9 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -8669,7 +8671,7 @@ } } -void MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8692,9 +8694,9 @@ DispatchSuccess(context, objCValue); }; -void MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -8708,7 +8710,7 @@ } } -void MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8731,9 +8733,9 @@ DispatchSuccess(context, objCValue); }; -void MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -8747,7 +8749,7 @@ } } -void MTRWakeOnLANAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRWakeOnLanAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8770,9 +8772,9 @@ DispatchSuccess(context, objCValue); }; -void MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -11956,10 +11958,10 @@ DispatchSuccess(context, response); }; -void MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & data) { - auto * response = [MTROTASoftwareUpdateProviderClusterQueryImageResponseParams new]; + auto * response = [MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams new]; { response.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; } @@ -12020,10 +12022,10 @@ DispatchSuccess(context, response); }; -void MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & data) { - auto * response = [MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams new]; + auto * response = [MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams new]; { response.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.action)]; } @@ -14198,7 +14200,7 @@ } } -void MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAApplyUpdateAction value) { NSNumber * _Nonnull objCValue; @@ -14206,11 +14208,11 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { auto * self - = static_cast(context); + = static_cast(context); if (!self->mQueue) { return; } @@ -14224,7 +14226,7 @@ } } -void MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnSuccessFn(void * context, +void MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; @@ -14236,10 +14238,10 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { - auto * self = static_cast( + auto * self = static_cast( context); if (!self->mQueue) { return; @@ -14254,7 +14256,7 @@ } } -void MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTADownloadProtocol value) { NSNumber * _Nonnull objCValue; @@ -14262,10 +14264,10 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -14279,7 +14281,7 @@ } } -void MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnSuccessFn(void * context, +void MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; @@ -14291,11 +14293,11 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { auto * self - = static_cast(context); + = static_cast(context); if (!self->mQueue) { return; } @@ -14309,7 +14311,7 @@ } } -void MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAQueryStatus value) { NSNumber * _Nonnull objCValue; @@ -14317,9 +14319,9 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -14333,7 +14335,7 @@ } } -void MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnSuccessFn( +void MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; @@ -14345,11 +14347,11 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { auto * self - = static_cast(context); + = static_cast(context); if (!self->mQueue) { return; } @@ -14363,7 +14365,7 @@ } } -void MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAAnnouncementReason value) { NSNumber * _Nonnull objCValue; @@ -14371,11 +14373,11 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { auto * self - = static_cast(context); + = static_cast(context); if (!self->mQueue) { return; } @@ -14389,7 +14391,7 @@ } } -void MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnSuccessFn(void * context, +void MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; @@ -14401,11 +14403,11 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge:: +void MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished(void * context) { auto * self - = static_cast( + = static_cast( context); if (!self->mQueue) { return; @@ -14420,7 +14422,7 @@ } } -void MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum value) { NSNumber * _Nonnull objCValue; @@ -14428,11 +14430,11 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { auto * self - = static_cast(context); + = static_cast(context); if (!self->mQueue) { return; } @@ -14446,7 +14448,7 @@ } } -void MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnSuccessFn(void * context, +void MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; @@ -14458,10 +14460,10 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { - auto * self = static_cast( + auto * self = static_cast( context); if (!self->mQueue) { return; @@ -14476,7 +14478,7 @@ } } -void MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnSuccessFn( +void MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum value) { NSNumber * _Nonnull objCValue; @@ -14484,10 +14486,10 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -14501,7 +14503,7 @@ } } -void MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnSuccessFn(void * context, +void MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; @@ -14513,11 +14515,11 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( +void MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( void * context) { auto * self - = static_cast(context); + = static_cast(context); if (!self->mQueue) { return; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h index 5ea86586abad42..ce45a0b680191a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import "MTRCallbackBridgeBase_internal.h" #import @@ -55,9 +57,9 @@ typedef void (*ScenesClusterEnhancedViewSceneResponseCallbackType)( void *, const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType &); typedef void (*ScenesClusterCopySceneResponseCallbackType)( void *, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType &); -typedef void (*OTASoftwareUpdateProviderClusterQueryImageResponseCallbackType)( +typedef void (*OtaSoftwareUpdateProviderClusterQueryImageResponseCallbackType)( void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType &); -typedef void (*OTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackType)( +typedef void (*OtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackType)( void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType &); typedef void (*GeneralCommissioningClusterArmFailSafeResponseCallbackType)( void *, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType &); @@ -189,29 +191,29 @@ typedef void (*NullableActionsClusterActionTypeEnumAttributeCallback)( typedef void (*ActionsClusterEndpointListTypeEnumAttributeCallback)(void *, chip::app::Clusters::Actions::EndpointListTypeEnum); typedef void (*NullableActionsClusterEndpointListTypeEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*OTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallback)( +typedef void (*OtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallback)( void *, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAApplyUpdateAction); -typedef void (*NullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallback)( +typedef void (*NullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*OTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallback)( +typedef void (*OtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallback)( void *, chip::app::Clusters::OtaSoftwareUpdateProvider::OTADownloadProtocol); -typedef void (*NullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallback)( +typedef void (*NullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*OTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallback)( +typedef void (*OtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallback)( void *, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAQueryStatus); -typedef void (*NullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallback)( +typedef void (*NullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*OTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallback)( +typedef void (*OtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallback)( void *, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAAnnouncementReason); -typedef void (*NullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallback)( +typedef void (*NullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*OTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallback)( +typedef void (*OtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallback)( void *, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum); -typedef void (*NullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallback)( +typedef void (*NullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*OTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallback)( +typedef void (*OtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallback)( void *, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum); -typedef void (*NullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallback)( +typedef void (*NullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); typedef void (*TimeFormatLocalizationClusterCalendarTypeAttributeCallback)( void *, chip::app::Clusters::TimeFormatLocalization::CalendarType); @@ -600,7 +602,7 @@ typedef void (*BindingAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BindingAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AccessControlACLListAttributeCallback)( +typedef void (*AccessControlAclListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); @@ -633,21 +635,21 @@ typedef void (*BasicAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BasicAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OTASoftwareUpdateProviderGeneratedCommandListListAttributeCallback)( +typedef void (*OtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OTASoftwareUpdateProviderAcceptedCommandListListAttributeCallback)( +typedef void (*OtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OTASoftwareUpdateProviderAttributeListListAttributeCallback)( +typedef void (*OtaSoftwareUpdateProviderAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallback)( +typedef void (*OtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & data); -typedef void (*OTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallback)( +typedef void (*OtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallback)( +typedef void (*OtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OTASoftwareUpdateRequestorAttributeListListAttributeCallback)( +typedef void (*OtaSoftwareUpdateRequestorAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LocalizationConfigurationSupportedLocalesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); @@ -964,11 +966,11 @@ typedef void (*OccupancySensingAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OccupancySensingAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WakeOnLANGeneratedCommandListListAttributeCallback)( +typedef void (*WakeOnLanGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WakeOnLANAcceptedCommandListListAttributeCallback)( +typedef void (*WakeOnLanAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WakeOnLANAttributeListListAttributeCallback)(void * context, +typedef void (*WakeOnLanAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ChannelChannelListListAttributeCallback)( void * context, @@ -1170,13 +1172,13 @@ class MTROctetStringAttributeCallbackSubscriptionBridge : public MTROctetStringA public: MTROctetStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROctetStringAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROctetStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROctetStringAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1184,7 +1186,7 @@ class MTROctetStringAttributeCallbackSubscriptionBridge : public MTROctetStringA static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOctetStringAttributeCallbackBridge : public MTRCallbackBridge @@ -1212,14 +1214,14 @@ class MTRNullableOctetStringAttributeCallbackSubscriptionBridge : public MTRNull MTRNullableOctetStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableOctetStringAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableOctetStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableOctetStringAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1227,7 +1229,7 @@ class MTRNullableOctetStringAttributeCallbackSubscriptionBridge : public MTRNull static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRCharStringAttributeCallbackBridge : public MTRCallbackBridge @@ -1253,13 +1255,13 @@ class MTRCharStringAttributeCallbackSubscriptionBridge : public MTRCharStringAtt public: MTRCharStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRCharStringAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRCharStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRCharStringAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1267,7 +1269,7 @@ class MTRCharStringAttributeCallbackSubscriptionBridge : public MTRCharStringAtt static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableCharStringAttributeCallbackBridge : public MTRCallbackBridge @@ -1295,14 +1297,14 @@ class MTRNullableCharStringAttributeCallbackSubscriptionBridge : public MTRNulla MTRNullableCharStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableCharStringAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableCharStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableCharStringAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1310,7 +1312,7 @@ class MTRNullableCharStringAttributeCallbackSubscriptionBridge : public MTRNulla static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBooleanAttributeCallbackBridge : public MTRCallbackBridge @@ -1336,13 +1338,13 @@ class MTRBooleanAttributeCallbackSubscriptionBridge : public MTRBooleanAttribute public: MTRBooleanAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBooleanAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBooleanAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRBooleanAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1350,7 +1352,7 @@ class MTRBooleanAttributeCallbackSubscriptionBridge : public MTRBooleanAttribute static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableBooleanAttributeCallbackBridge : public MTRCallbackBridge @@ -1377,14 +1379,14 @@ class MTRNullableBooleanAttributeCallbackSubscriptionBridge : public MTRNullable MTRNullableBooleanAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableBooleanAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableBooleanAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableBooleanAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1392,7 +1394,7 @@ class MTRNullableBooleanAttributeCallbackSubscriptionBridge : public MTRNullable static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt8uAttributeCallbackBridge : public MTRCallbackBridge @@ -1418,13 +1420,13 @@ class MTRInt8uAttributeCallbackSubscriptionBridge : public MTRInt8uAttributeCall public: MTRInt8uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRInt8uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt8uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRInt8uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1432,7 +1434,7 @@ class MTRInt8uAttributeCallbackSubscriptionBridge : public MTRInt8uAttributeCall static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt8uAttributeCallbackBridge : public MTRCallbackBridge @@ -1458,15 +1460,13 @@ class MTRNullableInt8uAttributeCallbackSubscriptionBridge : public MTRNullableIn public: MTRNullableInt8uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt8uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt8uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt8uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1474,7 +1474,7 @@ class MTRNullableInt8uAttributeCallbackSubscriptionBridge : public MTRNullableIn static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt8sAttributeCallbackBridge : public MTRCallbackBridge @@ -1500,13 +1500,13 @@ class MTRInt8sAttributeCallbackSubscriptionBridge : public MTRInt8sAttributeCall public: MTRInt8sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRInt8sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt8sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRInt8sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1514,7 +1514,7 @@ class MTRInt8sAttributeCallbackSubscriptionBridge : public MTRInt8sAttributeCall static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt8sAttributeCallbackBridge : public MTRCallbackBridge @@ -1540,15 +1540,13 @@ class MTRNullableInt8sAttributeCallbackSubscriptionBridge : public MTRNullableIn public: MTRNullableInt8sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt8sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt8sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt8sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1556,7 +1554,7 @@ class MTRNullableInt8sAttributeCallbackSubscriptionBridge : public MTRNullableIn static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt16uAttributeCallbackBridge : public MTRCallbackBridge @@ -1582,13 +1580,13 @@ class MTRInt16uAttributeCallbackSubscriptionBridge : public MTRInt16uAttributeCa public: MTRInt16uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRInt16uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt16uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRInt16uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1596,7 +1594,7 @@ class MTRInt16uAttributeCallbackSubscriptionBridge : public MTRInt16uAttributeCa static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt16uAttributeCallbackBridge : public MTRCallbackBridge @@ -1622,15 +1620,13 @@ class MTRNullableInt16uAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt16uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt16uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt16uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt16uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1638,7 +1634,7 @@ class MTRNullableInt16uAttributeCallbackSubscriptionBridge : public MTRNullableI static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt16sAttributeCallbackBridge : public MTRCallbackBridge @@ -1664,13 +1660,13 @@ class MTRInt16sAttributeCallbackSubscriptionBridge : public MTRInt16sAttributeCa public: MTRInt16sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRInt16sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt16sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRInt16sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1678,7 +1674,7 @@ class MTRInt16sAttributeCallbackSubscriptionBridge : public MTRInt16sAttributeCa static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt16sAttributeCallbackBridge : public MTRCallbackBridge @@ -1704,15 +1700,13 @@ class MTRNullableInt16sAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt16sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt16sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt16sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt16sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1720,7 +1714,7 @@ class MTRNullableInt16sAttributeCallbackSubscriptionBridge : public MTRNullableI static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt32uAttributeCallbackBridge : public MTRCallbackBridge @@ -1746,13 +1740,13 @@ class MTRInt32uAttributeCallbackSubscriptionBridge : public MTRInt32uAttributeCa public: MTRInt32uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRInt32uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt32uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRInt32uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1760,7 +1754,7 @@ class MTRInt32uAttributeCallbackSubscriptionBridge : public MTRInt32uAttributeCa static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt32uAttributeCallbackBridge : public MTRCallbackBridge @@ -1786,15 +1780,13 @@ class MTRNullableInt32uAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt32uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt32uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt32uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt32uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1802,7 +1794,7 @@ class MTRNullableInt32uAttributeCallbackSubscriptionBridge : public MTRNullableI static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt32sAttributeCallbackBridge : public MTRCallbackBridge @@ -1828,13 +1820,13 @@ class MTRInt32sAttributeCallbackSubscriptionBridge : public MTRInt32sAttributeCa public: MTRInt32sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRInt32sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt32sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRInt32sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1842,7 +1834,7 @@ class MTRInt32sAttributeCallbackSubscriptionBridge : public MTRInt32sAttributeCa static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt32sAttributeCallbackBridge : public MTRCallbackBridge @@ -1868,15 +1860,13 @@ class MTRNullableInt32sAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt32sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt32sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt32sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt32sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1884,7 +1874,7 @@ class MTRNullableInt32sAttributeCallbackSubscriptionBridge : public MTRNullableI static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt64uAttributeCallbackBridge : public MTRCallbackBridge @@ -1910,13 +1900,13 @@ class MTRInt64uAttributeCallbackSubscriptionBridge : public MTRInt64uAttributeCa public: MTRInt64uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRInt64uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt64uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRInt64uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1924,7 +1914,7 @@ class MTRInt64uAttributeCallbackSubscriptionBridge : public MTRInt64uAttributeCa static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt64uAttributeCallbackBridge : public MTRCallbackBridge @@ -1950,15 +1940,13 @@ class MTRNullableInt64uAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt64uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt64uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt64uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt64uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1966,7 +1954,7 @@ class MTRNullableInt64uAttributeCallbackSubscriptionBridge : public MTRNullableI static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt64sAttributeCallbackBridge : public MTRCallbackBridge @@ -1992,13 +1980,13 @@ class MTRInt64sAttributeCallbackSubscriptionBridge : public MTRInt64sAttributeCa public: MTRInt64sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRInt64sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt64sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRInt64sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2006,7 +1994,7 @@ class MTRInt64sAttributeCallbackSubscriptionBridge : public MTRInt64sAttributeCa static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt64sAttributeCallbackBridge : public MTRCallbackBridge @@ -2032,15 +2020,13 @@ class MTRNullableInt64sAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt64sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt64sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt64sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableInt64sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2048,7 +2034,7 @@ class MTRNullableInt64sAttributeCallbackSubscriptionBridge : public MTRNullableI static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFloatAttributeCallbackBridge : public MTRCallbackBridge @@ -2074,13 +2060,13 @@ class MTRFloatAttributeCallbackSubscriptionBridge : public MTRFloatAttributeCall public: MTRFloatAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFloatAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFloatAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRFloatAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2088,7 +2074,7 @@ class MTRFloatAttributeCallbackSubscriptionBridge : public MTRFloatAttributeCall static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableFloatAttributeCallbackBridge : public MTRCallbackBridge @@ -2114,15 +2100,13 @@ class MTRNullableFloatAttributeCallbackSubscriptionBridge : public MTRNullableFl public: MTRNullableFloatAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableFloatAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableFloatAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableFloatAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2130,7 +2114,7 @@ class MTRNullableFloatAttributeCallbackSubscriptionBridge : public MTRNullableFl static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoubleAttributeCallbackBridge : public MTRCallbackBridge @@ -2156,13 +2140,13 @@ class MTRDoubleAttributeCallbackSubscriptionBridge : public MTRDoubleAttributeCa public: MTRDoubleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoubleAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoubleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRDoubleAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2170,7 +2154,7 @@ class MTRDoubleAttributeCallbackSubscriptionBridge : public MTRDoubleAttributeCa static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoubleAttributeCallbackBridge : public MTRCallbackBridge @@ -2196,15 +2180,13 @@ class MTRNullableDoubleAttributeCallbackSubscriptionBridge : public MTRNullableD public: MTRNullableDoubleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoubleAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoubleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoubleAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2212,7 +2194,7 @@ class MTRNullableDoubleAttributeCallbackSubscriptionBridge : public MTRNullableD static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRVendorIdAttributeCallbackBridge : public MTRCallbackBridge @@ -2238,13 +2220,13 @@ class MTRVendorIdAttributeCallbackSubscriptionBridge : public MTRVendorIdAttribu public: MTRVendorIdAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRVendorIdAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRVendorIdAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRVendorIdAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2252,7 +2234,7 @@ class MTRVendorIdAttributeCallbackSubscriptionBridge : public MTRVendorIdAttribu static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableVendorIdAttributeCallbackBridge : public MTRCallbackBridge @@ -2279,14 +2261,14 @@ class MTRNullableVendorIdAttributeCallbackSubscriptionBridge : public MTRNullabl MTRNullableVendorIdAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableVendorIdAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableVendorIdAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableVendorIdAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2294,7 +2276,7 @@ class MTRNullableVendorIdAttributeCallbackSubscriptionBridge : public MTRNullabl static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIdentifyGeneratedCommandListListAttributeCallbackBridge @@ -2327,14 +2309,14 @@ class MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2342,7 +2324,7 @@ class MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIdentifyAcceptedCommandListListAttributeCallbackBridge @@ -2375,14 +2357,14 @@ class MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2390,7 +2372,7 @@ class MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIdentifyAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -2419,14 +2401,14 @@ class MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge : public M MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRIdentifyAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRIdentifyAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2434,7 +2416,7 @@ class MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupsGeneratedCommandListListAttributeCallbackBridge @@ -2467,14 +2449,14 @@ class MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2482,7 +2464,7 @@ class MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupsAcceptedCommandListListAttributeCallbackBridge @@ -2513,14 +2495,14 @@ class MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2528,7 +2510,7 @@ class MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -2556,14 +2538,14 @@ class MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge : public MTR MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2571,7 +2553,7 @@ class MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRScenesGeneratedCommandListListAttributeCallbackBridge @@ -2604,14 +2586,14 @@ class MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRScenesGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRScenesGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2619,7 +2601,7 @@ class MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRScenesAcceptedCommandListListAttributeCallbackBridge @@ -2650,14 +2632,14 @@ class MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRScenesAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRScenesAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2665,7 +2647,7 @@ class MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRScenesAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -2693,14 +2675,14 @@ class MTRScenesAttributeListListAttributeCallbackSubscriptionBridge : public MTR MTRScenesAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRScenesAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRScenesAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRScenesAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2708,7 +2690,7 @@ class MTRScenesAttributeListListAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffGeneratedCommandListListAttributeCallbackBridge @@ -2739,14 +2721,14 @@ class MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2754,7 +2736,7 @@ class MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffAcceptedCommandListListAttributeCallbackBridge @@ -2785,14 +2767,14 @@ class MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2800,7 +2782,7 @@ class MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -2828,14 +2810,14 @@ class MTROnOffAttributeListListAttributeCallbackSubscriptionBridge : public MTRO MTROnOffAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2843,7 +2825,7 @@ class MTROnOffAttributeListListAttributeCallbackSubscriptionBridge : public MTRO static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge @@ -2877,7 +2859,7 @@ class MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscr public: MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -2885,7 +2867,7 @@ class MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscr MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2893,7 +2875,7 @@ class MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge @@ -2927,14 +2909,14 @@ class MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscri public: MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2942,7 +2924,7 @@ class MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge @@ -2975,14 +2957,14 @@ class MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionB public: MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2990,7 +2972,7 @@ class MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLevelControlGeneratedCommandListListAttributeCallbackBridge @@ -3020,16 +3002,17 @@ class MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRLevelControlGeneratedCommandListListAttributeCallbackBridge { public: - MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3037,7 +3020,7 @@ class MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLevelControlAcceptedCommandListListAttributeCallbackBridge @@ -3067,16 +3050,17 @@ class MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge : public MTRLevelControlAcceptedCommandListListAttributeCallbackBridge { public: - MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3084,7 +3068,7 @@ class MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLevelControlAttributeListListAttributeCallbackBridge @@ -3115,14 +3099,14 @@ class MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLevelControlAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLevelControlAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3130,7 +3114,7 @@ class MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge @@ -3163,14 +3147,14 @@ class MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBr public: MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3178,7 +3162,7 @@ class MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge @@ -3211,14 +3195,14 @@ class MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBri public: MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3226,7 +3210,7 @@ class MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBinaryInputBasicAttributeListListAttributeCallbackBridge @@ -3259,14 +3243,14 @@ class MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3274,7 +3258,7 @@ class MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorDeviceTypeListListAttributeCallbackBridge @@ -3308,14 +3292,14 @@ class MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorDeviceTypeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorDeviceTypeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3323,7 +3307,7 @@ class MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorServerListListAttributeCallbackBridge : public MTRCallbackBridge @@ -3352,14 +3336,14 @@ class MTRDescriptorServerListListAttributeCallbackSubscriptionBridge : public MT MTRDescriptorServerListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorServerListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorServerListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorServerListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3367,7 +3351,7 @@ class MTRDescriptorServerListListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorClientListListAttributeCallbackBridge : public MTRCallbackBridge @@ -3396,14 +3380,14 @@ class MTRDescriptorClientListListAttributeCallbackSubscriptionBridge : public MT MTRDescriptorClientListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorClientListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorClientListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorClientListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3411,7 +3395,7 @@ class MTRDescriptorClientListListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorPartsListListAttributeCallbackBridge : public MTRCallbackBridge @@ -3439,14 +3423,14 @@ class MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge : public MTR MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorPartsListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorPartsListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3454,7 +3438,7 @@ class MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorGeneratedCommandListListAttributeCallbackBridge @@ -3487,14 +3471,14 @@ class MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3502,7 +3486,7 @@ class MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorAcceptedCommandListListAttributeCallbackBridge @@ -3535,14 +3519,14 @@ class MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3550,7 +3534,7 @@ class MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -3580,14 +3564,14 @@ class MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDescriptorAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3595,7 +3579,7 @@ class MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBindingBindingListAttributeCallbackBridge : public MTRCallbackBridge @@ -3625,14 +3609,14 @@ class MTRBindingBindingListAttributeCallbackSubscriptionBridge : public MTRBindi MTRBindingBindingListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBindingBindingListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBindingBindingListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBindingBindingListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3640,7 +3624,7 @@ class MTRBindingBindingListAttributeCallbackSubscriptionBridge : public MTRBindi static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBindingGeneratedCommandListListAttributeCallbackBridge @@ -3673,14 +3657,14 @@ class MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBindingGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBindingGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3688,7 +3672,7 @@ class MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBindingAcceptedCommandListListAttributeCallbackBridge @@ -3721,14 +3705,14 @@ class MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBindingAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBindingAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3736,7 +3720,7 @@ class MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBindingAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -3765,14 +3749,14 @@ class MTRBindingAttributeListListAttributeCallbackSubscriptionBridge : public MT MTRBindingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBindingAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBindingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBindingAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3780,24 +3764,24 @@ class MTRBindingAttributeListListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAccessControlACLListAttributeCallbackBridge : public MTRCallbackBridge +class MTRAccessControlAclListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAccessControlACLListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, + MTRAccessControlAclListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTRAccessControlACLListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, + MTRAccessControlAclListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTRAccessControlACLListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, + MTRAccessControlAclListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn( void * context, @@ -3805,28 +3789,28 @@ class MTRAccessControlACLListAttributeCallbackBridge : public MTRCallbackBridge< value); }; -class MTRAccessControlACLListAttributeCallbackSubscriptionBridge : public MTRAccessControlACLListAttributeCallbackBridge +class MTRAccessControlAclListAttributeCallbackSubscriptionBridge : public MTRAccessControlAclListAttributeCallbackBridge { public: - MTRAccessControlACLListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRAccessControlAclListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlACLListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlAclListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRAccessControlACLListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTRAccessControlAclListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlACLListAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlAclListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlExtensionListAttributeCallbackBridge : public MTRCallbackBridge @@ -3858,14 +3842,14 @@ class MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge : public MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlExtensionListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlExtensionListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3873,7 +3857,7 @@ class MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlGeneratedCommandListListAttributeCallbackBridge @@ -3903,16 +3887,17 @@ class MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridg : public MTRAccessControlGeneratedCommandListListAttributeCallbackBridge { public: - MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3920,7 +3905,7 @@ class MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlAcceptedCommandListListAttributeCallbackBridge @@ -3950,16 +3935,17 @@ class MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge : public MTRAccessControlAcceptedCommandListListAttributeCallbackBridge { public: - MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3967,7 +3953,7 @@ class MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlAttributeListListAttributeCallbackBridge @@ -4000,14 +3986,14 @@ class MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4015,7 +4001,7 @@ class MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsActionListListAttributeCallbackBridge : public MTRCallbackBridge @@ -4045,14 +4031,14 @@ class MTRActionsActionListListAttributeCallbackSubscriptionBridge : public MTRAc MTRActionsActionListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsActionListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsActionListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsActionListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4060,7 +4046,7 @@ class MTRActionsActionListListAttributeCallbackSubscriptionBridge : public MTRAc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsEndpointListsListAttributeCallbackBridge : public MTRCallbackBridge @@ -4092,14 +4078,14 @@ class MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge : public MT MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsEndpointListsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsEndpointListsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4107,7 +4093,7 @@ class MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsGeneratedCommandListListAttributeCallbackBridge @@ -4140,14 +4126,14 @@ class MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4155,7 +4141,7 @@ class MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsAcceptedCommandListListAttributeCallbackBridge @@ -4188,14 +4174,14 @@ class MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4203,7 +4189,7 @@ class MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -4232,14 +4218,14 @@ class MTRActionsAttributeListListAttributeCallbackSubscriptionBridge : public MT MTRActionsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4247,7 +4233,7 @@ class MTRActionsAttributeListListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBasicCapabilityMinimaStructAttributeCallbackBridge : public MTRCallbackBridge @@ -4278,14 +4264,14 @@ class MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBasicCapabilityMinimaStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBasicCapabilityMinimaStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4293,7 +4279,7 @@ class MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBasicGeneratedCommandListListAttributeCallbackBridge @@ -4324,14 +4310,14 @@ class MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBasicGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBasicGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4339,7 +4325,7 @@ class MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBasicAcceptedCommandListListAttributeCallbackBridge @@ -4370,14 +4356,14 @@ class MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBasicAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBasicAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4385,7 +4371,7 @@ class MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBasicAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -4413,14 +4399,14 @@ class MTRBasicAttributeListListAttributeCallbackSubscriptionBridge : public MTRB MTRBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBasicAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBasicAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4428,179 +4414,179 @@ class MTRBasicAttributeListListAttributeCallbackSubscriptionBridge : public MTRB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge +class MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge { public: - MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge +class MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge { public: - MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, action, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge +class MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge { public: - MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, @@ -4608,179 +4594,179 @@ class MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridg chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & value); }; -class MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge +class MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge { public: - MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(queue, nodeID, controller, handler, action, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge +class MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge { public: - MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge +class MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge { public: - MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, action, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge +class MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge { public: - MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge @@ -4814,14 +4800,14 @@ class MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscript public: MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4829,7 +4815,7 @@ class MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge @@ -4864,7 +4850,7 @@ class MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubsc public: MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -4872,7 +4858,7 @@ class MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubsc MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4880,7 +4866,7 @@ class MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge @@ -4914,7 +4900,7 @@ class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscr public: MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -4922,7 +4908,7 @@ class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscr MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4930,7 +4916,7 @@ class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge @@ -4963,14 +4949,14 @@ class MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscription public: MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4978,7 +4964,7 @@ class MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge @@ -5014,7 +5000,7 @@ class MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscr public: MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -5022,7 +5008,7 @@ class MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscr MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5030,7 +5016,7 @@ class MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge @@ -5064,14 +5050,14 @@ class MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscrip public: MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5079,7 +5065,7 @@ class MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge @@ -5113,14 +5099,14 @@ class MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscript public: MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5128,7 +5114,7 @@ class MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge @@ -5161,14 +5147,14 @@ class MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBri public: MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5176,7 +5162,7 @@ class MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge @@ -5209,14 +5195,14 @@ class MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBr public: MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5224,7 +5210,7 @@ class MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge @@ -5257,14 +5243,14 @@ class MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBri public: MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5272,7 +5258,7 @@ class MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUnitLocalizationAttributeListListAttributeCallbackBridge @@ -5305,14 +5291,14 @@ class MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5320,7 +5306,7 @@ class MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge @@ -5350,16 +5336,17 @@ class MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge : public MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge { public: - MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5367,7 +5354,7 @@ class MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge @@ -5401,7 +5388,7 @@ class MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscr public: MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -5409,7 +5396,7 @@ class MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscr MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5417,7 +5404,7 @@ class MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge @@ -5451,14 +5438,14 @@ class MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscri public: MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5466,7 +5453,7 @@ class MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge @@ -5499,14 +5486,14 @@ class MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionB public: MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5514,7 +5501,7 @@ class MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge @@ -5548,14 +5535,14 @@ class MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5563,7 +5550,7 @@ class MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge @@ -5597,14 +5584,14 @@ class MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5612,7 +5599,7 @@ class MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge @@ -5643,16 +5630,17 @@ class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge : public MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge { public: - MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5660,7 +5648,7 @@ class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge @@ -5690,16 +5678,17 @@ class MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge { public: - MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5707,7 +5696,7 @@ class MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge @@ -5740,14 +5729,14 @@ class MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5755,7 +5744,7 @@ class MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceAttributeListListAttributeCallbackBridge @@ -5786,14 +5775,14 @@ class MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5801,7 +5790,7 @@ class MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge @@ -5837,7 +5826,7 @@ class MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscr public: MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -5845,7 +5834,7 @@ class MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscr MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5853,7 +5842,7 @@ class MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge @@ -5887,14 +5876,14 @@ class MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscripti public: MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5902,7 +5891,7 @@ class MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge @@ -5935,14 +5924,14 @@ class MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptio public: MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5950,7 +5939,7 @@ class MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralCommissioningAttributeListListAttributeCallbackBridge @@ -5980,16 +5969,17 @@ class MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridg : public MTRGeneralCommissioningAttributeListListAttributeCallbackBridge { public: - MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5997,7 +5987,7 @@ class MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNetworkCommissioningNetworksListAttributeCallbackBridge @@ -6033,14 +6023,14 @@ class MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningNetworksListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningNetworksListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6048,7 +6038,7 @@ class MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge @@ -6082,14 +6072,14 @@ class MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscripti public: MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6097,7 +6087,7 @@ class MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge @@ -6130,14 +6120,14 @@ class MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptio public: MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6145,7 +6135,7 @@ class MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNetworkCommissioningAttributeListListAttributeCallbackBridge @@ -6175,16 +6165,17 @@ class MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridg : public MTRNetworkCommissioningAttributeListListAttributeCallbackBridge { public: - MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6192,7 +6183,7 @@ class MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge @@ -6225,14 +6216,14 @@ class MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBrid public: MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6240,7 +6231,7 @@ class MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge @@ -6270,16 +6261,17 @@ class MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridg : public MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge { public: - MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6287,7 +6279,7 @@ class MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDiagnosticLogsAttributeListListAttributeCallbackBridge @@ -6320,14 +6312,14 @@ class MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6335,7 +6327,7 @@ class MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge @@ -6370,14 +6362,14 @@ class MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBri public: MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6385,7 +6377,7 @@ class MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge @@ -6418,14 +6410,14 @@ class MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscription public: MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6433,7 +6425,7 @@ class MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge @@ -6466,14 +6458,14 @@ class MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBri public: MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6481,7 +6473,7 @@ class MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge @@ -6514,14 +6506,14 @@ class MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionB public: MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6529,7 +6521,7 @@ class MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge @@ -6562,14 +6554,14 @@ class MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscription public: MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6577,7 +6569,7 @@ class MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge @@ -6610,14 +6602,14 @@ class MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionB public: MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6625,7 +6617,7 @@ class MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge @@ -6655,16 +6647,17 @@ class MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge : public MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge { public: - MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6672,7 +6665,7 @@ class MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge @@ -6705,16 +6698,17 @@ class MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge : public MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge { public: - MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6722,7 +6716,7 @@ class MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge @@ -6755,14 +6749,14 @@ class MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptio public: MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6770,7 +6764,7 @@ class MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge @@ -6803,14 +6797,14 @@ class MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscription public: MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6818,7 +6812,7 @@ class MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge @@ -6848,16 +6842,17 @@ class MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge : public MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge { public: - MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6865,7 +6860,7 @@ class MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge @@ -6901,14 +6896,14 @@ class MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscript public: MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6916,7 +6911,7 @@ class MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge @@ -6951,14 +6946,14 @@ class MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscription public: MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6966,7 +6961,7 @@ class MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge @@ -7002,14 +6997,14 @@ class MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscripti public: MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7017,7 +7012,7 @@ class MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge @@ -7054,7 +7049,7 @@ class MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCall public: MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7062,7 +7057,7 @@ class MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCall MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7070,7 +7065,7 @@ class MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCall static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge @@ -7107,7 +7102,7 @@ class MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSub public: MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7115,7 +7110,7 @@ class MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSub MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7123,7 +7118,7 @@ class MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge @@ -7157,7 +7152,7 @@ class MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscr public: MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7165,7 +7160,7 @@ class MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscr MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7173,7 +7168,7 @@ class MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge @@ -7207,14 +7202,14 @@ class MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscri public: MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7222,7 +7217,7 @@ class MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge @@ -7255,14 +7250,14 @@ class MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionB public: MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7270,7 +7265,7 @@ class MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge @@ -7304,14 +7299,14 @@ class MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscrip public: MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7319,7 +7314,7 @@ class MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge @@ -7353,14 +7348,14 @@ class MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscript public: MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7368,7 +7363,7 @@ class MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge @@ -7401,14 +7396,14 @@ class MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBri public: MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7416,7 +7411,7 @@ class MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge @@ -7451,7 +7446,7 @@ class MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubs public: MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7459,7 +7454,7 @@ class MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubs MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7467,7 +7462,7 @@ class MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge @@ -7502,7 +7497,7 @@ class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubsc public: MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7510,7 +7505,7 @@ class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubsc MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7518,7 +7513,7 @@ class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge @@ -7551,14 +7546,14 @@ class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptio public: MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7566,7 +7561,7 @@ class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge @@ -7599,14 +7594,14 @@ class MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscription public: MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7614,7 +7609,7 @@ class MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge @@ -7647,14 +7642,14 @@ class MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionB public: MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7662,7 +7657,7 @@ class MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge @@ -7692,16 +7687,17 @@ class MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge : public MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge { public: - MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7709,7 +7705,7 @@ class MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSwitchGeneratedCommandListListAttributeCallbackBridge @@ -7742,14 +7738,14 @@ class MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRSwitchGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRSwitchGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7757,7 +7753,7 @@ class MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSwitchAcceptedCommandListListAttributeCallbackBridge @@ -7788,14 +7784,14 @@ class MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRSwitchAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRSwitchAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7803,7 +7799,7 @@ class MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSwitchAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -7831,14 +7827,14 @@ class MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge : public MTR MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRSwitchAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRSwitchAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7846,7 +7842,7 @@ class MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge @@ -7881,7 +7877,7 @@ class MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubs public: MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7889,7 +7885,7 @@ class MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubs MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7897,7 +7893,7 @@ class MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge @@ -7932,7 +7928,7 @@ class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubsc public: MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7940,7 +7936,7 @@ class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubsc MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7948,7 +7944,7 @@ class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge @@ -7981,14 +7977,14 @@ class MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptio public: MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7996,7 +7992,7 @@ class MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsNOCsListAttributeCallbackBridge @@ -8032,14 +8028,14 @@ class MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsNOCsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsNOCsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8047,7 +8043,7 @@ class MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsFabricsListAttributeCallbackBridge @@ -8082,14 +8078,14 @@ class MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsFabricsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsFabricsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8097,7 +8093,7 @@ class MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge @@ -8132,7 +8128,7 @@ class MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubsc public: MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -8140,7 +8136,7 @@ class MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubsc MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8148,7 +8144,7 @@ class MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge @@ -8182,14 +8178,14 @@ class MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscrip public: MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8197,7 +8193,7 @@ class MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge @@ -8231,14 +8227,14 @@ class MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscript public: MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8246,7 +8242,7 @@ class MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsAttributeListListAttributeCallbackBridge @@ -8279,14 +8275,14 @@ class MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBri public: MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8294,7 +8290,7 @@ class MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge @@ -8329,14 +8325,14 @@ class MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8344,7 +8340,7 @@ class MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupKeyManagementGroupTableListAttributeCallbackBridge @@ -8379,14 +8375,14 @@ class MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8394,7 +8390,7 @@ class MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge @@ -8427,14 +8423,14 @@ class MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscription public: MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8442,7 +8438,7 @@ class MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge @@ -8475,14 +8471,14 @@ class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionB public: MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8490,7 +8486,7 @@ class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupKeyManagementAttributeListListAttributeCallbackBridge @@ -8520,16 +8516,17 @@ class MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge : public MTRGroupKeyManagementAttributeListListAttributeCallbackBridge { public: - MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8537,7 +8534,7 @@ class MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFixedLabelLabelListListAttributeCallbackBridge : public MTRCallbackBridge @@ -8567,14 +8564,14 @@ class MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge : public MTR MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelLabelListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelLabelListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8582,7 +8579,7 @@ class MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge @@ -8615,14 +8612,14 @@ class MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8630,7 +8627,7 @@ class MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge @@ -8663,14 +8660,14 @@ class MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8678,7 +8675,7 @@ class MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFixedLabelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -8708,14 +8705,14 @@ class MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8723,7 +8720,7 @@ class MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUserLabelLabelListListAttributeCallbackBridge : public MTRCallbackBridge @@ -8753,14 +8750,14 @@ class MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge : public MTRU MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUserLabelLabelListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUserLabelLabelListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8768,7 +8765,7 @@ class MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge : public MTRU static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUserLabelGeneratedCommandListListAttributeCallbackBridge @@ -8801,14 +8798,14 @@ class MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8816,7 +8813,7 @@ class MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUserLabelAcceptedCommandListListAttributeCallbackBridge @@ -8849,14 +8846,14 @@ class MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8864,7 +8861,7 @@ class MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUserLabelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -8893,14 +8890,14 @@ class MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge : public MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUserLabelAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUserLabelAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8908,7 +8905,7 @@ class MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge @@ -8938,16 +8935,17 @@ class MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge { public: - MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8955,7 +8953,7 @@ class MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge @@ -8985,16 +8983,17 @@ class MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge : public MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge { public: - MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9002,7 +9001,7 @@ class MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBooleanStateAttributeListListAttributeCallbackBridge @@ -9033,14 +9032,14 @@ class MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBooleanStateAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBooleanStateAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9048,7 +9047,7 @@ class MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRModeSelectSupportedModesListAttributeCallbackBridge @@ -9082,14 +9081,14 @@ class MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRModeSelectSupportedModesListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRModeSelectSupportedModesListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9097,7 +9096,7 @@ class MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRModeSelectGeneratedCommandListListAttributeCallbackBridge @@ -9130,14 +9129,14 @@ class MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9145,7 +9144,7 @@ class MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRModeSelectAcceptedCommandListListAttributeCallbackBridge @@ -9178,14 +9177,14 @@ class MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9193,7 +9192,7 @@ class MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRModeSelectAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -9223,14 +9222,14 @@ class MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRModeSelectAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRModeSelectAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9238,7 +9237,7 @@ class MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockCredentialRulesSupportAttributeCallbackBridge @@ -9271,14 +9270,14 @@ class MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9286,7 +9285,7 @@ class MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockSupportedOperatingModesAttributeCallbackBridge @@ -9319,14 +9318,14 @@ class MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9334,7 +9333,7 @@ class MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge @@ -9364,16 +9363,17 @@ class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge : public MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge { public: - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9381,7 +9381,7 @@ class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge @@ -9414,14 +9414,14 @@ class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9429,7 +9429,7 @@ class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockGeneratedCommandListListAttributeCallbackBridge @@ -9462,14 +9462,14 @@ class MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9477,7 +9477,7 @@ class MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockAcceptedCommandListListAttributeCallbackBridge @@ -9510,14 +9510,14 @@ class MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9525,7 +9525,7 @@ class MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -9554,14 +9554,14 @@ class MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge : public M MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9569,7 +9569,7 @@ class MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringConfigStatusAttributeCallbackBridge : public MTRCallbackBridge @@ -9598,14 +9598,14 @@ class MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge : public MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringConfigStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringConfigStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9613,7 +9613,7 @@ class MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringOperationalStatusAttributeCallbackBridge @@ -9646,14 +9646,14 @@ class MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringOperationalStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringOperationalStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9661,7 +9661,7 @@ class MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringModeAttributeCallbackBridge : public MTRCallbackBridge @@ -9689,14 +9689,14 @@ class MTRWindowCoveringModeAttributeCallbackSubscriptionBridge : public MTRWindo MTRWindowCoveringModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9704,7 +9704,7 @@ class MTRWindowCoveringModeAttributeCallbackSubscriptionBridge : public MTRWindo static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringSafetyStatusAttributeCallbackBridge : public MTRCallbackBridge @@ -9733,14 +9733,14 @@ class MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge : public MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringSafetyStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringSafetyStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9748,7 +9748,7 @@ class MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge @@ -9781,14 +9781,14 @@ class MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBrid public: MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9796,7 +9796,7 @@ class MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge @@ -9826,16 +9826,17 @@ class MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridg : public MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge { public: - MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9843,7 +9844,7 @@ class MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringAttributeListListAttributeCallbackBridge @@ -9876,14 +9877,14 @@ class MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9891,7 +9892,7 @@ class MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge @@ -9924,14 +9925,14 @@ class MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBrid public: MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9939,7 +9940,7 @@ class MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge @@ -9969,16 +9970,17 @@ class MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridg : public MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge { public: - MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9986,7 +9988,7 @@ class MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBarrierControlAttributeListListAttributeCallbackBridge @@ -10019,14 +10021,14 @@ class MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBarrierControlAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBarrierControlAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10034,7 +10036,7 @@ class MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge @@ -10064,16 +10066,17 @@ class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridg : public MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge { public: - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10081,7 +10084,7 @@ class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge @@ -10116,7 +10119,7 @@ class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSub public: MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -10124,7 +10127,7 @@ class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSub MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10132,7 +10135,7 @@ class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge @@ -10167,7 +10170,7 @@ class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubs public: MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -10175,7 +10178,7 @@ class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubs MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10183,7 +10186,7 @@ class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge @@ -10217,14 +10220,14 @@ class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscripti public: MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10232,7 +10235,7 @@ class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatGeneratedCommandListListAttributeCallbackBridge @@ -10265,14 +10268,14 @@ class MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10280,7 +10283,7 @@ class MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatAcceptedCommandListListAttributeCallbackBridge @@ -10313,14 +10316,14 @@ class MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10328,7 +10331,7 @@ class MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -10358,14 +10361,14 @@ class MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10373,7 +10376,7 @@ class MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFanControlGeneratedCommandListListAttributeCallbackBridge @@ -10406,14 +10409,14 @@ class MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFanControlGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFanControlGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10421,7 +10424,7 @@ class MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFanControlAcceptedCommandListListAttributeCallbackBridge @@ -10454,14 +10457,14 @@ class MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFanControlAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFanControlAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10469,7 +10472,7 @@ class MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFanControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -10499,14 +10502,14 @@ class MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFanControlAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFanControlAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10514,7 +10517,7 @@ class MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge @@ -10548,7 +10551,7 @@ class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCa public: MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -10556,7 +10559,7 @@ class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCa MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -10565,7 +10568,7 @@ class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCa static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge @@ -10599,7 +10602,7 @@ class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCal public: MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -10607,7 +10610,7 @@ class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCal MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10615,7 +10618,7 @@ class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCal static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge @@ -10650,7 +10653,7 @@ class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackS public: MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -10658,7 +10661,7 @@ class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackS MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10666,7 +10669,7 @@ class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackS static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlGeneratedCommandListListAttributeCallbackBridge @@ -10696,16 +10699,17 @@ class MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRColorControlGeneratedCommandListListAttributeCallbackBridge { public: - MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10713,7 +10717,7 @@ class MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlAcceptedCommandListListAttributeCallbackBridge @@ -10743,16 +10747,17 @@ class MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge : public MTRColorControlAcceptedCommandListListAttributeCallbackBridge { public: - MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10760,7 +10765,7 @@ class MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlAttributeListListAttributeCallbackBridge @@ -10791,14 +10796,14 @@ class MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10806,7 +10811,7 @@ class MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge @@ -10840,14 +10845,14 @@ class MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscripti public: MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10855,7 +10860,7 @@ class MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge @@ -10888,14 +10893,14 @@ class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptio public: MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10903,7 +10908,7 @@ class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBallastConfigurationAttributeListListAttributeCallbackBridge @@ -10933,16 +10938,17 @@ class MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridg : public MTRBallastConfigurationAttributeListListAttributeCallbackBridge { public: - MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRBallastConfigurationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRBallastConfigurationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10950,7 +10956,7 @@ class MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge @@ -10984,14 +10990,14 @@ class MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscrip public: MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10999,7 +11005,7 @@ class MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge @@ -11033,14 +11039,14 @@ class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscript public: MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11048,7 +11054,7 @@ class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge @@ -11081,14 +11087,14 @@ class MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBri public: MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11096,7 +11102,7 @@ class MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge @@ -11130,14 +11136,14 @@ class MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscrip public: MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11145,7 +11151,7 @@ class MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge @@ -11179,14 +11185,14 @@ class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscript public: MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11194,7 +11200,7 @@ class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge @@ -11227,14 +11233,14 @@ class MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBri public: MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11242,7 +11248,7 @@ class MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge @@ -11275,14 +11281,14 @@ class MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptio public: MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11290,7 +11296,7 @@ class MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge @@ -11323,14 +11329,14 @@ class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscription public: MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11338,7 +11344,7 @@ class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPressureMeasurementAttributeListListAttributeCallbackBridge @@ -11368,16 +11374,17 @@ class MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge : public MTRPressureMeasurementAttributeListListAttributeCallbackBridge { public: - MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPressureMeasurementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPressureMeasurementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11385,7 +11392,7 @@ class MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge @@ -11418,14 +11425,14 @@ class MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBri public: MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11433,7 +11440,7 @@ class MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge @@ -11466,14 +11473,14 @@ class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBrid public: MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11481,7 +11488,7 @@ class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFlowMeasurementAttributeListListAttributeCallbackBridge @@ -11514,14 +11521,14 @@ class MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFlowMeasurementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFlowMeasurementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11529,7 +11536,7 @@ class MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge @@ -11564,7 +11571,7 @@ class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSub public: MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -11572,7 +11579,7 @@ class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSub MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11580,7 +11587,7 @@ class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge @@ -11615,7 +11622,7 @@ class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubs public: MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -11623,7 +11630,7 @@ class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubs MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11631,7 +11638,7 @@ class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge @@ -11665,14 +11672,14 @@ class MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscripti public: MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11680,7 +11687,7 @@ class MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge @@ -11713,14 +11720,14 @@ class MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBr public: MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11728,7 +11735,7 @@ class MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge @@ -11761,14 +11768,14 @@ class MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBri public: MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11776,7 +11783,7 @@ class MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROccupancySensingAttributeListListAttributeCallbackBridge @@ -11809,14 +11816,14 @@ class MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROccupancySensingAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROccupancySensingAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11824,147 +11831,147 @@ class MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, action, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge +class MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge { public: - MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, action, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge +class MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge { public: - MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWakeOnLANAttributeListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRWakeOnLanAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWakeOnLANAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRWakeOnLanAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTRWakeOnLANAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRWakeOnLanAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTRWakeOnLANAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, + MTRWakeOnLanAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge : public MTRWakeOnLANAttributeListListAttributeCallbackBridge +class MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge : public MTRWakeOnLanAttributeListListAttributeCallbackBridge { public: - MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLANAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTRWakeOnLanAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLANAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTRWakeOnLanAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelChannelListListAttributeCallbackBridge : public MTRCallbackBridge @@ -11994,14 +12001,14 @@ class MTRChannelChannelListListAttributeCallbackSubscriptionBridge : public MTRC MTRChannelChannelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelChannelListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelChannelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelChannelListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12009,7 +12016,7 @@ class MTRChannelChannelListListAttributeCallbackSubscriptionBridge : public MTRC static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelLineupStructAttributeCallbackBridge : public MTRCallbackBridge @@ -12039,14 +12046,14 @@ class MTRChannelLineupStructAttributeCallbackSubscriptionBridge : public MTRChan MTRChannelLineupStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelLineupStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelLineupStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelLineupStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12054,7 +12061,7 @@ class MTRChannelLineupStructAttributeCallbackSubscriptionBridge : public MTRChan static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelCurrentChannelStructAttributeCallbackBridge : public MTRCallbackBridge @@ -12086,14 +12093,14 @@ class MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelCurrentChannelStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelCurrentChannelStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12101,7 +12108,7 @@ class MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelGeneratedCommandListListAttributeCallbackBridge @@ -12134,14 +12141,14 @@ class MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12149,7 +12156,7 @@ class MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelAcceptedCommandListListAttributeCallbackBridge @@ -12182,14 +12189,14 @@ class MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12197,7 +12204,7 @@ class MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -12226,14 +12233,14 @@ class MTRChannelAttributeListListAttributeCallbackSubscriptionBridge : public MT MTRChannelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12241,7 +12248,7 @@ class MTRChannelAttributeListListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTargetNavigatorTargetListListAttributeCallbackBridge @@ -12275,14 +12282,14 @@ class MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorTargetListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorTargetListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12290,7 +12297,7 @@ class MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge @@ -12323,14 +12330,14 @@ class MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBri public: MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12338,7 +12345,7 @@ class MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge @@ -12371,14 +12378,14 @@ class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBrid public: MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12386,7 +12393,7 @@ class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTargetNavigatorAttributeListListAttributeCallbackBridge @@ -12419,14 +12426,14 @@ class MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12434,7 +12441,7 @@ class MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge @@ -12469,14 +12476,14 @@ class MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12484,7 +12491,7 @@ class MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge @@ -12514,16 +12521,17 @@ class MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridg : public MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge { public: - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12531,7 +12539,7 @@ class MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge @@ -12561,16 +12569,17 @@ class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge : public MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge { public: - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12578,7 +12587,7 @@ class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaPlaybackAttributeListListAttributeCallbackBridge @@ -12611,14 +12620,14 @@ class MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12626,7 +12635,7 @@ class MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaInputInputListListAttributeCallbackBridge : public MTRCallbackBridge @@ -12656,14 +12665,14 @@ class MTRMediaInputInputListListAttributeCallbackSubscriptionBridge : public MTR MTRMediaInputInputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaInputInputListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaInputInputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaInputInputListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12671,7 +12680,7 @@ class MTRMediaInputInputListListAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaInputGeneratedCommandListListAttributeCallbackBridge @@ -12704,14 +12713,14 @@ class MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12719,7 +12728,7 @@ class MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaInputAcceptedCommandListListAttributeCallbackBridge @@ -12752,14 +12761,14 @@ class MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12767,7 +12776,7 @@ class MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaInputAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -12797,14 +12806,14 @@ class MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaInputAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaInputAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12812,7 +12821,7 @@ class MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLowPowerGeneratedCommandListListAttributeCallbackBridge @@ -12845,14 +12854,14 @@ class MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12860,7 +12869,7 @@ class MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLowPowerAcceptedCommandListListAttributeCallbackBridge @@ -12893,14 +12902,14 @@ class MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12908,7 +12917,7 @@ class MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLowPowerAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -12937,14 +12946,14 @@ class MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge : public M MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLowPowerAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLowPowerAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12952,7 +12961,7 @@ class MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge @@ -12982,16 +12991,17 @@ class MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge { public: - MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12999,7 +13009,7 @@ class MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge @@ -13032,14 +13042,14 @@ class MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13047,7 +13057,7 @@ class MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRKeypadInputAttributeListListAttributeCallbackBridge @@ -13078,14 +13088,14 @@ class MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13093,7 +13103,7 @@ class MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherAcceptHeaderListAttributeCallbackBridge @@ -13126,14 +13136,14 @@ class MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13141,7 +13151,7 @@ class MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge @@ -13174,14 +13184,14 @@ class MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBri public: MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13189,7 +13199,7 @@ class MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge @@ -13222,14 +13232,14 @@ class MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBrid public: MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13237,7 +13247,7 @@ class MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherAttributeListListAttributeCallbackBridge @@ -13270,14 +13280,14 @@ class MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13285,7 +13295,7 @@ class MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAudioOutputOutputListListAttributeCallbackBridge : public MTRCallbackBridge @@ -13316,14 +13326,14 @@ class MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge : public M MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputOutputListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputOutputListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13331,7 +13341,7 @@ class MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge @@ -13361,16 +13371,17 @@ class MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge { public: - MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13378,7 +13389,7 @@ class MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge @@ -13411,14 +13422,14 @@ class MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13426,7 +13437,7 @@ class MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAudioOutputAttributeListListAttributeCallbackBridge @@ -13457,14 +13468,14 @@ class MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13472,7 +13483,7 @@ class MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationLauncherCatalogListListAttributeCallbackBridge @@ -13505,14 +13516,14 @@ class MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherCatalogListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherCatalogListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13520,7 +13531,7 @@ class MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge @@ -13553,16 +13564,17 @@ class MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge : public MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge { public: - MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13570,7 +13582,7 @@ class MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge @@ -13603,14 +13615,14 @@ class MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptio public: MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13618,7 +13630,7 @@ class MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge @@ -13651,14 +13663,14 @@ class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscription public: MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13666,7 +13678,7 @@ class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationLauncherAttributeListListAttributeCallbackBridge @@ -13696,16 +13708,17 @@ class MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge : public MTRApplicationLauncherAttributeListListAttributeCallbackBridge { public: - MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13713,7 +13726,7 @@ class MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationBasicApplicationStructAttributeCallbackBridge @@ -13748,14 +13761,14 @@ class MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicApplicationStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicApplicationStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13763,7 +13776,7 @@ class MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge @@ -13793,16 +13806,17 @@ class MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridg : public MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge { public: - MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13810,7 +13824,7 @@ class MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge @@ -13843,14 +13857,14 @@ class MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBr public: MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13858,7 +13872,7 @@ class MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge @@ -13891,14 +13905,14 @@ class MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBri public: MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13906,7 +13920,7 @@ class MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationBasicAttributeListListAttributeCallbackBridge @@ -13939,14 +13953,14 @@ class MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13954,7 +13968,7 @@ class MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge @@ -13984,16 +13998,17 @@ class MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge { public: - MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14001,7 +14016,7 @@ class MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge @@ -14031,16 +14046,17 @@ class MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge : public MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge { public: - MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14048,7 +14064,7 @@ class MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccountLoginAttributeListListAttributeCallbackBridge @@ -14079,14 +14095,14 @@ class MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAccountLoginAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAccountLoginAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14094,7 +14110,7 @@ class MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge @@ -14128,14 +14144,14 @@ class MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscript public: MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14143,7 +14159,7 @@ class MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge @@ -14177,14 +14193,14 @@ class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscripti public: MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14192,7 +14208,7 @@ class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRElectricalMeasurementAttributeListListAttributeCallbackBridge @@ -14225,14 +14241,14 @@ class MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBrid public: MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14240,7 +14256,7 @@ class MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterBitmap8AttributeCallbackBridge : public MTRCallbackBridge @@ -14268,14 +14284,14 @@ class MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge : public MTRTestC MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap8AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap8AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14283,7 +14299,7 @@ class MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge : public MTRTestC static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterBitmap16AttributeCallbackBridge : public MTRCallbackBridge @@ -14311,14 +14327,14 @@ class MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge : public MTRTest MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap16AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap16AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14326,7 +14342,7 @@ class MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge : public MTRTest static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterBitmap32AttributeCallbackBridge : public MTRCallbackBridge @@ -14354,14 +14370,14 @@ class MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge : public MTRTest MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap32AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap32AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14369,7 +14385,7 @@ class MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge : public MTRTest static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterBitmap64AttributeCallbackBridge : public MTRCallbackBridge @@ -14397,14 +14413,14 @@ class MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge : public MTRTest MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap64AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap64AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14412,7 +14428,7 @@ class MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge : public MTRTest static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterListInt8uListAttributeCallbackBridge : public MTRCallbackBridge @@ -14441,14 +14457,14 @@ class MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge : public MT MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListInt8uListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListInt8uListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14456,7 +14472,7 @@ class MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterListOctetStringListAttributeCallbackBridge @@ -14489,14 +14505,14 @@ class MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListOctetStringListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListOctetStringListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14504,7 +14520,7 @@ class MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterListStructOctetStringListAttributeCallbackBridge @@ -14537,16 +14553,17 @@ class MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge : public MTRTestClusterListStructOctetStringListAttributeCallbackBridge { public: - MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListStructOctetStringListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListStructOctetStringListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14554,7 +14571,7 @@ class MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge @@ -14590,14 +14607,14 @@ class MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscrip public: MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14605,7 +14622,7 @@ class MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterStructAttrStructAttributeCallbackBridge : public MTRCallbackBridge @@ -14635,14 +14652,14 @@ class MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterStructAttrStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterStructAttrStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14650,7 +14667,7 @@ class MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterListLongOctetStringListAttributeCallbackBridge @@ -14683,14 +14700,14 @@ class MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListLongOctetStringListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListLongOctetStringListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14698,7 +14715,7 @@ class MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterListFabricScopedListAttributeCallbackBridge @@ -14734,14 +14751,14 @@ class MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListFabricScopedListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListFabricScopedListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14749,7 +14766,7 @@ class MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterNullableBitmap8AttributeCallbackBridge : public MTRCallbackBridge @@ -14780,14 +14797,14 @@ class MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge : public MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap8AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap8AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14795,7 +14812,7 @@ class MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterNullableBitmap16AttributeCallbackBridge : public MTRCallbackBridge @@ -14827,14 +14844,14 @@ class MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap16AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap16AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14842,7 +14859,7 @@ class MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterNullableBitmap32AttributeCallbackBridge : public MTRCallbackBridge @@ -14874,14 +14891,14 @@ class MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap32AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap32AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14889,7 +14906,7 @@ class MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterNullableBitmap64AttributeCallbackBridge : public MTRCallbackBridge @@ -14921,14 +14938,14 @@ class MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap64AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap64AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14936,7 +14953,7 @@ class MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterNullableStructStructAttributeCallbackBridge @@ -14971,14 +14988,14 @@ class MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableStructStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableStructStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14986,7 +15003,7 @@ class MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterGeneratedCommandListListAttributeCallbackBridge @@ -15016,16 +15033,17 @@ class MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRTestClusterGeneratedCommandListListAttributeCallbackBridge { public: - MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -15033,7 +15051,7 @@ class MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterAcceptedCommandListListAttributeCallbackBridge @@ -15066,14 +15084,14 @@ class MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -15081,7 +15099,7 @@ class MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterAttributeListListAttributeCallbackBridge @@ -15112,14 +15130,14 @@ class MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -15127,7 +15145,7 @@ class MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupsClusterAddGroupResponseCallbackBridge : public MTRCallbackBridge @@ -15399,25 +15417,25 @@ class MTRScenesClusterCopySceneResponseCallbackBridge : public MTRCallbackBridge static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & data); }; -class MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void @@ -15425,25 +15443,25 @@ class MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & data); }; -class MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void @@ -16430,14 +16448,14 @@ class MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBri public: MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16445,7 +16463,7 @@ class MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge @@ -16480,14 +16498,14 @@ class MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscri public: MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16495,7 +16513,7 @@ class MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge @@ -16525,16 +16543,17 @@ class MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge : public MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge { public: - MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16542,7 +16561,7 @@ class MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge @@ -16577,14 +16596,14 @@ class MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscripti public: MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16592,7 +16611,7 @@ class MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge @@ -16622,16 +16641,17 @@ class MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge : public MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge { public: - MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16639,7 +16659,7 @@ class MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge @@ -16673,14 +16693,14 @@ class MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptio public: MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16688,7 +16708,7 @@ class MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge @@ -16721,14 +16741,14 @@ class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptio public: MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16736,7 +16756,7 @@ class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge @@ -16773,7 +16793,7 @@ class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSub public: MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -16781,7 +16801,7 @@ class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSub MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16789,7 +16809,7 @@ class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge @@ -16822,14 +16842,14 @@ class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBr public: MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16837,7 +16857,7 @@ class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge @@ -16872,7 +16892,7 @@ class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscr public: MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -16880,7 +16900,7 @@ class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscr MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16888,7 +16908,7 @@ class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge @@ -16921,14 +16941,14 @@ class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16936,7 +16956,7 @@ class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge @@ -16970,14 +16990,14 @@ class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionB public: MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16985,7 +17005,7 @@ class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge @@ -17016,14 +17036,14 @@ class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17031,7 +17051,7 @@ class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge @@ -17062,16 +17082,17 @@ class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridg : public MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge { public: - MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17079,7 +17100,7 @@ class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLevelControlClusterMoveModeAttributeCallbackBridge : public MTRCallbackBridge @@ -17109,14 +17130,14 @@ class MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLevelControlClusterMoveModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLevelControlClusterMoveModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17124,7 +17145,7 @@ class MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge @@ -17155,16 +17176,17 @@ class MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge : public MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge { public: - MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17172,7 +17194,7 @@ class MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLevelControlClusterStepModeAttributeCallbackBridge : public MTRCallbackBridge @@ -17202,14 +17224,14 @@ class MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLevelControlClusterStepModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRLevelControlClusterStepModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17217,7 +17239,7 @@ class MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableLevelControlClusterStepModeAttributeCallbackBridge @@ -17248,16 +17270,17 @@ class MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge : public MTRNullableLevelControlClusterStepModeAttributeCallbackBridge { public: - MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17265,7 +17288,7 @@ class MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlClusterAuthModeAttributeCallbackBridge @@ -17296,14 +17319,14 @@ class MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlClusterAuthModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlClusterAuthModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17311,7 +17334,7 @@ class MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge @@ -17342,16 +17365,17 @@ class MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge : public MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge { public: - MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17359,7 +17383,7 @@ class MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge @@ -17392,14 +17416,14 @@ class MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17407,7 +17431,7 @@ class MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge @@ -17441,14 +17465,14 @@ class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscription public: MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17456,7 +17480,7 @@ class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlClusterPrivilegeAttributeCallbackBridge @@ -17487,14 +17511,14 @@ class MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlClusterPrivilegeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAccessControlClusterPrivilegeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17502,7 +17526,7 @@ class MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge @@ -17533,16 +17557,17 @@ class MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridg : public MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge { public: - MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17550,7 +17575,7 @@ class MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsClusterActionErrorEnumAttributeCallbackBridge @@ -17581,14 +17606,14 @@ class MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterActionErrorEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterActionErrorEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17596,7 +17621,7 @@ class MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge @@ -17627,16 +17652,17 @@ class MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridg : public MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge { public: - MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17644,7 +17670,7 @@ class MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsClusterActionStateEnumAttributeCallbackBridge @@ -17675,14 +17701,14 @@ class MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterActionStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterActionStateEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17690,7 +17716,7 @@ class MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge @@ -17721,16 +17747,17 @@ class MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridg : public MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge { public: - MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17738,7 +17765,7 @@ class MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsClusterActionTypeEnumAttributeCallbackBridge @@ -17769,14 +17796,14 @@ class MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterActionTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterActionTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17784,7 +17811,7 @@ class MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge @@ -17815,16 +17842,17 @@ class MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge : public MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge { public: - MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17832,7 +17860,7 @@ class MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge @@ -17865,14 +17893,14 @@ class MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17880,7 +17908,7 @@ class MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge @@ -17914,14 +17942,14 @@ class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscription public: MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17929,80 +17957,80 @@ class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAApplyUpdateAction value); }; -class MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge +class MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge { public: - MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, nodeID, controller, handler, action, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, + MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge( + MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge( + MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, device, handler, action, OnSuccessFn, keepAlive){}; static void @@ -18010,22 +18038,22 @@ class MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCa const chip::app::DataModel::Nullable & value); }; -class MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge - : public MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge +class MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge + : public MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge { public: - MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( + MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, nodeID, controller, handler, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( + MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, device, handler, action, + SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18033,80 +18061,80 @@ class MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCa static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTADownloadProtocol value); }; -class MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge +class MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge { public: - MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, nodeID, controller, handler, action, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, + MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge( + MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge( + MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, device, handler, action, OnSuccessFn, keepAlive){}; static void @@ -18114,102 +18142,102 @@ class MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCal const chip::app::DataModel::Nullable & value); }; -class MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge - : public MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge +class MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge + : public MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge { public: - MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( + MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, nodeID, controller, handler, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( + MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAQueryStatus value); }; -class MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge +class MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge { public: - MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, + MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void @@ -18217,103 +18245,103 @@ class MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallback const chip::app::DataModel::Nullable & value); }; -class MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge - : public MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge +class MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge + : public MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge { public: - MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( + MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( + MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, + MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAAnnouncementReason value); }; -class MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge +class MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge { public: - MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, nodeID, controller, handler, action, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, + MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, handler, action, OnSuccessFn, keepAlive){}; - MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge( + MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge( + MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn( @@ -18321,22 +18349,22 @@ class MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttribute const chip::app::DataModel::Nullable & value); }; -class MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge - : public MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge +class MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge + : public MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge { public: - MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( + MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, nodeID, controller, handler, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( + MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, device, handler, action, + SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18344,80 +18372,80 @@ class MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttribute static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum value); }; -class MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge +class MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge { public: - MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, + MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge( + MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge( + MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, device, handler, action, OnSuccessFn, keepAlive){}; static void @@ -18425,22 +18453,22 @@ class MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCa const chip::app::DataModel::Nullable & value); }; -class MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge - : public MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge +class MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge + : public MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge { public: - MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( + MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, nodeID, controller, handler, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( + MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, device, handler, action, + SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18448,80 +18476,80 @@ class MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCa static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, nodeID, controller, handler, + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, device, handler, action, + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum value); }; -class MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge +class MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge + : public MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge { public: - MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( + MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, + MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRLocalActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( + MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, nodeID, controller, handler, action, OnSuccessFn, keepAlive){}; - MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( + MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge( + MTRCallbackBridge( queue, device, handler, action, OnSuccessFn, keepAlive){}; static void @@ -18529,29 +18557,29 @@ class MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCal const chip::app::DataModel::Nullable & value); }; -class MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge - : public MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge +class MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge + : public MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge { public: - MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( + MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( + MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, device, handler, action, true), + SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge @@ -18584,14 +18612,14 @@ class MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionB public: MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18599,7 +18627,7 @@ class MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge @@ -18636,7 +18664,7 @@ class MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubsc public: MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18644,7 +18672,7 @@ class MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubsc MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18652,7 +18680,7 @@ class MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge @@ -18685,14 +18713,14 @@ class MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBri public: MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18700,7 +18728,7 @@ class MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge @@ -18735,14 +18763,14 @@ class MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscri public: MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18750,7 +18778,7 @@ class MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge @@ -18783,14 +18811,14 @@ class MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18798,7 +18826,7 @@ class MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge @@ -18832,14 +18860,14 @@ class MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBri public: MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18847,7 +18875,7 @@ class MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge @@ -18880,14 +18908,14 @@ class MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18895,7 +18923,7 @@ class MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge @@ -18929,14 +18957,14 @@ class MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBr public: MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18944,7 +18972,7 @@ class MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge @@ -18977,14 +19005,14 @@ class MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18992,7 +19020,7 @@ class MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge @@ -19026,14 +19054,14 @@ class MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBr public: MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19041,7 +19069,7 @@ class MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge @@ -19074,14 +19102,14 @@ class MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19089,7 +19117,7 @@ class MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge @@ -19123,14 +19151,14 @@ class MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBr public: MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19138,7 +19166,7 @@ class MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterBatFaultAttributeCallbackBridge : public MTRCallbackBridge @@ -19167,14 +19195,14 @@ class MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge : public MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19182,7 +19210,7 @@ class MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge @@ -19216,14 +19244,14 @@ class MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19231,7 +19259,7 @@ class MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge @@ -19261,16 +19289,17 @@ class MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge : public MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge { public: - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19278,7 +19307,7 @@ class MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge @@ -19312,14 +19341,14 @@ class MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptio public: MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19327,7 +19356,7 @@ class MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge @@ -19357,16 +19386,17 @@ class MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge : public MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge { public: - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19374,7 +19404,7 @@ class MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge @@ -19408,14 +19438,14 @@ class MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptio public: MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19423,7 +19453,7 @@ class MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge @@ -19456,14 +19486,14 @@ class MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19471,7 +19501,7 @@ class MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge @@ -19505,14 +19535,14 @@ class MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscription public: MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19520,7 +19550,7 @@ class MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterWiredFaultAttributeCallbackBridge @@ -19551,14 +19581,14 @@ class MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19566,7 +19596,7 @@ class MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge @@ -19597,16 +19627,17 @@ class MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge : public MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge { public: - MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19614,7 +19645,7 @@ class MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge @@ -19648,14 +19679,14 @@ class MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscript public: MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19663,7 +19694,7 @@ class MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge @@ -19700,7 +19731,7 @@ class MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackS public: MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -19708,7 +19739,7 @@ class MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackS MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19716,7 +19747,7 @@ class MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackS static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge @@ -19751,7 +19782,7 @@ class MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubsc public: MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -19759,7 +19790,7 @@ class MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubsc MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19767,7 +19798,7 @@ class MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge @@ -19805,7 +19836,7 @@ class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallb public: MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -19813,7 +19844,7 @@ class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallb MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19821,7 +19852,7 @@ class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallb static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge @@ -19856,7 +19887,7 @@ class MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackS public: MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -19864,7 +19895,7 @@ class MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackS MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19872,7 +19903,7 @@ class MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackS static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge @@ -19908,7 +19939,7 @@ class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeC public: MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -19916,7 +19947,7 @@ class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeC MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -19925,7 +19956,7 @@ class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeC static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge @@ -19955,16 +19986,17 @@ class MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge : public MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge { public: - MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19972,7 +20004,7 @@ class MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge @@ -20006,14 +20038,14 @@ class MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptio public: MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20021,7 +20053,7 @@ class MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge @@ -20054,14 +20086,14 @@ class MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20069,7 +20101,7 @@ class MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge @@ -20103,14 +20135,14 @@ class MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBri public: MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20118,7 +20150,7 @@ class MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge @@ -20151,14 +20183,14 @@ class MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20166,7 +20198,7 @@ class MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge @@ -20200,14 +20232,14 @@ class MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBri public: MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20215,7 +20247,7 @@ class MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge @@ -20248,14 +20280,14 @@ class MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionB public: MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20263,7 +20295,7 @@ class MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge @@ -20300,7 +20332,7 @@ class MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubsc public: MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -20308,7 +20340,7 @@ class MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubsc MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20316,7 +20348,7 @@ class MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge @@ -20349,14 +20381,14 @@ class MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBri public: MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20364,7 +20396,7 @@ class MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge @@ -20399,14 +20431,14 @@ class MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscri public: MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20414,7 +20446,7 @@ class MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge @@ -20447,14 +20479,14 @@ class MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscription public: MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20462,7 +20494,7 @@ class MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge @@ -20499,7 +20531,7 @@ class MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubs public: MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -20507,7 +20539,7 @@ class MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubs MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20515,7 +20547,7 @@ class MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge @@ -20548,14 +20580,14 @@ class MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBrid public: MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20563,7 +20595,7 @@ class MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge @@ -20598,14 +20630,14 @@ class MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscrip public: MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20613,7 +20645,7 @@ class MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge @@ -20646,14 +20678,14 @@ class MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionB public: MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20661,7 +20693,7 @@ class MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge @@ -20698,7 +20730,7 @@ class MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubsc public: MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -20706,7 +20738,7 @@ class MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubsc MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20714,7 +20746,7 @@ class MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge @@ -20747,14 +20779,14 @@ class MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBri public: MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20762,7 +20794,7 @@ class MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge @@ -20797,14 +20829,14 @@ class MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscri public: MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20812,7 +20844,7 @@ class MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge @@ -20845,14 +20877,14 @@ class MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptio public: MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20860,7 +20892,7 @@ class MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge @@ -20897,7 +20929,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSub public: MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -20905,7 +20937,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSub MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20913,7 +20945,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge @@ -20946,14 +20978,14 @@ class MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscription public: MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20961,7 +20993,7 @@ class MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge @@ -20998,7 +21030,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubs public: MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21006,7 +21038,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubs MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21014,7 +21046,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge @@ -21049,7 +21081,7 @@ class MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackS public: MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21057,7 +21089,7 @@ class MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackS MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21065,7 +21097,7 @@ class MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackS static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge @@ -21101,7 +21133,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeC public: MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21109,7 +21141,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeC MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21118,7 +21150,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeC static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge @@ -21153,7 +21185,7 @@ class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSu public: MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21161,7 +21193,7 @@ class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSu MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21169,7 +21201,7 @@ class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSu static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge @@ -21205,7 +21237,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCa public: MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21213,7 +21245,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCa MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21222,7 +21254,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCa static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge @@ -21255,14 +21287,14 @@ class MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionB public: MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21270,7 +21302,7 @@ class MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge @@ -21307,7 +21339,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubsc public: MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21315,7 +21347,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubsc MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21323,7 +21355,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge @@ -21358,7 +21390,7 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubsc public: MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21366,7 +21398,7 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubsc MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21374,7 +21406,7 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge @@ -21412,7 +21444,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallb public: MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21420,7 +21452,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallb MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21428,7 +21460,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallb static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge @@ -21462,14 +21494,14 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscripti public: MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21477,7 +21509,7 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge @@ -21514,7 +21546,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSu public: MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21522,7 +21554,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSu MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21530,7 +21562,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSu static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge @@ -21564,14 +21596,14 @@ class MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscripti public: MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21579,7 +21611,7 @@ class MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge @@ -21616,7 +21648,7 @@ class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSu public: MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21624,7 +21656,7 @@ class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSu MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21632,7 +21664,7 @@ class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSu static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge @@ -21665,14 +21697,14 @@ class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionB public: MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21680,7 +21712,7 @@ class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge @@ -21717,7 +21749,7 @@ class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubsc public: MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21725,7 +21757,7 @@ class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubsc MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21733,7 +21765,7 @@ class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge @@ -21766,14 +21798,14 @@ class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBr public: MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21781,7 +21813,7 @@ class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge @@ -21816,7 +21848,7 @@ class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscr public: MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21824,7 +21856,7 @@ class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscr MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21832,7 +21864,7 @@ class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge @@ -21866,7 +21898,7 @@ class MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCall public: MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21874,7 +21906,7 @@ class MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCall MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21882,7 +21914,7 @@ class MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCall static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge @@ -21918,7 +21950,7 @@ class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttri public: MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21926,7 +21958,7 @@ class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttri MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21935,7 +21967,7 @@ class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge @@ -21968,14 +22000,14 @@ class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptio public: MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21983,7 +22015,7 @@ class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge @@ -22020,7 +22052,7 @@ class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSub public: MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -22028,7 +22060,7 @@ class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSub MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22036,7 +22068,7 @@ class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge @@ -22071,7 +22103,7 @@ class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubs public: MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -22079,7 +22111,7 @@ class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubs MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22087,7 +22119,7 @@ class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge @@ -22123,7 +22155,7 @@ class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCall public: MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -22131,7 +22163,7 @@ class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCall MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22139,7 +22171,7 @@ class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCall static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge @@ -22173,14 +22205,14 @@ class MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscri public: MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22188,7 +22220,7 @@ class MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge @@ -22226,7 +22258,7 @@ class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbac public: MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -22234,7 +22266,7 @@ class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbac MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22242,7 +22274,7 @@ class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbac static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge : public MTRCallbackBridge @@ -22271,14 +22303,14 @@ class MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22286,7 +22318,7 @@ class MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge @@ -22320,14 +22352,14 @@ class MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22335,7 +22367,7 @@ class MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge @@ -22368,14 +22400,14 @@ class MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22383,7 +22415,7 @@ class MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge @@ -22417,14 +22449,14 @@ class MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBri public: MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22432,7 +22464,7 @@ class MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge @@ -22465,14 +22497,14 @@ class MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22480,7 +22512,7 @@ class MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge @@ -22514,14 +22546,14 @@ class MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBri public: MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22529,7 +22561,7 @@ class MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge @@ -22562,14 +22594,14 @@ class MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22577,7 +22609,7 @@ class MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge @@ -22611,14 +22643,14 @@ class MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscription public: MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22626,7 +22658,7 @@ class MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlDoorStateAttributeCallbackBridge : public MTRCallbackBridge @@ -22655,14 +22687,14 @@ class MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlDoorStateAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlDoorStateAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22670,7 +22702,7 @@ class MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge @@ -22704,14 +22736,14 @@ class MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22719,7 +22751,7 @@ class MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge @@ -22750,14 +22782,14 @@ class MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22765,7 +22797,7 @@ class MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge @@ -22796,16 +22828,17 @@ class MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridg : public MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge { public: - MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22813,7 +22846,7 @@ class MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge @@ -22846,14 +22879,14 @@ class MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22861,7 +22894,7 @@ class MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge @@ -22895,14 +22928,14 @@ class MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscription public: MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22910,7 +22943,7 @@ class MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlLockStateAttributeCallbackBridge : public MTRCallbackBridge @@ -22939,14 +22972,14 @@ class MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockStateAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockStateAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22954,7 +22987,7 @@ class MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge @@ -22988,14 +23021,14 @@ class MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23003,7 +23036,7 @@ class MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlLockTypeAttributeCallbackBridge : public MTRCallbackBridge @@ -23032,14 +23065,14 @@ class MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge : public M MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23047,7 +23080,7 @@ class MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge @@ -23081,14 +23114,14 @@ class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23096,7 +23129,7 @@ class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge @@ -23129,14 +23162,14 @@ class MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23144,7 +23177,7 @@ class MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge @@ -23178,14 +23211,14 @@ class MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBrid public: MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23193,7 +23226,7 @@ class MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge @@ -23226,14 +23259,14 @@ class MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23241,7 +23274,7 @@ class MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge @@ -23275,14 +23308,14 @@ class MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBri public: MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23290,7 +23323,7 @@ class MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge @@ -23323,14 +23356,14 @@ class MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23338,7 +23371,7 @@ class MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge @@ -23372,14 +23405,14 @@ class MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBr public: MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23387,7 +23420,7 @@ class MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlStatusAttributeCallbackBridge : public MTRCallbackBridge @@ -23415,14 +23448,14 @@ class MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge : public MTR MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23430,7 +23463,7 @@ class MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge @@ -23463,14 +23496,14 @@ class MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23478,7 +23511,7 @@ class MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlUserStatusAttributeCallbackBridge : public MTRCallbackBridge @@ -23508,14 +23541,14 @@ class MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlUserStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlUserStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23523,7 +23556,7 @@ class MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge @@ -23554,16 +23587,17 @@ class MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge : public MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge { public: - MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23571,7 +23605,7 @@ class MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlUserTypeAttributeCallbackBridge : public MTRCallbackBridge @@ -23600,14 +23634,14 @@ class MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge : public M MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlUserTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlUserTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23615,7 +23649,7 @@ class MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge @@ -23649,14 +23683,14 @@ class MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23664,7 +23698,7 @@ class MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge @@ -23697,14 +23731,14 @@ class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionB public: MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23712,7 +23746,7 @@ class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge @@ -23749,7 +23783,7 @@ class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubsc public: MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -23757,7 +23791,7 @@ class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubsc MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23765,7 +23799,7 @@ class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge @@ -23798,14 +23832,14 @@ class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptio public: MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23813,7 +23847,7 @@ class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge @@ -23850,7 +23884,7 @@ class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSub public: MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -23858,7 +23892,7 @@ class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSub MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23866,7 +23900,7 @@ class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge @@ -23899,14 +23933,14 @@ class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBri public: MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23914,7 +23948,7 @@ class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge @@ -23949,14 +23983,14 @@ class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscri public: MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23964,7 +23998,7 @@ class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge @@ -23997,14 +24031,14 @@ class MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24012,7 +24046,7 @@ class MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge @@ -24046,14 +24080,14 @@ class MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionB public: MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24061,7 +24095,7 @@ class MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge @@ -24094,14 +24128,14 @@ class MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24109,7 +24143,7 @@ class MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge @@ -24143,14 +24177,14 @@ class MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBri public: MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24158,7 +24192,7 @@ class MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge @@ -24188,16 +24222,17 @@ class MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge : public MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge { public: - MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24205,7 +24240,7 @@ class MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge @@ -24239,14 +24274,14 @@ class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptio public: MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24254,7 +24289,7 @@ class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringClusterTypeAttributeCallbackBridge : public MTRCallbackBridge @@ -24283,14 +24318,14 @@ class MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge : public M MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringClusterTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringClusterTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24298,7 +24333,7 @@ class MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge @@ -24332,14 +24367,14 @@ class MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24347,7 +24382,7 @@ class MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge @@ -24382,7 +24417,7 @@ class MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubsc public: MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -24390,7 +24425,7 @@ class MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubsc MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24398,7 +24433,7 @@ class MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge @@ -24436,7 +24471,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallb public: MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -24444,7 +24479,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallb MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24452,7 +24487,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallb static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge @@ -24487,7 +24522,7 @@ class MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSub public: MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -24495,7 +24530,7 @@ class MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSub MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24503,7 +24538,7 @@ class MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge @@ -24539,7 +24574,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCal public: MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -24547,7 +24582,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCal MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24555,7 +24590,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCal static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge @@ -24585,16 +24620,17 @@ class MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge : public MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge { public: - MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24602,7 +24638,7 @@ class MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge @@ -24636,14 +24672,14 @@ class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptio public: MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24651,7 +24687,7 @@ class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge @@ -24684,14 +24720,14 @@ class MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscription public: MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24699,7 +24735,7 @@ class MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge @@ -24736,7 +24772,7 @@ class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubs public: MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -24744,7 +24780,7 @@ class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubs MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24752,7 +24788,7 @@ class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge @@ -24785,14 +24821,14 @@ class MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBrid public: MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24800,7 +24836,7 @@ class MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge @@ -24835,14 +24871,14 @@ class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscrip public: MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24850,7 +24886,7 @@ class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge @@ -24880,16 +24916,17 @@ class MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridg : public MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge { public: - MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24897,7 +24934,7 @@ class MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge @@ -24932,14 +24969,14 @@ class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscript public: MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24947,7 +24984,7 @@ class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge @@ -24977,16 +25014,17 @@ class MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge : public MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge { public: - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24994,7 +25032,7 @@ class MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge @@ -25029,14 +25067,14 @@ class MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscripti public: MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25044,7 +25082,7 @@ class MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFanControlClusterFanModeTypeAttributeCallbackBridge @@ -25075,14 +25113,14 @@ class MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFanControlClusterFanModeTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFanControlClusterFanModeTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25090,7 +25128,7 @@ class MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge @@ -25121,16 +25159,17 @@ class MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge : public MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge { public: - MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25138,7 +25177,7 @@ class MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterColorLoopActionAttributeCallbackBridge @@ -25171,14 +25210,14 @@ class MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterColorLoopActionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterColorLoopActionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25186,7 +25225,7 @@ class MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge @@ -25220,14 +25259,14 @@ class MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscription public: MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25235,7 +25274,7 @@ class MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge @@ -25265,16 +25304,17 @@ class MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridg : public MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge { public: - MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25282,7 +25322,7 @@ class MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge @@ -25317,14 +25357,14 @@ class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscript public: MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25332,7 +25372,7 @@ class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterColorModeAttributeCallbackBridge @@ -25363,14 +25403,14 @@ class MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterColorModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterColorModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25378,7 +25418,7 @@ class MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterColorModeAttributeCallbackBridge @@ -25409,16 +25449,17 @@ class MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge : public MTRNullableColorControlClusterColorModeAttributeCallbackBridge { public: - MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterColorModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterColorModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25426,7 +25467,7 @@ class MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterHueDirectionAttributeCallbackBridge @@ -25459,14 +25500,14 @@ class MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterHueDirectionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterHueDirectionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25474,7 +25515,7 @@ class MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge @@ -25508,14 +25549,14 @@ class MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBri public: MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25523,7 +25564,7 @@ class MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterHueMoveModeAttributeCallbackBridge @@ -25556,14 +25597,14 @@ class MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterHueMoveModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterHueMoveModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25571,7 +25612,7 @@ class MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge @@ -25605,14 +25646,14 @@ class MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBrid public: MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25620,7 +25661,7 @@ class MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterHueStepModeAttributeCallbackBridge @@ -25653,14 +25694,14 @@ class MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterHueStepModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterHueStepModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25668,7 +25709,7 @@ class MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge @@ -25702,14 +25743,14 @@ class MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBrid public: MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25717,7 +25758,7 @@ class MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge @@ -25747,16 +25788,17 @@ class MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridg : public MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge { public: - MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25764,7 +25806,7 @@ class MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge @@ -25799,14 +25841,14 @@ class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscript public: MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25814,7 +25856,7 @@ class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterSaturationStepModeAttributeCallbackBridge @@ -25844,16 +25886,17 @@ class MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridg : public MTRColorControlClusterSaturationStepModeAttributeCallbackBridge { public: - MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25861,7 +25904,7 @@ class MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge @@ -25896,14 +25939,14 @@ class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscript public: MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25911,7 +25954,7 @@ class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge @@ -25945,14 +25988,14 @@ class MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscripti public: MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25960,7 +26003,7 @@ class MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge @@ -25997,7 +26040,7 @@ class MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSu public: MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -26005,7 +26048,7 @@ class MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSu MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26013,7 +26056,7 @@ class MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSu static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelClusterChannelStatusEnumAttributeCallbackBridge @@ -26046,14 +26089,14 @@ class MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelClusterChannelStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelClusterChannelStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26061,7 +26104,7 @@ class MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge @@ -26095,14 +26138,14 @@ class MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBri public: MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26110,7 +26153,7 @@ class MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge @@ -26143,14 +26186,14 @@ class MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26158,7 +26201,7 @@ class MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge @@ -26192,14 +26235,14 @@ class MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBr public: MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26207,7 +26250,7 @@ class MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge @@ -26241,14 +26284,14 @@ class MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscri public: MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26256,7 +26299,7 @@ class MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge @@ -26294,7 +26337,7 @@ class MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbac public: MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -26302,7 +26345,7 @@ class MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbac MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26310,7 +26353,7 @@ class MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbac static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge @@ -26343,14 +26386,14 @@ class MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptio public: MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26358,7 +26401,7 @@ class MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge @@ -26395,7 +26438,7 @@ class MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSub public: MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -26403,7 +26446,7 @@ class MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSub MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26411,7 +26454,7 @@ class MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge @@ -26441,16 +26484,17 @@ class MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridg : public MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge { public: - MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26458,7 +26502,7 @@ class MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge @@ -26493,14 +26537,14 @@ class MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscript public: MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26508,7 +26552,7 @@ class MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge @@ -26541,14 +26585,14 @@ class MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26556,7 +26600,7 @@ class MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge @@ -26590,14 +26634,14 @@ class MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBrid public: MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26605,7 +26649,7 @@ class MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge @@ -26636,14 +26680,14 @@ class MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26651,7 +26695,7 @@ class MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge @@ -26682,16 +26726,17 @@ class MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge : public MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge { public: - MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26699,7 +26744,7 @@ class MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge @@ -26732,14 +26777,14 @@ class MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBri public: MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26747,7 +26792,7 @@ class MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge @@ -26782,14 +26827,14 @@ class MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscri public: MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26797,7 +26842,7 @@ class MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge @@ -26831,14 +26876,14 @@ class MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscript public: MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26846,7 +26891,7 @@ class MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge @@ -26883,7 +26928,7 @@ class MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackS public: MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -26891,7 +26936,7 @@ class MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackS MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26899,7 +26944,7 @@ class MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackS static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge @@ -26929,16 +26974,17 @@ class MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge : public MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge { public: - MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26946,7 +26992,7 @@ class MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge @@ -26981,14 +27027,14 @@ class MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscripti public: MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26996,7 +27042,7 @@ class MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherClusterParameterEnumAttributeCallbackBridge @@ -27026,16 +27072,17 @@ class MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge : public MTRContentLauncherClusterParameterEnumAttributeCallbackBridge { public: - MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherClusterParameterEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherClusterParameterEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27043,7 +27090,7 @@ class MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge @@ -27077,14 +27124,14 @@ class MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptio public: MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27092,7 +27139,7 @@ class MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge @@ -27125,14 +27172,14 @@ class MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27140,7 +27187,7 @@ class MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge @@ -27174,14 +27221,14 @@ class MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBr public: MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27189,7 +27236,7 @@ class MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge @@ -27225,7 +27272,7 @@ class MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbac public: MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -27233,7 +27280,7 @@ class MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbac MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27241,7 +27288,7 @@ class MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbac static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge @@ -27277,7 +27324,7 @@ class MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttribut public: MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -27285,7 +27332,7 @@ class MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttribut MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -27294,7 +27341,7 @@ class MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttribut static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge @@ -27328,14 +27375,14 @@ class MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscripti public: MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27343,7 +27390,7 @@ class MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge @@ -27380,7 +27427,7 @@ class MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSu public: MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -27388,7 +27435,7 @@ class MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSu MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27396,7 +27443,7 @@ class MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSu static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterClusterSimpleEnumAttributeCallbackBridge @@ -27427,14 +27474,14 @@ class MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27442,7 +27489,7 @@ class MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge @@ -27473,16 +27520,17 @@ class MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge : public MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge { public: - MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27490,7 +27538,7 @@ class MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge @@ -27523,14 +27571,14 @@ class MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27538,7 +27586,7 @@ class MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge @@ -27572,14 +27620,14 @@ class MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBrid public: MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : + SubscriptionEstablishedHandler establishedHandler) : MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27587,5 +27635,5 @@ class MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + SubscriptionEstablishedHandler mEstablishedHandler; }; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 2df9246dc8a98b..7215f6d7c83d08 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -15,1869 +15,1785 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import #import #pragma mark - Clusters IDs typedef NS_ENUM(uint32_t, MTRClusterIDType) { - MTRClusterIDTypeIdentifyID = 0x00000003, - MTRClusterIDTypeGroupsID = 0x00000004, - MTRClusterIDTypeScenesID = 0x00000005, - MTRClusterIDTypeOnOffID = 0x00000006, - MTRClusterIDTypeOnOffSwitchConfigurationID = 0x00000007, - MTRClusterIDTypeLevelControlID = 0x00000008, - MTRClusterIDTypeBinaryInputBasicID = 0x0000000F, - MTRClusterIDTypePulseWidthModulationID = 0x0000001C, - MTRClusterIDTypeDescriptorID = 0x0000001D, - MTRClusterIDTypeBindingID = 0x0000001E, - MTRClusterIDTypeAccessControlID = 0x0000001F, - MTRClusterIDTypeActionsID = 0x00000025, - MTRClusterIDTypeBasicID = 0x00000028, - MTRClusterIDTypeOTASoftwareUpdateProviderID = 0x00000029, - MTRClusterIDTypeOTASoftwareUpdateRequestorID = 0x0000002A, - MTRClusterIDTypeLocalizationConfigurationID = 0x0000002B, - MTRClusterIDTypeTimeFormatLocalizationID = 0x0000002C, - MTRClusterIDTypeUnitLocalizationID = 0x0000002D, - MTRClusterIDTypePowerSourceConfigurationID = 0x0000002E, - MTRClusterIDTypePowerSourceID = 0x0000002F, - MTRClusterIDTypeGeneralCommissioningID = 0x00000030, - MTRClusterIDTypeNetworkCommissioningID = 0x00000031, - MTRClusterIDTypeDiagnosticLogsID = 0x00000032, - MTRClusterIDTypeGeneralDiagnosticsID = 0x00000033, - MTRClusterIDTypeSoftwareDiagnosticsID = 0x00000034, - MTRClusterIDTypeThreadNetworkDiagnosticsID = 0x00000035, - MTRClusterIDTypeWiFiNetworkDiagnosticsID = 0x00000036, - MTRClusterIDTypeEthernetNetworkDiagnosticsID = 0x00000037, - MTRClusterIDTypeTimeSynchronizationID = 0x00000038, - MTRClusterIDTypeBridgedDeviceBasicID = 0x00000039, - MTRClusterIDTypeSwitchID = 0x0000003B, - MTRClusterIDTypeAdministratorCommissioningID = 0x0000003C, - MTRClusterIDTypeOperationalCredentialsID = 0x0000003E, - MTRClusterIDTypeGroupKeyManagementID = 0x0000003F, - MTRClusterIDTypeFixedLabelID = 0x00000040, - MTRClusterIDTypeUserLabelID = 0x00000041, - MTRClusterIDTypeProxyConfigurationID = 0x00000042, - MTRClusterIDTypeProxyDiscoveryID = 0x00000043, - MTRClusterIDTypeProxyValidID = 0x00000044, - MTRClusterIDTypeBooleanStateID = 0x00000045, - MTRClusterIDTypeModeSelectID = 0x00000050, - MTRClusterIDTypeDoorLockID = 0x00000101, - MTRClusterIDTypeWindowCoveringID = 0x00000102, - MTRClusterIDTypeBarrierControlID = 0x00000103, - MTRClusterIDTypePumpConfigurationAndControlID = 0x00000200, - MTRClusterIDTypeThermostatID = 0x00000201, - MTRClusterIDTypeFanControlID = 0x00000202, - MTRClusterIDTypeThermostatUserInterfaceConfigurationID = 0x00000204, - MTRClusterIDTypeColorControlID = 0x00000300, - MTRClusterIDTypeBallastConfigurationID = 0x00000301, - MTRClusterIDTypeIlluminanceMeasurementID = 0x00000400, - MTRClusterIDTypeTemperatureMeasurementID = 0x00000402, - MTRClusterIDTypePressureMeasurementID = 0x00000403, - MTRClusterIDTypeFlowMeasurementID = 0x00000404, - MTRClusterIDTypeRelativeHumidityMeasurementID = 0x00000405, - MTRClusterIDTypeOccupancySensingID = 0x00000406, - MTRClusterIDTypeWakeOnLANID = 0x00000503, - MTRClusterIDTypeChannelID = 0x00000504, - MTRClusterIDTypeTargetNavigatorID = 0x00000505, - MTRClusterIDTypeMediaPlaybackID = 0x00000506, - MTRClusterIDTypeMediaInputID = 0x00000507, - MTRClusterIDTypeLowPowerID = 0x00000508, - MTRClusterIDTypeKeypadInputID = 0x00000509, - MTRClusterIDTypeContentLauncherID = 0x0000050A, - MTRClusterIDTypeAudioOutputID = 0x0000050B, - MTRClusterIDTypeApplicationLauncherID = 0x0000050C, - MTRClusterIDTypeApplicationBasicID = 0x0000050D, - MTRClusterIDTypeAccountLoginID = 0x0000050E, - MTRClusterIDTypeElectricalMeasurementID = 0x00000B04, - MTRClusterIDTypeTestClusterID = 0xFFF1FC05, - MTRClusterIDTypeFaultInjectionID = 0xFFF1FC06, + MTRClusterIdentifyID = 0x00000003, + MTRClusterGroupsID = 0x00000004, + MTRClusterScenesID = 0x00000005, + MTRClusterOnOffID = 0x00000006, + MTRClusterOnOffSwitchConfigurationID = 0x00000007, + MTRClusterLevelControlID = 0x00000008, + MTRClusterBinaryInputBasicID = 0x0000000F, + MTRClusterPulseWidthModulationID = 0x0000001C, + MTRClusterDescriptorID = 0x0000001D, + MTRClusterBindingID = 0x0000001E, + MTRClusterAccessControlID = 0x0000001F, + MTRClusterActionsID = 0x00000025, + MTRClusterBasicID = 0x00000028, + MTRClusterOtaSoftwareUpdateProviderID = 0x00000029, + MTRClusterOtaSoftwareUpdateRequestorID = 0x0000002A, + MTRClusterLocalizationConfigurationID = 0x0000002B, + MTRClusterTimeFormatLocalizationID = 0x0000002C, + MTRClusterUnitLocalizationID = 0x0000002D, + MTRClusterPowerSourceConfigurationID = 0x0000002E, + MTRClusterPowerSourceID = 0x0000002F, + MTRClusterGeneralCommissioningID = 0x00000030, + MTRClusterNetworkCommissioningID = 0x00000031, + MTRClusterDiagnosticLogsID = 0x00000032, + MTRClusterGeneralDiagnosticsID = 0x00000033, + MTRClusterSoftwareDiagnosticsID = 0x00000034, + MTRClusterThreadNetworkDiagnosticsID = 0x00000035, + MTRClusterWiFiNetworkDiagnosticsID = 0x00000036, + MTRClusterEthernetNetworkDiagnosticsID = 0x00000037, + MTRClusterTimeSynchronizationID = 0x00000038, + MTRClusterBridgedDeviceBasicID = 0x00000039, + MTRClusterSwitchID = 0x0000003B, + MTRClusterAdministratorCommissioningID = 0x0000003C, + MTRClusterOperationalCredentialsID = 0x0000003E, + MTRClusterGroupKeyManagementID = 0x0000003F, + MTRClusterFixedLabelID = 0x00000040, + MTRClusterUserLabelID = 0x00000041, + MTRClusterProxyConfigurationID = 0x00000042, + MTRClusterProxyDiscoveryID = 0x00000043, + MTRClusterProxyValidID = 0x00000044, + MTRClusterBooleanStateID = 0x00000045, + MTRClusterModeSelectID = 0x00000050, + MTRClusterDoorLockID = 0x00000101, + MTRClusterWindowCoveringID = 0x00000102, + MTRClusterBarrierControlID = 0x00000103, + MTRClusterPumpConfigurationAndControlID = 0x00000200, + MTRClusterThermostatID = 0x00000201, + MTRClusterFanControlID = 0x00000202, + MTRClusterThermostatUserInterfaceConfigurationID = 0x00000204, + MTRClusterColorControlID = 0x00000300, + MTRClusterBallastConfigurationID = 0x00000301, + MTRClusterIlluminanceMeasurementID = 0x00000400, + MTRClusterTemperatureMeasurementID = 0x00000402, + MTRClusterPressureMeasurementID = 0x00000403, + MTRClusterFlowMeasurementID = 0x00000404, + MTRClusterRelativeHumidityMeasurementID = 0x00000405, + MTRClusterOccupancySensingID = 0x00000406, + MTRClusterWakeOnLanID = 0x00000503, + MTRClusterChannelID = 0x00000504, + MTRClusterTargetNavigatorID = 0x00000505, + MTRClusterMediaPlaybackID = 0x00000506, + MTRClusterMediaInputID = 0x00000507, + MTRClusterLowPowerID = 0x00000508, + MTRClusterKeypadInputID = 0x00000509, + MTRClusterContentLauncherID = 0x0000050A, + MTRClusterAudioOutputID = 0x0000050B, + MTRClusterApplicationLauncherID = 0x0000050C, + MTRClusterApplicationBasicID = 0x0000050D, + MTRClusterAccountLoginID = 0x0000050E, + MTRClusterElectricalMeasurementID = 0x00000B04, + MTRClusterTestClusterID = 0xFFF1FC05, + MTRClusterFaultInjectionID = 0xFFF1FC06, }; #pragma mark - Attributes IDs -typedef NS_ENUM(uint32_t, MTRAttributeIDType) { +typedef NS_ENUM(uint32_t, MTRClusterAttributeIDType) { // Global attributes - MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID = 0x0000FFF8, - MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID = 0x0000FFF9, - MTRAttributeIDTypeGlobalAttributeAttributeListID = 0x0000FFFB, - MTRAttributeIDTypeGlobalAttributeFeatureMapID = 0x0000FFFC, - MTRAttributeIDTypeGlobalAttributeClusterRevisionID = 0x0000FFFD, + MTRClusterGlobalAttributeGeneratedCommandListID = 0x0000FFF8, + MTRClusterGlobalAttributeAcceptedCommandListID = 0x0000FFF9, + MTRClusterGlobalAttributeAttributeListID = 0x0000FFFB, + MTRClusterGlobalAttributeFeatureMapID = 0x0000FFFC, + MTRClusterGlobalAttributeClusterRevisionID = 0x0000FFFD, // Cluster Identify attributes - MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID = 0x00000000, - MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTypeID = 0x00000001, - MTRAttributeIDTypeClusterIdentifyAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterIdentifyAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterIdentifyAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterIdentifyAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterIdentifyAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterIdentifyAttributeIdentifyTimeID = 0x00000000, + MTRClusterIdentifyAttributeIdentifyTypeID = 0x00000001, + MTRClusterIdentifyAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterIdentifyAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterIdentifyAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterIdentifyAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterIdentifyAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster Groups attributes - MTRAttributeIDTypeClusterGroupsAttributeNameSupportID = 0x00000000, - MTRAttributeIDTypeClusterGroupsAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterGroupsAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterGroupsAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterGroupsAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterGroupsAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterGroupsAttributeNameSupportID = 0x00000000, + MTRClusterGroupsAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterGroupsAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterGroupsAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterGroupsAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterGroupsAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster Scenes attributes - MTRAttributeIDTypeClusterScenesAttributeSceneCountID = 0x00000000, - MTRAttributeIDTypeClusterScenesAttributeCurrentSceneID = 0x00000001, - MTRAttributeIDTypeClusterScenesAttributeCurrentGroupID = 0x00000002, - MTRAttributeIDTypeClusterScenesAttributeSceneValidID = 0x00000003, - MTRAttributeIDTypeClusterScenesAttributeNameSupportID = 0x00000004, - MTRAttributeIDTypeClusterScenesAttributeLastConfiguredByID = 0x00000005, - MTRAttributeIDTypeClusterScenesAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterScenesAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterScenesAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterScenesAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterScenesAttributeSceneCountID = 0x00000000, + MTRClusterScenesAttributeCurrentSceneID = 0x00000001, + MTRClusterScenesAttributeCurrentGroupID = 0x00000002, + MTRClusterScenesAttributeSceneValidID = 0x00000003, + MTRClusterScenesAttributeNameSupportID = 0x00000004, + MTRClusterScenesAttributeLastConfiguredByID = 0x00000005, + MTRClusterScenesAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterScenesAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterScenesAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterScenesAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterScenesAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster OnOff attributes - MTRAttributeIDTypeClusterOnOffAttributeOnOffID = 0x00000000, - MTRAttributeIDTypeClusterOnOffAttributeGlobalSceneControlID = 0x00004000, - MTRAttributeIDTypeClusterOnOffAttributeOnTimeID = 0x00004001, - MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID = 0x00004002, - MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID = 0x00004003, - MTRAttributeIDTypeClusterOnOffAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOnOffAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOnOffAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterOnOffAttributeOnOffID = 0x00000000, + MTRClusterOnOffAttributeGlobalSceneControlID = 0x00004000, + MTRClusterOnOffAttributeOnTimeID = 0x00004001, + MTRClusterOnOffAttributeOffWaitTimeID = 0x00004002, + MTRClusterOnOffAttributeStartUpOnOffID = 0x00004003, + MTRClusterOnOffAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterOnOffAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterOnOffAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterOnOffAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterOnOffAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster OnOffSwitchConfiguration attributes - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID = 0x00000000, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID = 0x00000010, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterOnOffSwitchConfigurationAttributeSwitchTypeID = 0x00000000, + MTRClusterOnOffSwitchConfigurationAttributeSwitchActionsID = 0x00000010, + MTRClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterOnOffSwitchConfigurationAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterOnOffSwitchConfigurationAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterOnOffSwitchConfigurationAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster LevelControl attributes - MTRAttributeIDTypeClusterLevelControlAttributeCurrentLevelID = 0x00000000, - MTRAttributeIDTypeClusterLevelControlAttributeRemainingTimeID = 0x00000001, - MTRAttributeIDTypeClusterLevelControlAttributeMinLevelID = 0x00000002, - MTRAttributeIDTypeClusterLevelControlAttributeMaxLevelID = 0x00000003, - MTRAttributeIDTypeClusterLevelControlAttributeCurrentFrequencyID = 0x00000004, - MTRAttributeIDTypeClusterLevelControlAttributeMinFrequencyID = 0x00000005, - MTRAttributeIDTypeClusterLevelControlAttributeMaxFrequencyID = 0x00000006, - MTRAttributeIDTypeClusterLevelControlAttributeOptionsID = 0x0000000F, - MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID = 0x00000010, - MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID = 0x00000011, - MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID = 0x00000012, - MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID = 0x00000013, - MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID = 0x00000014, - MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID = 0x00004000, - MTRAttributeIDTypeClusterLevelControlAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterLevelControlAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLevelControlAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterLevelControlAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterLevelControlAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterLevelControlAttributeCurrentLevelID = 0x00000000, + MTRClusterLevelControlAttributeRemainingTimeID = 0x00000001, + MTRClusterLevelControlAttributeMinLevelID = 0x00000002, + MTRClusterLevelControlAttributeMaxLevelID = 0x00000003, + MTRClusterLevelControlAttributeCurrentFrequencyID = 0x00000004, + MTRClusterLevelControlAttributeMinFrequencyID = 0x00000005, + MTRClusterLevelControlAttributeMaxFrequencyID = 0x00000006, + MTRClusterLevelControlAttributeOptionsID = 0x0000000F, + MTRClusterLevelControlAttributeOnOffTransitionTimeID = 0x00000010, + MTRClusterLevelControlAttributeOnLevelID = 0x00000011, + MTRClusterLevelControlAttributeOnTransitionTimeID = 0x00000012, + MTRClusterLevelControlAttributeOffTransitionTimeID = 0x00000013, + MTRClusterLevelControlAttributeDefaultMoveRateID = 0x00000014, + MTRClusterLevelControlAttributeStartUpCurrentLevelID = 0x00004000, + MTRClusterLevelControlAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterLevelControlAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterLevelControlAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterLevelControlAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterLevelControlAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster BinaryInputBasic attributes - MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID = 0x00000004, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID = 0x0000001C, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID = 0x0000002E, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID = 0x00000051, - MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID = 0x00000054, - MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID = 0x00000055, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID = 0x00000067, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID = 0x0000006F, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID = 0x00000100, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterBinaryInputBasicAttributeActiveTextID = 0x00000004, + MTRClusterBinaryInputBasicAttributeDescriptionID = 0x0000001C, + MTRClusterBinaryInputBasicAttributeInactiveTextID = 0x0000002E, + MTRClusterBinaryInputBasicAttributeOutOfServiceID = 0x00000051, + MTRClusterBinaryInputBasicAttributePolarityID = 0x00000054, + MTRClusterBinaryInputBasicAttributePresentValueID = 0x00000055, + MTRClusterBinaryInputBasicAttributeReliabilityID = 0x00000067, + MTRClusterBinaryInputBasicAttributeStatusFlagsID = 0x0000006F, + MTRClusterBinaryInputBasicAttributeApplicationTypeID = 0x00000100, + MTRClusterBinaryInputBasicAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterBinaryInputBasicAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterBinaryInputBasicAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterBinaryInputBasicAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterBinaryInputBasicAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster PulseWidthModulation attributes - MTRAttributeIDTypeClusterPulseWidthModulationAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterPulseWidthModulationAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPulseWidthModulationAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterPulseWidthModulationAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterPulseWidthModulationAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterPulseWidthModulationAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterPulseWidthModulationAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterPulseWidthModulationAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterPulseWidthModulationAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterPulseWidthModulationAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster Descriptor attributes - MTRAttributeIDTypeClusterDescriptorAttributeDeviceTypeListID = 0x00000000, - MTRAttributeIDTypeClusterDescriptorAttributeServerListID = 0x00000001, - MTRAttributeIDTypeClusterDescriptorAttributeClientListID = 0x00000002, - MTRAttributeIDTypeClusterDescriptorAttributePartsListID = 0x00000003, - MTRAttributeIDTypeClusterDescriptorAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterDescriptorAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDescriptorAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterDescriptorAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterDescriptorAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterDescriptorAttributeDeviceTypeListID = 0x00000000, + MTRClusterDescriptorAttributeDeviceListID = MTRClusterDescriptorAttributeDeviceTypeListID, + MTRClusterDescriptorAttributeServerListID = 0x00000001, + MTRClusterDescriptorAttributeClientListID = 0x00000002, + MTRClusterDescriptorAttributePartsListID = 0x00000003, + MTRClusterDescriptorAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterDescriptorAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterDescriptorAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterDescriptorAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterDescriptorAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster Binding attributes - MTRAttributeIDTypeClusterBindingAttributeBindingID = 0x00000000, - MTRAttributeIDTypeClusterBindingAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterBindingAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBindingAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterBindingAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterBindingAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterBindingAttributeBindingID = 0x00000000, + MTRClusterBindingAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterBindingAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterBindingAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterBindingAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterBindingAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster AccessControl attributes - MTRAttributeIDTypeClusterAccessControlAttributeACLID = 0x00000000, - MTRAttributeIDTypeClusterAccessControlAttributeExtensionID = 0x00000001, - MTRAttributeIDTypeClusterAccessControlAttributeSubjectsPerAccessControlEntryID = 0x00000002, - MTRAttributeIDTypeClusterAccessControlAttributeTargetsPerAccessControlEntryID = 0x00000003, - MTRAttributeIDTypeClusterAccessControlAttributeAccessControlEntriesPerFabricID = 0x00000004, - MTRAttributeIDTypeClusterAccessControlAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterAccessControlAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAccessControlAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterAccessControlAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterAccessControlAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterAccessControlAttributeAclID = 0x00000000, + MTRClusterAccessControlAttributeExtensionID = 0x00000001, + MTRClusterAccessControlAttributeSubjectsPerAccessControlEntryID = 0x00000002, + MTRClusterAccessControlAttributeTargetsPerAccessControlEntryID = 0x00000003, + MTRClusterAccessControlAttributeAccessControlEntriesPerFabricID = 0x00000004, + MTRClusterAccessControlAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterAccessControlAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterAccessControlAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterAccessControlAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterAccessControlAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster Actions attributes - MTRAttributeIDTypeClusterActionsAttributeActionListID = 0x00000000, - MTRAttributeIDTypeClusterActionsAttributeEndpointListsID = 0x00000001, - MTRAttributeIDTypeClusterActionsAttributeSetupURLID = 0x00000002, - MTRAttributeIDTypeClusterActionsAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterActionsAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterActionsAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterActionsAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterActionsAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterActionsAttributeActionListID = 0x00000000, + MTRClusterActionsAttributeEndpointListsID = 0x00000001, + MTRClusterActionsAttributeSetupURLID = 0x00000002, + MTRClusterActionsAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterActionsAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterActionsAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterActionsAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterActionsAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster Basic attributes - MTRAttributeIDTypeClusterBasicAttributeDataModelRevisionID = 0x00000000, - MTRAttributeIDTypeClusterBasicAttributeVendorNameID = 0x00000001, - MTRAttributeIDTypeClusterBasicAttributeVendorIDID = 0x00000002, - MTRAttributeIDTypeClusterBasicAttributeProductNameID = 0x00000003, - MTRAttributeIDTypeClusterBasicAttributeProductIDID = 0x00000004, - MTRAttributeIDTypeClusterBasicAttributeNodeLabelID = 0x00000005, - MTRAttributeIDTypeClusterBasicAttributeLocationID = 0x00000006, - MTRAttributeIDTypeClusterBasicAttributeHardwareVersionID = 0x00000007, - MTRAttributeIDTypeClusterBasicAttributeHardwareVersionStringID = 0x00000008, - MTRAttributeIDTypeClusterBasicAttributeSoftwareVersionID = 0x00000009, - MTRAttributeIDTypeClusterBasicAttributeSoftwareVersionStringID = 0x0000000A, - MTRAttributeIDTypeClusterBasicAttributeManufacturingDateID = 0x0000000B, - MTRAttributeIDTypeClusterBasicAttributePartNumberID = 0x0000000C, - MTRAttributeIDTypeClusterBasicAttributeProductURLID = 0x0000000D, - MTRAttributeIDTypeClusterBasicAttributeProductLabelID = 0x0000000E, - MTRAttributeIDTypeClusterBasicAttributeSerialNumberID = 0x0000000F, - MTRAttributeIDTypeClusterBasicAttributeLocalConfigDisabledID = 0x00000010, - MTRAttributeIDTypeClusterBasicAttributeReachableID = 0x00000011, - MTRAttributeIDTypeClusterBasicAttributeUniqueIDID = 0x00000012, - MTRAttributeIDTypeClusterBasicAttributeCapabilityMinimaID = 0x00000013, - MTRAttributeIDTypeClusterBasicAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterBasicAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBasicAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterBasicAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterBasicAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster OTASoftwareUpdateProvider attributes - MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeClusterRevisionID - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster OTASoftwareUpdateRequestor attributes - MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOtaProvidersID = 0x00000000, - MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdatePossibleID = 0x00000001, - MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateID = 0x00000002, - MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateProgressID = 0x00000003, - MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeClusterRevisionID - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterBasicAttributeDataModelRevisionID = 0x00000000, + MTRClusterBasicAttributeVendorNameID = 0x00000001, + MTRClusterBasicAttributeVendorIDID = 0x00000002, + MTRClusterBasicAttributeProductNameID = 0x00000003, + MTRClusterBasicAttributeProductIDID = 0x00000004, + MTRClusterBasicAttributeNodeLabelID = 0x00000005, + MTRClusterBasicAttributeLocationID = 0x00000006, + MTRClusterBasicAttributeHardwareVersionID = 0x00000007, + MTRClusterBasicAttributeHardwareVersionStringID = 0x00000008, + MTRClusterBasicAttributeSoftwareVersionID = 0x00000009, + MTRClusterBasicAttributeSoftwareVersionStringID = 0x0000000A, + MTRClusterBasicAttributeManufacturingDateID = 0x0000000B, + MTRClusterBasicAttributePartNumberID = 0x0000000C, + MTRClusterBasicAttributeProductURLID = 0x0000000D, + MTRClusterBasicAttributeProductLabelID = 0x0000000E, + MTRClusterBasicAttributeSerialNumberID = 0x0000000F, + MTRClusterBasicAttributeLocalConfigDisabledID = 0x00000010, + MTRClusterBasicAttributeReachableID = 0x00000011, + MTRClusterBasicAttributeUniqueIDID = 0x00000012, + MTRClusterBasicAttributeCapabilityMinimaID = 0x00000013, + MTRClusterBasicAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterBasicAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterBasicAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterBasicAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterBasicAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, + + // Cluster OtaSoftwareUpdateProvider attributes + MTRClusterOtaSoftwareUpdateProviderAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterOtaSoftwareUpdateProviderAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterOtaSoftwareUpdateProviderAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterOtaSoftwareUpdateProviderAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterOtaSoftwareUpdateProviderAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, + + // Cluster OtaSoftwareUpdateRequestor attributes + MTRClusterOtaSoftwareUpdateRequestorAttributeDefaultOtaProvidersID = 0x00000000, + MTRClusterOtaSoftwareUpdateRequestorAttributeUpdatePossibleID = 0x00000001, + MTRClusterOtaSoftwareUpdateRequestorAttributeUpdateStateID = 0x00000002, + MTRClusterOtaSoftwareUpdateRequestorAttributeUpdateStateProgressID = 0x00000003, + MTRClusterOtaSoftwareUpdateRequestorAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterOtaSoftwareUpdateRequestorAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterOtaSoftwareUpdateRequestorAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterOtaSoftwareUpdateRequestorAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterOtaSoftwareUpdateRequestorAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster LocalizationConfiguration attributes - MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID = 0x00000000, - MTRAttributeIDTypeClusterLocalizationConfigurationAttributeSupportedLocalesID = 0x00000001, - MTRAttributeIDTypeClusterLocalizationConfigurationAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterLocalizationConfigurationAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterLocalizationConfigurationAttributeClusterRevisionID - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterLocalizationConfigurationAttributeActiveLocaleID = 0x00000000, + MTRClusterLocalizationConfigurationAttributeSupportedLocalesID = 0x00000001, + MTRClusterLocalizationConfigurationAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterLocalizationConfigurationAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterLocalizationConfigurationAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterLocalizationConfigurationAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterLocalizationConfigurationAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster TimeFormatLocalization attributes - MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID = 0x00000000, - MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID = 0x00000001, - MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeSupportedCalendarTypesID = 0x00000002, - MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterTimeFormatLocalizationAttributeHourFormatID = 0x00000000, + MTRClusterTimeFormatLocalizationAttributeActiveCalendarTypeID = 0x00000001, + MTRClusterTimeFormatLocalizationAttributeSupportedCalendarTypesID = 0x00000002, + MTRClusterTimeFormatLocalizationAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterTimeFormatLocalizationAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterTimeFormatLocalizationAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterTimeFormatLocalizationAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterTimeFormatLocalizationAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster UnitLocalization attributes - MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID = 0x00000000, - MTRAttributeIDTypeClusterUnitLocalizationAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterUnitLocalizationAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterUnitLocalizationAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterUnitLocalizationAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterUnitLocalizationAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterUnitLocalizationAttributeTemperatureUnitID = 0x00000000, + MTRClusterUnitLocalizationAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterUnitLocalizationAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterUnitLocalizationAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterUnitLocalizationAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterUnitLocalizationAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster PowerSourceConfiguration attributes - MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeSourcesID = 0x00000000, - MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeClusterRevisionID - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterPowerSourceConfigurationAttributeSourcesID = 0x00000000, + MTRClusterPowerSourceConfigurationAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterPowerSourceConfigurationAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterPowerSourceConfigurationAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterPowerSourceConfigurationAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterPowerSourceConfigurationAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster PowerSource attributes - MTRAttributeIDTypeClusterPowerSourceAttributeStatusID = 0x00000000, - MTRAttributeIDTypeClusterPowerSourceAttributeOrderID = 0x00000001, - MTRAttributeIDTypeClusterPowerSourceAttributeDescriptionID = 0x00000002, - MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputVoltageID = 0x00000003, - MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputFrequencyID = 0x00000004, - MTRAttributeIDTypeClusterPowerSourceAttributeWiredCurrentTypeID = 0x00000005, - MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedCurrentID = 0x00000006, - MTRAttributeIDTypeClusterPowerSourceAttributeWiredNominalVoltageID = 0x00000007, - MTRAttributeIDTypeClusterPowerSourceAttributeWiredMaximumCurrentID = 0x00000008, - MTRAttributeIDTypeClusterPowerSourceAttributeWiredPresentID = 0x00000009, - MTRAttributeIDTypeClusterPowerSourceAttributeActiveWiredFaultsID = 0x0000000A, - MTRAttributeIDTypeClusterPowerSourceAttributeBatVoltageID = 0x0000000B, - MTRAttributeIDTypeClusterPowerSourceAttributeBatPercentRemainingID = 0x0000000C, - MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeRemainingID = 0x0000000D, - MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeLevelID = 0x0000000E, - MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementNeededID = 0x0000000F, - MTRAttributeIDTypeClusterPowerSourceAttributeBatReplaceabilityID = 0x00000010, - MTRAttributeIDTypeClusterPowerSourceAttributeBatPresentID = 0x00000011, - MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatFaultsID = 0x00000012, - MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementDescriptionID = 0x00000013, - MTRAttributeIDTypeClusterPowerSourceAttributeBatCommonDesignationID = 0x00000014, - MTRAttributeIDTypeClusterPowerSourceAttributeBatANSIDesignationID = 0x00000015, - MTRAttributeIDTypeClusterPowerSourceAttributeBatIECDesignationID = 0x00000016, - MTRAttributeIDTypeClusterPowerSourceAttributeBatApprovedChemistryID = 0x00000017, - MTRAttributeIDTypeClusterPowerSourceAttributeBatCapacityID = 0x00000018, - MTRAttributeIDTypeClusterPowerSourceAttributeBatQuantityID = 0x00000019, - MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeStateID = 0x0000001A, - MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeToFullChargeID = 0x0000001B, - MTRAttributeIDTypeClusterPowerSourceAttributeBatFunctionalWhileChargingID = 0x0000001C, - MTRAttributeIDTypeClusterPowerSourceAttributeBatChargingCurrentID = 0x0000001D, - MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatChargeFaultsID = 0x0000001E, - MTRAttributeIDTypeClusterPowerSourceAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterPowerSourceAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPowerSourceAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterPowerSourceAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterPowerSourceAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterPowerSourceAttributeStatusID = 0x00000000, + MTRClusterPowerSourceAttributeOrderID = 0x00000001, + MTRClusterPowerSourceAttributeDescriptionID = 0x00000002, + MTRClusterPowerSourceAttributeWiredAssessedInputVoltageID = 0x00000003, + MTRClusterPowerSourceAttributeWiredAssessedInputFrequencyID = 0x00000004, + MTRClusterPowerSourceAttributeWiredCurrentTypeID = 0x00000005, + MTRClusterPowerSourceAttributeWiredAssessedCurrentID = 0x00000006, + MTRClusterPowerSourceAttributeWiredNominalVoltageID = 0x00000007, + MTRClusterPowerSourceAttributeWiredMaximumCurrentID = 0x00000008, + MTRClusterPowerSourceAttributeWiredPresentID = 0x00000009, + MTRClusterPowerSourceAttributeActiveWiredFaultsID = 0x0000000A, + MTRClusterPowerSourceAttributeBatVoltageID = 0x0000000B, + MTRClusterPowerSourceAttributeBatPercentRemainingID = 0x0000000C, + MTRClusterPowerSourceAttributeBatTimeRemainingID = 0x0000000D, + MTRClusterPowerSourceAttributeBatChargeLevelID = 0x0000000E, + MTRClusterPowerSourceAttributeBatReplacementNeededID = 0x0000000F, + MTRClusterPowerSourceAttributeBatReplaceabilityID = 0x00000010, + MTRClusterPowerSourceAttributeBatPresentID = 0x00000011, + MTRClusterPowerSourceAttributeActiveBatFaultsID = 0x00000012, + MTRClusterPowerSourceAttributeBatReplacementDescriptionID = 0x00000013, + MTRClusterPowerSourceAttributeBatCommonDesignationID = 0x00000014, + MTRClusterPowerSourceAttributeBatANSIDesignationID = 0x00000015, + MTRClusterPowerSourceAttributeBatIECDesignationID = 0x00000016, + MTRClusterPowerSourceAttributeBatApprovedChemistryID = 0x00000017, + MTRClusterPowerSourceAttributeBatCapacityID = 0x00000018, + MTRClusterPowerSourceAttributeBatQuantityID = 0x00000019, + MTRClusterPowerSourceAttributeBatChargeStateID = 0x0000001A, + MTRClusterPowerSourceAttributeBatTimeToFullChargeID = 0x0000001B, + MTRClusterPowerSourceAttributeBatFunctionalWhileChargingID = 0x0000001C, + MTRClusterPowerSourceAttributeBatChargingCurrentID = 0x0000001D, + MTRClusterPowerSourceAttributeActiveBatChargeFaultsID = 0x0000001E, + MTRClusterPowerSourceAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterPowerSourceAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterPowerSourceAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterPowerSourceAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterPowerSourceAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster GeneralCommissioning attributes - MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID = 0x00000000, - MTRAttributeIDTypeClusterGeneralCommissioningAttributeBasicCommissioningInfoID = 0x00000001, - MTRAttributeIDTypeClusterGeneralCommissioningAttributeRegulatoryConfigID = 0x00000002, - MTRAttributeIDTypeClusterGeneralCommissioningAttributeLocationCapabilityID = 0x00000003, - MTRAttributeIDTypeClusterGeneralCommissioningAttributeSupportsConcurrentConnectionID = 0x00000004, - MTRAttributeIDTypeClusterGeneralCommissioningAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterGeneralCommissioningAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterGeneralCommissioningAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterGeneralCommissioningAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterGeneralCommissioningAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterGeneralCommissioningAttributeBreadcrumbID = 0x00000000, + MTRClusterGeneralCommissioningAttributeBasicCommissioningInfoID = 0x00000001, + MTRClusterGeneralCommissioningAttributeRegulatoryConfigID = 0x00000002, + MTRClusterGeneralCommissioningAttributeLocationCapabilityID = 0x00000003, + MTRClusterGeneralCommissioningAttributeSupportsConcurrentConnectionID = 0x00000004, + MTRClusterGeneralCommissioningAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterGeneralCommissioningAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterGeneralCommissioningAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterGeneralCommissioningAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterGeneralCommissioningAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster NetworkCommissioning attributes - MTRAttributeIDTypeClusterNetworkCommissioningAttributeMaxNetworksID = 0x00000000, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeNetworksID = 0x00000001, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeScanMaxTimeSecondsID = 0x00000002, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeConnectMaxTimeSecondsID = 0x00000003, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID = 0x00000004, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkingStatusID = 0x00000005, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkIDID = 0x00000006, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastConnectErrorValueID = 0x00000007, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterNetworkCommissioningAttributeMaxNetworksID = 0x00000000, + MTRClusterNetworkCommissioningAttributeNetworksID = 0x00000001, + MTRClusterNetworkCommissioningAttributeScanMaxTimeSecondsID = 0x00000002, + MTRClusterNetworkCommissioningAttributeConnectMaxTimeSecondsID = 0x00000003, + MTRClusterNetworkCommissioningAttributeInterfaceEnabledID = 0x00000004, + MTRClusterNetworkCommissioningAttributeLastNetworkingStatusID = 0x00000005, + MTRClusterNetworkCommissioningAttributeLastNetworkIDID = 0x00000006, + MTRClusterNetworkCommissioningAttributeLastConnectErrorValueID = 0x00000007, + MTRClusterNetworkCommissioningAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterNetworkCommissioningAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterNetworkCommissioningAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterNetworkCommissioningAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterNetworkCommissioningAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster DiagnosticLogs attributes - MTRAttributeIDTypeClusterDiagnosticLogsAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterDiagnosticLogsAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDiagnosticLogsAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterDiagnosticLogsAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterDiagnosticLogsAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterDiagnosticLogsAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterDiagnosticLogsAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterDiagnosticLogsAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterDiagnosticLogsAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterDiagnosticLogsAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster GeneralDiagnostics attributes - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeNetworkInterfacesID = 0x00000000, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeRebootCountID = 0x00000001, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeUpTimeID = 0x00000002, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTotalOperationalHoursID = 0x00000003, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeBootReasonsID = 0x00000004, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveHardwareFaultsID = 0x00000005, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveRadioFaultsID = 0x00000006, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveNetworkFaultsID = 0x00000007, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID = 0x00000008, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterGeneralDiagnosticsAttributeNetworkInterfacesID = 0x00000000, + MTRClusterGeneralDiagnosticsAttributeRebootCountID = 0x00000001, + MTRClusterGeneralDiagnosticsAttributeUpTimeID = 0x00000002, + MTRClusterGeneralDiagnosticsAttributeTotalOperationalHoursID = 0x00000003, + MTRClusterGeneralDiagnosticsAttributeBootReasonsID = 0x00000004, + MTRClusterGeneralDiagnosticsAttributeActiveHardwareFaultsID = 0x00000005, + MTRClusterGeneralDiagnosticsAttributeActiveRadioFaultsID = 0x00000006, + MTRClusterGeneralDiagnosticsAttributeActiveNetworkFaultsID = 0x00000007, + MTRClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID = 0x00000008, + MTRClusterGeneralDiagnosticsAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterGeneralDiagnosticsAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterGeneralDiagnosticsAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterGeneralDiagnosticsAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterGeneralDiagnosticsAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster SoftwareDiagnostics attributes - MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeThreadMetricsID = 0x00000000, - MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapFreeID = 0x00000001, - MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapUsedID = 0x00000002, - MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapHighWatermarkID = 0x00000003, - MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterSoftwareDiagnosticsAttributeThreadMetricsID = 0x00000000, + MTRClusterSoftwareDiagnosticsAttributeCurrentHeapFreeID = 0x00000001, + MTRClusterSoftwareDiagnosticsAttributeCurrentHeapUsedID = 0x00000002, + MTRClusterSoftwareDiagnosticsAttributeCurrentHeapHighWatermarkID = 0x00000003, + MTRClusterSoftwareDiagnosticsAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterSoftwareDiagnosticsAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterSoftwareDiagnosticsAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterSoftwareDiagnosticsAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterSoftwareDiagnosticsAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster ThreadNetworkDiagnostics attributes - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelID = 0x00000000, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRoutingRoleID = 0x00000001, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNetworkNameID = 0x00000002, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePanIdID = 0x00000003, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeExtendedPanIdID = 0x00000004, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeMeshLocalPrefixID = 0x00000005, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOverrunCountID = 0x00000006, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNeighborTableListID = 0x00000007, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouteTableListID = 0x00000008, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdID = 0x00000009, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeWeightingID = 0x0000000A, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDataVersionID = 0x0000000B, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeStableDataVersionID = 0x0000000C, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRouterIdID = 0x0000000D, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDetachedRoleCountID = 0x0000000E, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChildRoleCountID = 0x0000000F, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouterRoleCountID = 0x00000010, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRoleCountID = 0x00000011, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttachAttemptCountID = 0x00000012, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdChangeCountID = 0x00000013, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeBetterPartitionAttachAttemptCountID = 0x00000014, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeParentChangeCountID = 0x00000015, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxTotalCountID = 0x00000016, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxUnicastCountID = 0x00000017, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBroadcastCountID = 0x00000018, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckRequestedCountID = 0x00000019, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckedCountID = 0x0000001A, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxNoAckRequestedCountID = 0x0000001B, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataCountID = 0x0000001C, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataPollCountID = 0x0000001D, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconCountID = 0x0000001E, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconRequestCountID = 0x0000001F, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxOtherCountID = 0x00000020, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxRetryCountID = 0x00000021, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDirectMaxRetryExpiryCountID = 0x00000022, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxIndirectMaxRetryExpiryCountID = 0x00000023, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrCcaCountID = 0x00000024, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrAbortCountID = 0x00000025, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrBusyChannelCountID = 0x00000026, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxTotalCountID = 0x00000027, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxUnicastCountID = 0x00000028, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBroadcastCountID = 0x00000029, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataCountID = 0x0000002A, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataPollCountID = 0x0000002B, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconCountID = 0x0000002C, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconRequestCountID = 0x0000002D, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxOtherCountID = 0x0000002E, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxAddressFilteredCountID = 0x0000002F, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDestAddrFilteredCountID = 0x00000030, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDuplicatedCountID = 0x00000031, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrNoFrameCountID = 0x00000032, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrUnknownNeighborCountID = 0x00000033, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrInvalidSrcAddrCountID = 0x00000034, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrSecCountID = 0x00000035, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrFcsCountID = 0x00000036, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrOtherCountID = 0x00000037, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveTimestampID = 0x00000038, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePendingTimestampID = 0x00000039, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDelayID = 0x0000003A, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeSecurityPolicyID = 0x0000003B, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelPage0MaskID = 0x0000003C, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOperationalDatasetComponentsID = 0x0000003D, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveNetworkFaultsListID = 0x0000003E, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeClusterRevisionID - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterThreadNetworkDiagnosticsAttributeChannelID = 0x00000000, + MTRClusterThreadNetworkDiagnosticsAttributeRoutingRoleID = 0x00000001, + MTRClusterThreadNetworkDiagnosticsAttributeNetworkNameID = 0x00000002, + MTRClusterThreadNetworkDiagnosticsAttributePanIdID = 0x00000003, + MTRClusterThreadNetworkDiagnosticsAttributeExtendedPanIdID = 0x00000004, + MTRClusterThreadNetworkDiagnosticsAttributeMeshLocalPrefixID = 0x00000005, + MTRClusterThreadNetworkDiagnosticsAttributeOverrunCountID = 0x00000006, + MTRClusterThreadNetworkDiagnosticsAttributeNeighborTableListID = 0x00000007, + MTRClusterThreadNetworkDiagnosticsAttributeRouteTableListID = 0x00000008, + MTRClusterThreadNetworkDiagnosticsAttributePartitionIdID = 0x00000009, + MTRClusterThreadNetworkDiagnosticsAttributeWeightingID = 0x0000000A, + MTRClusterThreadNetworkDiagnosticsAttributeDataVersionID = 0x0000000B, + MTRClusterThreadNetworkDiagnosticsAttributeStableDataVersionID = 0x0000000C, + MTRClusterThreadNetworkDiagnosticsAttributeLeaderRouterIdID = 0x0000000D, + MTRClusterThreadNetworkDiagnosticsAttributeDetachedRoleCountID = 0x0000000E, + MTRClusterThreadNetworkDiagnosticsAttributeChildRoleCountID = 0x0000000F, + MTRClusterThreadNetworkDiagnosticsAttributeRouterRoleCountID = 0x00000010, + MTRClusterThreadNetworkDiagnosticsAttributeLeaderRoleCountID = 0x00000011, + MTRClusterThreadNetworkDiagnosticsAttributeAttachAttemptCountID = 0x00000012, + MTRClusterThreadNetworkDiagnosticsAttributePartitionIdChangeCountID = 0x00000013, + MTRClusterThreadNetworkDiagnosticsAttributeBetterPartitionAttachAttemptCountID = 0x00000014, + MTRClusterThreadNetworkDiagnosticsAttributeParentChangeCountID = 0x00000015, + MTRClusterThreadNetworkDiagnosticsAttributeTxTotalCountID = 0x00000016, + MTRClusterThreadNetworkDiagnosticsAttributeTxUnicastCountID = 0x00000017, + MTRClusterThreadNetworkDiagnosticsAttributeTxBroadcastCountID = 0x00000018, + MTRClusterThreadNetworkDiagnosticsAttributeTxAckRequestedCountID = 0x00000019, + MTRClusterThreadNetworkDiagnosticsAttributeTxAckedCountID = 0x0000001A, + MTRClusterThreadNetworkDiagnosticsAttributeTxNoAckRequestedCountID = 0x0000001B, + MTRClusterThreadNetworkDiagnosticsAttributeTxDataCountID = 0x0000001C, + MTRClusterThreadNetworkDiagnosticsAttributeTxDataPollCountID = 0x0000001D, + MTRClusterThreadNetworkDiagnosticsAttributeTxBeaconCountID = 0x0000001E, + MTRClusterThreadNetworkDiagnosticsAttributeTxBeaconRequestCountID = 0x0000001F, + MTRClusterThreadNetworkDiagnosticsAttributeTxOtherCountID = 0x00000020, + MTRClusterThreadNetworkDiagnosticsAttributeTxRetryCountID = 0x00000021, + MTRClusterThreadNetworkDiagnosticsAttributeTxDirectMaxRetryExpiryCountID = 0x00000022, + MTRClusterThreadNetworkDiagnosticsAttributeTxIndirectMaxRetryExpiryCountID = 0x00000023, + MTRClusterThreadNetworkDiagnosticsAttributeTxErrCcaCountID = 0x00000024, + MTRClusterThreadNetworkDiagnosticsAttributeTxErrAbortCountID = 0x00000025, + MTRClusterThreadNetworkDiagnosticsAttributeTxErrBusyChannelCountID = 0x00000026, + MTRClusterThreadNetworkDiagnosticsAttributeRxTotalCountID = 0x00000027, + MTRClusterThreadNetworkDiagnosticsAttributeRxUnicastCountID = 0x00000028, + MTRClusterThreadNetworkDiagnosticsAttributeRxBroadcastCountID = 0x00000029, + MTRClusterThreadNetworkDiagnosticsAttributeRxDataCountID = 0x0000002A, + MTRClusterThreadNetworkDiagnosticsAttributeRxDataPollCountID = 0x0000002B, + MTRClusterThreadNetworkDiagnosticsAttributeRxBeaconCountID = 0x0000002C, + MTRClusterThreadNetworkDiagnosticsAttributeRxBeaconRequestCountID = 0x0000002D, + MTRClusterThreadNetworkDiagnosticsAttributeRxOtherCountID = 0x0000002E, + MTRClusterThreadNetworkDiagnosticsAttributeRxAddressFilteredCountID = 0x0000002F, + MTRClusterThreadNetworkDiagnosticsAttributeRxDestAddrFilteredCountID = 0x00000030, + MTRClusterThreadNetworkDiagnosticsAttributeRxDuplicatedCountID = 0x00000031, + MTRClusterThreadNetworkDiagnosticsAttributeRxErrNoFrameCountID = 0x00000032, + MTRClusterThreadNetworkDiagnosticsAttributeRxErrUnknownNeighborCountID = 0x00000033, + MTRClusterThreadNetworkDiagnosticsAttributeRxErrInvalidSrcAddrCountID = 0x00000034, + MTRClusterThreadNetworkDiagnosticsAttributeRxErrSecCountID = 0x00000035, + MTRClusterThreadNetworkDiagnosticsAttributeRxErrFcsCountID = 0x00000036, + MTRClusterThreadNetworkDiagnosticsAttributeRxErrOtherCountID = 0x00000037, + MTRClusterThreadNetworkDiagnosticsAttributeActiveTimestampID = 0x00000038, + MTRClusterThreadNetworkDiagnosticsAttributePendingTimestampID = 0x00000039, + MTRClusterThreadNetworkDiagnosticsAttributeDelayID = 0x0000003A, + MTRClusterThreadNetworkDiagnosticsAttributeSecurityPolicyID = 0x0000003B, + MTRClusterThreadNetworkDiagnosticsAttributeChannelPage0MaskID = 0x0000003C, + MTRClusterThreadNetworkDiagnosticsAttributeOperationalDatasetComponentsID = 0x0000003D, + MTRClusterThreadNetworkDiagnosticsAttributeActiveNetworkFaultsListID = 0x0000003E, + MTRClusterThreadNetworkDiagnosticsAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterThreadNetworkDiagnosticsAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterThreadNetworkDiagnosticsAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterThreadNetworkDiagnosticsAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster WiFiNetworkDiagnostics attributes - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBssidID = 0x00000000, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeSecurityTypeID = 0x00000001, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeWiFiVersionID = 0x00000002, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeChannelNumberID = 0x00000003, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeRssiID = 0x00000004, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconLostCountID = 0x00000005, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconRxCountID = 0x00000006, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastRxCountID = 0x00000007, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastTxCountID = 0x00000008, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastRxCountID = 0x00000009, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastTxCountID = 0x0000000A, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeCurrentMaxRateID = 0x0000000B, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeOverrunCountID = 0x0000000C, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterWiFiNetworkDiagnosticsAttributeBssidID = 0x00000000, + MTRClusterWiFiNetworkDiagnosticsAttributeSecurityTypeID = 0x00000001, + MTRClusterWiFiNetworkDiagnosticsAttributeWiFiVersionID = 0x00000002, + MTRClusterWiFiNetworkDiagnosticsAttributeChannelNumberID = 0x00000003, + MTRClusterWiFiNetworkDiagnosticsAttributeRssiID = 0x00000004, + MTRClusterWiFiNetworkDiagnosticsAttributeBeaconLostCountID = 0x00000005, + MTRClusterWiFiNetworkDiagnosticsAttributeBeaconRxCountID = 0x00000006, + MTRClusterWiFiNetworkDiagnosticsAttributePacketMulticastRxCountID = 0x00000007, + MTRClusterWiFiNetworkDiagnosticsAttributePacketMulticastTxCountID = 0x00000008, + MTRClusterWiFiNetworkDiagnosticsAttributePacketUnicastRxCountID = 0x00000009, + MTRClusterWiFiNetworkDiagnosticsAttributePacketUnicastTxCountID = 0x0000000A, + MTRClusterWiFiNetworkDiagnosticsAttributeCurrentMaxRateID = 0x0000000B, + MTRClusterWiFiNetworkDiagnosticsAttributeOverrunCountID = 0x0000000C, + MTRClusterWiFiNetworkDiagnosticsAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterWiFiNetworkDiagnosticsAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterWiFiNetworkDiagnosticsAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterWiFiNetworkDiagnosticsAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster EthernetNetworkDiagnostics attributes - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePHYRateID = 0x00000000, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFullDuplexID = 0x00000001, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketRxCountID = 0x00000002, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketTxCountID = 0x00000003, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTxErrCountID = 0x00000004, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCollisionCountID = 0x00000005, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeOverrunCountID = 0x00000006, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCarrierDetectID = 0x00000007, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTimeSinceResetID = 0x00000008, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeClusterRevisionID - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterEthernetNetworkDiagnosticsAttributePHYRateID = 0x00000000, + MTRClusterEthernetNetworkDiagnosticsAttributeFullDuplexID = 0x00000001, + MTRClusterEthernetNetworkDiagnosticsAttributePacketRxCountID = 0x00000002, + MTRClusterEthernetNetworkDiagnosticsAttributePacketTxCountID = 0x00000003, + MTRClusterEthernetNetworkDiagnosticsAttributeTxErrCountID = 0x00000004, + MTRClusterEthernetNetworkDiagnosticsAttributeCollisionCountID = 0x00000005, + MTRClusterEthernetNetworkDiagnosticsAttributeOverrunCountID = 0x00000006, + MTRClusterEthernetNetworkDiagnosticsAttributeCarrierDetectID = 0x00000007, + MTRClusterEthernetNetworkDiagnosticsAttributeTimeSinceResetID = 0x00000008, + MTRClusterEthernetNetworkDiagnosticsAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterEthernetNetworkDiagnosticsAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterEthernetNetworkDiagnosticsAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterEthernetNetworkDiagnosticsAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster TimeSynchronization attributes - MTRAttributeIDTypeClusterTimeSynchronizationAttributeUTCTimeID = 0x00000000, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeGranularityID = 0x00000001, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeSourceID = 0x00000002, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeTrustedTimeNodeIdID = 0x00000003, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeDefaultNtpID = 0x00000004, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneID = 0x00000005, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeDstOffsetID = 0x00000006, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeLocalTimeID = 0x00000007, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneDatabaseID = 0x00000008, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeNtpServerPortID = 0x00000009, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterTimeSynchronizationAttributeUTCTimeID = 0x00000000, + MTRClusterTimeSynchronizationAttributeGranularityID = 0x00000001, + MTRClusterTimeSynchronizationAttributeTimeSourceID = 0x00000002, + MTRClusterTimeSynchronizationAttributeTrustedTimeNodeIdID = 0x00000003, + MTRClusterTimeSynchronizationAttributeDefaultNtpID = 0x00000004, + MTRClusterTimeSynchronizationAttributeTimeZoneID = 0x00000005, + MTRClusterTimeSynchronizationAttributeDstOffsetID = 0x00000006, + MTRClusterTimeSynchronizationAttributeLocalTimeID = 0x00000007, + MTRClusterTimeSynchronizationAttributeTimeZoneDatabaseID = 0x00000008, + MTRClusterTimeSynchronizationAttributeNtpServerPortID = 0x00000009, + MTRClusterTimeSynchronizationAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterTimeSynchronizationAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterTimeSynchronizationAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterTimeSynchronizationAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterTimeSynchronizationAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster BridgedDeviceBasic attributes - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeVendorNameID = 0x00000001, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeVendorIDID = 0x00000002, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeProductNameID = 0x00000003, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeNodeLabelID = 0x00000005, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeHardwareVersionID = 0x00000007, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeHardwareVersionStringID = 0x00000008, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeSoftwareVersionID = 0x00000009, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeSoftwareVersionStringID = 0x0000000A, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeManufacturingDateID = 0x0000000B, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributePartNumberID = 0x0000000C, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeProductURLID = 0x0000000D, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeProductLabelID = 0x0000000E, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeSerialNumberID = 0x0000000F, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeReachableID = 0x00000011, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeUniqueIDID = 0x00000012, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterBridgedDeviceBasicAttributeVendorNameID = 0x00000001, + MTRClusterBridgedDeviceBasicAttributeVendorIDID = 0x00000002, + MTRClusterBridgedDeviceBasicAttributeProductNameID = 0x00000003, + MTRClusterBridgedDeviceBasicAttributeNodeLabelID = 0x00000005, + MTRClusterBridgedDeviceBasicAttributeHardwareVersionID = 0x00000007, + MTRClusterBridgedDeviceBasicAttributeHardwareVersionStringID = 0x00000008, + MTRClusterBridgedDeviceBasicAttributeSoftwareVersionID = 0x00000009, + MTRClusterBridgedDeviceBasicAttributeSoftwareVersionStringID = 0x0000000A, + MTRClusterBridgedDeviceBasicAttributeManufacturingDateID = 0x0000000B, + MTRClusterBridgedDeviceBasicAttributePartNumberID = 0x0000000C, + MTRClusterBridgedDeviceBasicAttributeProductURLID = 0x0000000D, + MTRClusterBridgedDeviceBasicAttributeProductLabelID = 0x0000000E, + MTRClusterBridgedDeviceBasicAttributeSerialNumberID = 0x0000000F, + MTRClusterBridgedDeviceBasicAttributeReachableID = 0x00000011, + MTRClusterBridgedDeviceBasicAttributeUniqueIDID = 0x00000012, + MTRClusterBridgedDeviceBasicAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterBridgedDeviceBasicAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterBridgedDeviceBasicAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterBridgedDeviceBasicAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterBridgedDeviceBasicAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster Switch attributes - MTRAttributeIDTypeClusterSwitchAttributeNumberOfPositionsID = 0x00000000, - MTRAttributeIDTypeClusterSwitchAttributeCurrentPositionID = 0x00000001, - MTRAttributeIDTypeClusterSwitchAttributeMultiPressMaxID = 0x00000002, - MTRAttributeIDTypeClusterSwitchAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterSwitchAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterSwitchAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterSwitchAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterSwitchAttributeNumberOfPositionsID = 0x00000000, + MTRClusterSwitchAttributeCurrentPositionID = 0x00000001, + MTRClusterSwitchAttributeMultiPressMaxID = 0x00000002, + MTRClusterSwitchAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterSwitchAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterSwitchAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterSwitchAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterSwitchAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster AdministratorCommissioning attributes - MTRAttributeIDTypeClusterAdministratorCommissioningAttributeWindowStatusID = 0x00000000, - MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminFabricIndexID = 0x00000001, - MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminVendorIdID = 0x00000002, - MTRAttributeIDTypeClusterAdministratorCommissioningAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterAdministratorCommissioningAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterAdministratorCommissioningAttributeClusterRevisionID - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterAdministratorCommissioningAttributeWindowStatusID = 0x00000000, + MTRClusterAdministratorCommissioningAttributeAdminFabricIndexID = 0x00000001, + MTRClusterAdministratorCommissioningAttributeAdminVendorIdID = 0x00000002, + MTRClusterAdministratorCommissioningAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterAdministratorCommissioningAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterAdministratorCommissioningAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterAdministratorCommissioningAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterAdministratorCommissioningAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster OperationalCredentials attributes - MTRAttributeIDTypeClusterOperationalCredentialsAttributeNOCsID = 0x00000000, - MTRAttributeIDTypeClusterOperationalCredentialsAttributeFabricsID = 0x00000001, - MTRAttributeIDTypeClusterOperationalCredentialsAttributeSupportedFabricsID = 0x00000002, - MTRAttributeIDTypeClusterOperationalCredentialsAttributeCommissionedFabricsID = 0x00000003, - MTRAttributeIDTypeClusterOperationalCredentialsAttributeTrustedRootCertificatesID = 0x00000004, - MTRAttributeIDTypeClusterOperationalCredentialsAttributeCurrentFabricIndexID = 0x00000005, - MTRAttributeIDTypeClusterOperationalCredentialsAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOperationalCredentialsAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOperationalCredentialsAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterOperationalCredentialsAttributeNOCsID = 0x00000000, + MTRClusterOperationalCredentialsAttributeFabricsID = 0x00000001, + MTRClusterOperationalCredentialsAttributeSupportedFabricsID = 0x00000002, + MTRClusterOperationalCredentialsAttributeCommissionedFabricsID = 0x00000003, + MTRClusterOperationalCredentialsAttributeTrustedRootCertificatesID = 0x00000004, + MTRClusterOperationalCredentialsAttributeCurrentFabricIndexID = 0x00000005, + MTRClusterOperationalCredentialsAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterOperationalCredentialsAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterOperationalCredentialsAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterOperationalCredentialsAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterOperationalCredentialsAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster GroupKeyManagement attributes - MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID = 0x00000000, - MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupTableID = 0x00000001, - MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupsPerFabricID = 0x00000002, - MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupKeysPerFabricID = 0x00000003, - MTRAttributeIDTypeClusterGroupKeyManagementAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterGroupKeyManagementAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterGroupKeyManagementAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterGroupKeyManagementAttributeGroupKeyMapID = 0x00000000, + MTRClusterGroupKeyManagementAttributeGroupTableID = 0x00000001, + MTRClusterGroupKeyManagementAttributeMaxGroupsPerFabricID = 0x00000002, + MTRClusterGroupKeyManagementAttributeMaxGroupKeysPerFabricID = 0x00000003, + MTRClusterGroupKeyManagementAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterGroupKeyManagementAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterGroupKeyManagementAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterGroupKeyManagementAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterGroupKeyManagementAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster FixedLabel attributes - MTRAttributeIDTypeClusterFixedLabelAttributeLabelListID = 0x00000000, - MTRAttributeIDTypeClusterFixedLabelAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterFixedLabelAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterFixedLabelAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterFixedLabelAttributeLabelListID = 0x00000000, + MTRClusterFixedLabelAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterFixedLabelAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterFixedLabelAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterFixedLabelAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterFixedLabelAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster UserLabel attributes - MTRAttributeIDTypeClusterUserLabelAttributeLabelListID = 0x00000000, - MTRAttributeIDTypeClusterUserLabelAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterUserLabelAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterUserLabelAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterUserLabelAttributeLabelListID = 0x00000000, + MTRClusterUserLabelAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterUserLabelAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterUserLabelAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterUserLabelAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterUserLabelAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster ProxyConfiguration attributes - MTRAttributeIDTypeClusterProxyConfigurationAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterProxyConfigurationAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterProxyConfigurationAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterProxyConfigurationAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterProxyConfigurationAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterProxyConfigurationAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterProxyConfigurationAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterProxyConfigurationAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterProxyConfigurationAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterProxyConfigurationAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster ProxyDiscovery attributes - MTRAttributeIDTypeClusterProxyDiscoveryAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterProxyDiscoveryAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterProxyDiscoveryAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterProxyDiscoveryAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterProxyDiscoveryAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterProxyDiscoveryAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterProxyDiscoveryAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterProxyDiscoveryAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterProxyDiscoveryAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterProxyDiscoveryAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster ProxyValid attributes - MTRAttributeIDTypeClusterProxyValidAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterProxyValidAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterProxyValidAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterProxyValidAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterProxyValidAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterProxyValidAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterProxyValidAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterProxyValidAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterProxyValidAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterProxyValidAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster BooleanState attributes - MTRAttributeIDTypeClusterBooleanStateAttributeStateValueID = 0x00000000, - MTRAttributeIDTypeClusterBooleanStateAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterBooleanStateAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterBooleanStateAttributeStateValueID = 0x00000000, + MTRClusterBooleanStateAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterBooleanStateAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterBooleanStateAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterBooleanStateAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterBooleanStateAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster ModeSelect attributes - MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID = 0x00000000, - MTRAttributeIDTypeClusterModeSelectAttributeStandardNamespaceID = 0x00000001, - MTRAttributeIDTypeClusterModeSelectAttributeSupportedModesID = 0x00000002, - MTRAttributeIDTypeClusterModeSelectAttributeCurrentModeID = 0x00000003, - MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID = 0x00000004, - MTRAttributeIDTypeClusterModeSelectAttributeOnModeID = 0x00000005, - MTRAttributeIDTypeClusterModeSelectAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterModeSelectAttributeDescriptionID = 0x00000000, + MTRClusterModeSelectAttributeStandardNamespaceID = 0x00000001, + MTRClusterModeSelectAttributeSupportedModesID = 0x00000002, + MTRClusterModeSelectAttributeCurrentModeID = 0x00000003, + MTRClusterModeSelectAttributeStartUpModeID = 0x00000004, + MTRClusterModeSelectAttributeOnModeID = 0x00000005, + MTRClusterModeSelectAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterModeSelectAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterModeSelectAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterModeSelectAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterModeSelectAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster DoorLock attributes - MTRAttributeIDTypeClusterDoorLockAttributeLockStateID = 0x00000000, - MTRAttributeIDTypeClusterDoorLockAttributeLockTypeID = 0x00000001, - MTRAttributeIDTypeClusterDoorLockAttributeActuatorEnabledID = 0x00000002, - MTRAttributeIDTypeClusterDoorLockAttributeDoorStateID = 0x00000003, - MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID = 0x00000004, - MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID = 0x00000005, - MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID = 0x00000006, - MTRAttributeIDTypeClusterDoorLockAttributeNumberOfTotalUsersSupportedID = 0x00000011, - MTRAttributeIDTypeClusterDoorLockAttributeNumberOfPINUsersSupportedID = 0x00000012, - MTRAttributeIDTypeClusterDoorLockAttributeNumberOfRFIDUsersSupportedID = 0x00000013, - MTRAttributeIDTypeClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID = 0x00000014, - MTRAttributeIDTypeClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID = 0x00000015, - MTRAttributeIDTypeClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID = 0x00000016, - MTRAttributeIDTypeClusterDoorLockAttributeMaxPINCodeLengthID = 0x00000017, - MTRAttributeIDTypeClusterDoorLockAttributeMinPINCodeLengthID = 0x00000018, - MTRAttributeIDTypeClusterDoorLockAttributeMaxRFIDCodeLengthID = 0x00000019, - MTRAttributeIDTypeClusterDoorLockAttributeMinRFIDCodeLengthID = 0x0000001A, - MTRAttributeIDTypeClusterDoorLockAttributeCredentialRulesSupportID = 0x0000001B, - MTRAttributeIDTypeClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID = 0x0000001C, - MTRAttributeIDTypeClusterDoorLockAttributeLanguageID = 0x00000021, - MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID = 0x00000022, - MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID = 0x00000023, - MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID = 0x00000024, - MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID = 0x00000025, - MTRAttributeIDTypeClusterDoorLockAttributeSupportedOperatingModesID = 0x00000026, - MTRAttributeIDTypeClusterDoorLockAttributeDefaultConfigurationRegisterID = 0x00000027, - MTRAttributeIDTypeClusterDoorLockAttributeEnableLocalProgrammingID = 0x00000028, - MTRAttributeIDTypeClusterDoorLockAttributeEnableOneTouchLockingID = 0x00000029, - MTRAttributeIDTypeClusterDoorLockAttributeEnableInsideStatusLEDID = 0x0000002A, - MTRAttributeIDTypeClusterDoorLockAttributeEnablePrivacyModeButtonID = 0x0000002B, - MTRAttributeIDTypeClusterDoorLockAttributeLocalProgrammingFeaturesID = 0x0000002C, - MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID = 0x00000030, - MTRAttributeIDTypeClusterDoorLockAttributeUserCodeTemporaryDisableTimeID = 0x00000031, - MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID = 0x00000032, - MTRAttributeIDTypeClusterDoorLockAttributeRequirePINforRemoteOperationID = 0x00000033, - MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID = 0x00000035, - MTRAttributeIDTypeClusterDoorLockAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterDoorLockAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDoorLockAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterDoorLockAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterDoorLockAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterDoorLockAttributeLockStateID = 0x00000000, + MTRClusterDoorLockAttributeLockTypeID = 0x00000001, + MTRClusterDoorLockAttributeActuatorEnabledID = 0x00000002, + MTRClusterDoorLockAttributeDoorStateID = 0x00000003, + MTRClusterDoorLockAttributeDoorOpenEventsID = 0x00000004, + MTRClusterDoorLockAttributeDoorClosedEventsID = 0x00000005, + MTRClusterDoorLockAttributeOpenPeriodID = 0x00000006, + MTRClusterDoorLockAttributeNumberOfTotalUsersSupportedID = 0x00000011, + MTRClusterDoorLockAttributeNumberOfPINUsersSupportedID = 0x00000012, + MTRClusterDoorLockAttributeNumberOfRFIDUsersSupportedID = 0x00000013, + MTRClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID = 0x00000014, + MTRClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID = 0x00000015, + MTRClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID = 0x00000016, + MTRClusterDoorLockAttributeMaxPINCodeLengthID = 0x00000017, + MTRClusterDoorLockAttributeMinPINCodeLengthID = 0x00000018, + MTRClusterDoorLockAttributeMaxRFIDCodeLengthID = 0x00000019, + MTRClusterDoorLockAttributeMinRFIDCodeLengthID = 0x0000001A, + MTRClusterDoorLockAttributeCredentialRulesSupportID = 0x0000001B, + MTRClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID = 0x0000001C, + MTRClusterDoorLockAttributeLanguageID = 0x00000021, + MTRClusterDoorLockAttributeLEDSettingsID = 0x00000022, + MTRClusterDoorLockAttributeAutoRelockTimeID = 0x00000023, + MTRClusterDoorLockAttributeSoundVolumeID = 0x00000024, + MTRClusterDoorLockAttributeOperatingModeID = 0x00000025, + MTRClusterDoorLockAttributeSupportedOperatingModesID = 0x00000026, + MTRClusterDoorLockAttributeDefaultConfigurationRegisterID = 0x00000027, + MTRClusterDoorLockAttributeEnableLocalProgrammingID = 0x00000028, + MTRClusterDoorLockAttributeEnableOneTouchLockingID = 0x00000029, + MTRClusterDoorLockAttributeEnableInsideStatusLEDID = 0x0000002A, + MTRClusterDoorLockAttributeEnablePrivacyModeButtonID = 0x0000002B, + MTRClusterDoorLockAttributeLocalProgrammingFeaturesID = 0x0000002C, + MTRClusterDoorLockAttributeWrongCodeEntryLimitID = 0x00000030, + MTRClusterDoorLockAttributeUserCodeTemporaryDisableTimeID = 0x00000031, + MTRClusterDoorLockAttributeSendPINOverTheAirID = 0x00000032, + MTRClusterDoorLockAttributeRequirePINforRemoteOperationID = 0x00000033, + MTRClusterDoorLockAttributeExpiringUserTimeoutID = 0x00000035, + MTRClusterDoorLockAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterDoorLockAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterDoorLockAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterDoorLockAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterDoorLockAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster WindowCovering attributes - MTRAttributeIDTypeClusterWindowCoveringAttributeTypeID = 0x00000000, - MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitLiftID = 0x00000001, - MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitTiltID = 0x00000002, - MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftID = 0x00000003, - MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltID = 0x00000004, - MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsLiftID = 0x00000005, - MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsTiltID = 0x00000006, - MTRAttributeIDTypeClusterWindowCoveringAttributeConfigStatusID = 0x00000007, - MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercentageID = 0x00000008, - MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercentageID = 0x00000009, - MTRAttributeIDTypeClusterWindowCoveringAttributeOperationalStatusID = 0x0000000A, - MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionLiftPercent100thsID = 0x0000000B, - MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionTiltPercent100thsID = 0x0000000C, - MTRAttributeIDTypeClusterWindowCoveringAttributeEndProductTypeID = 0x0000000D, - MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercent100thsID = 0x0000000E, - MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercent100thsID = 0x0000000F, - MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitLiftID = 0x00000010, - MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitLiftID = 0x00000011, - MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitTiltID = 0x00000012, - MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitTiltID = 0x00000013, - MTRAttributeIDTypeClusterWindowCoveringAttributeModeID = 0x00000017, - MTRAttributeIDTypeClusterWindowCoveringAttributeSafetyStatusID = 0x0000001A, - MTRAttributeIDTypeClusterWindowCoveringAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterWindowCoveringAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWindowCoveringAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterWindowCoveringAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterWindowCoveringAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterWindowCoveringAttributeTypeID = 0x00000000, + MTRClusterWindowCoveringAttributePhysicalClosedLimitLiftID = 0x00000001, + MTRClusterWindowCoveringAttributePhysicalClosedLimitTiltID = 0x00000002, + MTRClusterWindowCoveringAttributeCurrentPositionLiftID = 0x00000003, + MTRClusterWindowCoveringAttributeCurrentPositionTiltID = 0x00000004, + MTRClusterWindowCoveringAttributeNumberOfActuationsLiftID = 0x00000005, + MTRClusterWindowCoveringAttributeNumberOfActuationsTiltID = 0x00000006, + MTRClusterWindowCoveringAttributeConfigStatusID = 0x00000007, + MTRClusterWindowCoveringAttributeCurrentPositionLiftPercentageID = 0x00000008, + MTRClusterWindowCoveringAttributeCurrentPositionTiltPercentageID = 0x00000009, + MTRClusterWindowCoveringAttributeOperationalStatusID = 0x0000000A, + MTRClusterWindowCoveringAttributeTargetPositionLiftPercent100thsID = 0x0000000B, + MTRClusterWindowCoveringAttributeTargetPositionTiltPercent100thsID = 0x0000000C, + MTRClusterWindowCoveringAttributeEndProductTypeID = 0x0000000D, + MTRClusterWindowCoveringAttributeCurrentPositionLiftPercent100thsID = 0x0000000E, + MTRClusterWindowCoveringAttributeCurrentPositionTiltPercent100thsID = 0x0000000F, + MTRClusterWindowCoveringAttributeInstalledOpenLimitLiftID = 0x00000010, + MTRClusterWindowCoveringAttributeInstalledClosedLimitLiftID = 0x00000011, + MTRClusterWindowCoveringAttributeInstalledOpenLimitTiltID = 0x00000012, + MTRClusterWindowCoveringAttributeInstalledClosedLimitTiltID = 0x00000013, + MTRClusterWindowCoveringAttributeModeID = 0x00000017, + MTRClusterWindowCoveringAttributeSafetyStatusID = 0x0000001A, + MTRClusterWindowCoveringAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterWindowCoveringAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterWindowCoveringAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterWindowCoveringAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterWindowCoveringAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster BarrierControl attributes - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID = 0x00000001, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID = 0x00000002, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID = 0x00000003, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID = 0x00000004, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID = 0x00000005, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID = 0x00000006, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID = 0x00000007, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID = 0x00000008, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID = 0x00000009, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID = 0x0000000A, - MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterBarrierControlAttributeBarrierMovingStateID = 0x00000001, + MTRClusterBarrierControlAttributeBarrierSafetyStatusID = 0x00000002, + MTRClusterBarrierControlAttributeBarrierCapabilitiesID = 0x00000003, + MTRClusterBarrierControlAttributeBarrierOpenEventsID = 0x00000004, + MTRClusterBarrierControlAttributeBarrierCloseEventsID = 0x00000005, + MTRClusterBarrierControlAttributeBarrierCommandOpenEventsID = 0x00000006, + MTRClusterBarrierControlAttributeBarrierCommandCloseEventsID = 0x00000007, + MTRClusterBarrierControlAttributeBarrierOpenPeriodID = 0x00000008, + MTRClusterBarrierControlAttributeBarrierClosePeriodID = 0x00000009, + MTRClusterBarrierControlAttributeBarrierPositionID = 0x0000000A, + MTRClusterBarrierControlAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterBarrierControlAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterBarrierControlAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterBarrierControlAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterBarrierControlAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster PumpConfigurationAndControl attributes - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxPressureID = 0x00000000, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxSpeedID = 0x00000001, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxFlowID = 0x00000002, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstPressureID = 0x00000003, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstPressureID = 0x00000004, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinCompPressureID = 0x00000005, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxCompPressureID = 0x00000006, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstSpeedID = 0x00000007, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstSpeedID = 0x00000008, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstFlowID = 0x00000009, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstFlowID = 0x0000000A, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstTempID = 0x0000000B, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstTempID = 0x0000000C, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePumpStatusID = 0x00000010, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveOperationModeID = 0x00000011, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveControlModeID = 0x00000012, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeCapacityID = 0x00000013, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeSpeedID = 0x00000014, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeRunningHoursID = 0x00000015, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePowerID = 0x00000016, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeEnergyConsumedID = 0x00000017, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID = 0x00000020, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID = 0x00000021, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeClusterRevisionID - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterPumpConfigurationAndControlAttributeMaxPressureID = 0x00000000, + MTRClusterPumpConfigurationAndControlAttributeMaxSpeedID = 0x00000001, + MTRClusterPumpConfigurationAndControlAttributeMaxFlowID = 0x00000002, + MTRClusterPumpConfigurationAndControlAttributeMinConstPressureID = 0x00000003, + MTRClusterPumpConfigurationAndControlAttributeMaxConstPressureID = 0x00000004, + MTRClusterPumpConfigurationAndControlAttributeMinCompPressureID = 0x00000005, + MTRClusterPumpConfigurationAndControlAttributeMaxCompPressureID = 0x00000006, + MTRClusterPumpConfigurationAndControlAttributeMinConstSpeedID = 0x00000007, + MTRClusterPumpConfigurationAndControlAttributeMaxConstSpeedID = 0x00000008, + MTRClusterPumpConfigurationAndControlAttributeMinConstFlowID = 0x00000009, + MTRClusterPumpConfigurationAndControlAttributeMaxConstFlowID = 0x0000000A, + MTRClusterPumpConfigurationAndControlAttributeMinConstTempID = 0x0000000B, + MTRClusterPumpConfigurationAndControlAttributeMaxConstTempID = 0x0000000C, + MTRClusterPumpConfigurationAndControlAttributePumpStatusID = 0x00000010, + MTRClusterPumpConfigurationAndControlAttributeEffectiveOperationModeID = 0x00000011, + MTRClusterPumpConfigurationAndControlAttributeEffectiveControlModeID = 0x00000012, + MTRClusterPumpConfigurationAndControlAttributeCapacityID = 0x00000013, + MTRClusterPumpConfigurationAndControlAttributeSpeedID = 0x00000014, + MTRClusterPumpConfigurationAndControlAttributeLifetimeRunningHoursID = 0x00000015, + MTRClusterPumpConfigurationAndControlAttributePowerID = 0x00000016, + MTRClusterPumpConfigurationAndControlAttributeLifetimeEnergyConsumedID = 0x00000017, + MTRClusterPumpConfigurationAndControlAttributeOperationModeID = 0x00000020, + MTRClusterPumpConfigurationAndControlAttributeControlModeID = 0x00000021, + MTRClusterPumpConfigurationAndControlAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterPumpConfigurationAndControlAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterPumpConfigurationAndControlAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterPumpConfigurationAndControlAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterPumpConfigurationAndControlAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster Thermostat attributes - MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureID = 0x00000000, - MTRAttributeIDTypeClusterThermostatAttributeOutdoorTemperatureID = 0x00000001, - MTRAttributeIDTypeClusterThermostatAttributeOccupancyID = 0x00000002, - MTRAttributeIDTypeClusterThermostatAttributeAbsMinHeatSetpointLimitID = 0x00000003, - MTRAttributeIDTypeClusterThermostatAttributeAbsMaxHeatSetpointLimitID = 0x00000004, - MTRAttributeIDTypeClusterThermostatAttributeAbsMinCoolSetpointLimitID = 0x00000005, - MTRAttributeIDTypeClusterThermostatAttributeAbsMaxCoolSetpointLimitID = 0x00000006, - MTRAttributeIDTypeClusterThermostatAttributePICoolingDemandID = 0x00000007, - MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID = 0x00000008, - MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID = 0x00000009, - MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID = 0x00000010, - MTRAttributeIDTypeClusterThermostatAttributeOccupiedCoolingSetpointID = 0x00000011, - MTRAttributeIDTypeClusterThermostatAttributeOccupiedHeatingSetpointID = 0x00000012, - MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedCoolingSetpointID = 0x00000013, - MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedHeatingSetpointID = 0x00000014, - MTRAttributeIDTypeClusterThermostatAttributeMinHeatSetpointLimitID = 0x00000015, - MTRAttributeIDTypeClusterThermostatAttributeMaxHeatSetpointLimitID = 0x00000016, - MTRAttributeIDTypeClusterThermostatAttributeMinCoolSetpointLimitID = 0x00000017, - MTRAttributeIDTypeClusterThermostatAttributeMaxCoolSetpointLimitID = 0x00000018, - MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID = 0x00000019, - MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID = 0x0000001A, - MTRAttributeIDTypeClusterThermostatAttributeControlSequenceOfOperationID = 0x0000001B, - MTRAttributeIDTypeClusterThermostatAttributeSystemModeID = 0x0000001C, - MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningModeID = 0x0000001E, - MTRAttributeIDTypeClusterThermostatAttributeStartOfWeekID = 0x00000020, - MTRAttributeIDTypeClusterThermostatAttributeNumberOfWeeklyTransitionsID = 0x00000021, - MTRAttributeIDTypeClusterThermostatAttributeNumberOfDailyTransitionsID = 0x00000022, - MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldID = 0x00000023, - MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldDurationID = 0x00000024, - MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID = 0x00000025, - MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningStateID = 0x00000029, - MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceID = 0x00000030, - MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeAmountID = 0x00000031, - MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceTimestampID = 0x00000032, - MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID = 0x00000034, - MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMinID = 0x00000035, - MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMaxID = 0x00000036, - MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID = 0x00000037, - MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMinID = 0x00000038, - MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMaxID = 0x00000039, - MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID = 0x0000003A, - MTRAttributeIDTypeClusterThermostatAttributeACTypeID = 0x00000040, - MTRAttributeIDTypeClusterThermostatAttributeACCapacityID = 0x00000041, - MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID = 0x00000042, - MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID = 0x00000043, - MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID = 0x00000044, - MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID = 0x00000045, - MTRAttributeIDTypeClusterThermostatAttributeACCoilTemperatureID = 0x00000046, - MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID = 0x00000047, - MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterThermostatAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterThermostatAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterThermostatAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterThermostatAttributeLocalTemperatureID = 0x00000000, + MTRClusterThermostatAttributeOutdoorTemperatureID = 0x00000001, + MTRClusterThermostatAttributeOccupancyID = 0x00000002, + MTRClusterThermostatAttributeAbsMinHeatSetpointLimitID = 0x00000003, + MTRClusterThermostatAttributeAbsMaxHeatSetpointLimitID = 0x00000004, + MTRClusterThermostatAttributeAbsMinCoolSetpointLimitID = 0x00000005, + MTRClusterThermostatAttributeAbsMaxCoolSetpointLimitID = 0x00000006, + MTRClusterThermostatAttributePICoolingDemandID = 0x00000007, + MTRClusterThermostatAttributePIHeatingDemandID = 0x00000008, + MTRClusterThermostatAttributeHVACSystemTypeConfigurationID = 0x00000009, + MTRClusterThermostatAttributeLocalTemperatureCalibrationID = 0x00000010, + MTRClusterThermostatAttributeOccupiedCoolingSetpointID = 0x00000011, + MTRClusterThermostatAttributeOccupiedHeatingSetpointID = 0x00000012, + MTRClusterThermostatAttributeUnoccupiedCoolingSetpointID = 0x00000013, + MTRClusterThermostatAttributeUnoccupiedHeatingSetpointID = 0x00000014, + MTRClusterThermostatAttributeMinHeatSetpointLimitID = 0x00000015, + MTRClusterThermostatAttributeMaxHeatSetpointLimitID = 0x00000016, + MTRClusterThermostatAttributeMinCoolSetpointLimitID = 0x00000017, + MTRClusterThermostatAttributeMaxCoolSetpointLimitID = 0x00000018, + MTRClusterThermostatAttributeMinSetpointDeadBandID = 0x00000019, + MTRClusterThermostatAttributeRemoteSensingID = 0x0000001A, + MTRClusterThermostatAttributeControlSequenceOfOperationID = 0x0000001B, + MTRClusterThermostatAttributeSystemModeID = 0x0000001C, + MTRClusterThermostatAttributeThermostatRunningModeID = 0x0000001E, + MTRClusterThermostatAttributeStartOfWeekID = 0x00000020, + MTRClusterThermostatAttributeNumberOfWeeklyTransitionsID = 0x00000021, + MTRClusterThermostatAttributeNumberOfDailyTransitionsID = 0x00000022, + MTRClusterThermostatAttributeTemperatureSetpointHoldID = 0x00000023, + MTRClusterThermostatAttributeTemperatureSetpointHoldDurationID = 0x00000024, + MTRClusterThermostatAttributeThermostatProgrammingOperationModeID = 0x00000025, + MTRClusterThermostatAttributeThermostatRunningStateID = 0x00000029, + MTRClusterThermostatAttributeSetpointChangeSourceID = 0x00000030, + MTRClusterThermostatAttributeSetpointChangeAmountID = 0x00000031, + MTRClusterThermostatAttributeSetpointChangeSourceTimestampID = 0x00000032, + MTRClusterThermostatAttributeOccupiedSetbackID = 0x00000034, + MTRClusterThermostatAttributeOccupiedSetbackMinID = 0x00000035, + MTRClusterThermostatAttributeOccupiedSetbackMaxID = 0x00000036, + MTRClusterThermostatAttributeUnoccupiedSetbackID = 0x00000037, + MTRClusterThermostatAttributeUnoccupiedSetbackMinID = 0x00000038, + MTRClusterThermostatAttributeUnoccupiedSetbackMaxID = 0x00000039, + MTRClusterThermostatAttributeEmergencyHeatDeltaID = 0x0000003A, + MTRClusterThermostatAttributeACTypeID = 0x00000040, + MTRClusterThermostatAttributeACCapacityID = 0x00000041, + MTRClusterThermostatAttributeACRefrigerantTypeID = 0x00000042, + MTRClusterThermostatAttributeACCompressorTypeID = 0x00000043, + MTRClusterThermostatAttributeACErrorCodeID = 0x00000044, + MTRClusterThermostatAttributeACLouverPositionID = 0x00000045, + MTRClusterThermostatAttributeACCoilTemperatureID = 0x00000046, + MTRClusterThermostatAttributeACCapacityformatID = 0x00000047, + MTRClusterThermostatAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterThermostatAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterThermostatAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterThermostatAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterThermostatAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster FanControl attributes - MTRAttributeIDTypeClusterFanControlAttributeFanModeID = 0x00000000, - MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID = 0x00000001, - MTRAttributeIDTypeClusterFanControlAttributePercentSettingID = 0x00000002, - MTRAttributeIDTypeClusterFanControlAttributePercentCurrentID = 0x00000003, - MTRAttributeIDTypeClusterFanControlAttributeSpeedMaxID = 0x00000004, - MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID = 0x00000005, - MTRAttributeIDTypeClusterFanControlAttributeSpeedCurrentID = 0x00000006, - MTRAttributeIDTypeClusterFanControlAttributeRockSupportID = 0x00000007, - MTRAttributeIDTypeClusterFanControlAttributeRockSettingID = 0x00000008, - MTRAttributeIDTypeClusterFanControlAttributeWindSupportID = 0x00000009, - MTRAttributeIDTypeClusterFanControlAttributeWindSettingID = 0x0000000A, - MTRAttributeIDTypeClusterFanControlAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterFanControlAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFanControlAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterFanControlAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterFanControlAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterFanControlAttributeFanModeID = 0x00000000, + MTRClusterFanControlAttributeFanModeSequenceID = 0x00000001, + MTRClusterFanControlAttributePercentSettingID = 0x00000002, + MTRClusterFanControlAttributePercentCurrentID = 0x00000003, + MTRClusterFanControlAttributeSpeedMaxID = 0x00000004, + MTRClusterFanControlAttributeSpeedSettingID = 0x00000005, + MTRClusterFanControlAttributeSpeedCurrentID = 0x00000006, + MTRClusterFanControlAttributeRockSupportID = 0x00000007, + MTRClusterFanControlAttributeRockSettingID = 0x00000008, + MTRClusterFanControlAttributeWindSupportID = 0x00000009, + MTRClusterFanControlAttributeWindSettingID = 0x0000000A, + MTRClusterFanControlAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterFanControlAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterFanControlAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterFanControlAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterFanControlAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster ThermostatUserInterfaceConfiguration attributes - MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeTemperatureDisplayModeID = 0x00000000, - MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID = 0x00000001, - MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeScheduleProgrammingVisibilityID = 0x00000002, - MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAttributeListID - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeFeatureMapID - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeClusterRevisionID - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterThermostatUserInterfaceConfigurationAttributeTemperatureDisplayModeID = 0x00000000, + MTRClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID = 0x00000001, + MTRClusterThermostatUserInterfaceConfigurationAttributeScheduleProgrammingVisibilityID = 0x00000002, + MTRClusterThermostatUserInterfaceConfigurationAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterThermostatUserInterfaceConfigurationAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterThermostatUserInterfaceConfigurationAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterThermostatUserInterfaceConfigurationAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterThermostatUserInterfaceConfigurationAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster ColorControl attributes - MTRAttributeIDTypeClusterColorControlAttributeCurrentHueID = 0x00000000, - MTRAttributeIDTypeClusterColorControlAttributeCurrentSaturationID = 0x00000001, - MTRAttributeIDTypeClusterColorControlAttributeRemainingTimeID = 0x00000002, - MTRAttributeIDTypeClusterColorControlAttributeCurrentXID = 0x00000003, - MTRAttributeIDTypeClusterColorControlAttributeCurrentYID = 0x00000004, - MTRAttributeIDTypeClusterColorControlAttributeDriftCompensationID = 0x00000005, - MTRAttributeIDTypeClusterColorControlAttributeCompensationTextID = 0x00000006, - MTRAttributeIDTypeClusterColorControlAttributeColorTemperatureMiredsID = 0x00000007, - MTRAttributeIDTypeClusterColorControlAttributeColorModeID = 0x00000008, - MTRAttributeIDTypeClusterColorControlAttributeOptionsID = 0x0000000F, - MTRAttributeIDTypeClusterColorControlAttributeNumberOfPrimariesID = 0x00000010, - MTRAttributeIDTypeClusterColorControlAttributePrimary1XID = 0x00000011, - MTRAttributeIDTypeClusterColorControlAttributePrimary1YID = 0x00000012, - MTRAttributeIDTypeClusterColorControlAttributePrimary1IntensityID = 0x00000013, - MTRAttributeIDTypeClusterColorControlAttributePrimary2XID = 0x00000015, - MTRAttributeIDTypeClusterColorControlAttributePrimary2YID = 0x00000016, - MTRAttributeIDTypeClusterColorControlAttributePrimary2IntensityID = 0x00000017, - MTRAttributeIDTypeClusterColorControlAttributePrimary3XID = 0x00000019, - MTRAttributeIDTypeClusterColorControlAttributePrimary3YID = 0x0000001A, - MTRAttributeIDTypeClusterColorControlAttributePrimary3IntensityID = 0x0000001B, - MTRAttributeIDTypeClusterColorControlAttributePrimary4XID = 0x00000020, - MTRAttributeIDTypeClusterColorControlAttributePrimary4YID = 0x00000021, - MTRAttributeIDTypeClusterColorControlAttributePrimary4IntensityID = 0x00000022, - MTRAttributeIDTypeClusterColorControlAttributePrimary5XID = 0x00000024, - MTRAttributeIDTypeClusterColorControlAttributePrimary5YID = 0x00000025, - MTRAttributeIDTypeClusterColorControlAttributePrimary5IntensityID = 0x00000026, - MTRAttributeIDTypeClusterColorControlAttributePrimary6XID = 0x00000028, - MTRAttributeIDTypeClusterColorControlAttributePrimary6YID = 0x00000029, - MTRAttributeIDTypeClusterColorControlAttributePrimary6IntensityID = 0x0000002A, - MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID = 0x00000030, - MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID = 0x00000031, - MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID = 0x00000032, - MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID = 0x00000033, - MTRAttributeIDTypeClusterColorControlAttributeColorPointRIntensityID = 0x00000034, - MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID = 0x00000036, - MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID = 0x00000037, - MTRAttributeIDTypeClusterColorControlAttributeColorPointGIntensityID = 0x00000038, - MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID = 0x0000003A, - MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID = 0x0000003B, - MTRAttributeIDTypeClusterColorControlAttributeColorPointBIntensityID = 0x0000003C, - MTRAttributeIDTypeClusterColorControlAttributeEnhancedCurrentHueID = 0x00004000, - MTRAttributeIDTypeClusterColorControlAttributeEnhancedColorModeID = 0x00004001, - MTRAttributeIDTypeClusterColorControlAttributeColorLoopActiveID = 0x00004002, - MTRAttributeIDTypeClusterColorControlAttributeColorLoopDirectionID = 0x00004003, - MTRAttributeIDTypeClusterColorControlAttributeColorLoopTimeID = 0x00004004, - MTRAttributeIDTypeClusterColorControlAttributeColorLoopStartEnhancedHueID = 0x00004005, - MTRAttributeIDTypeClusterColorControlAttributeColorLoopStoredEnhancedHueID = 0x00004006, - MTRAttributeIDTypeClusterColorControlAttributeColorCapabilitiesID = 0x0000400A, - MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMinMiredsID = 0x0000400B, - MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMaxMiredsID = 0x0000400C, - MTRAttributeIDTypeClusterColorControlAttributeCoupleColorTempToLevelMinMiredsID = 0x0000400D, - MTRAttributeIDTypeClusterColorControlAttributeStartUpColorTemperatureMiredsID = 0x00004010, - MTRAttributeIDTypeClusterColorControlAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterColorControlAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterColorControlAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterColorControlAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterColorControlAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterColorControlAttributeCurrentHueID = 0x00000000, + MTRClusterColorControlAttributeCurrentSaturationID = 0x00000001, + MTRClusterColorControlAttributeRemainingTimeID = 0x00000002, + MTRClusterColorControlAttributeCurrentXID = 0x00000003, + MTRClusterColorControlAttributeCurrentYID = 0x00000004, + MTRClusterColorControlAttributeDriftCompensationID = 0x00000005, + MTRClusterColorControlAttributeCompensationTextID = 0x00000006, + MTRClusterColorControlAttributeColorTemperatureMiredsID = 0x00000007, + MTRClusterColorControlAttributeColorModeID = 0x00000008, + MTRClusterColorControlAttributeOptionsID = 0x0000000F, + MTRClusterColorControlAttributeNumberOfPrimariesID = 0x00000010, + MTRClusterColorControlAttributePrimary1XID = 0x00000011, + MTRClusterColorControlAttributePrimary1YID = 0x00000012, + MTRClusterColorControlAttributePrimary1IntensityID = 0x00000013, + MTRClusterColorControlAttributePrimary2XID = 0x00000015, + MTRClusterColorControlAttributePrimary2YID = 0x00000016, + MTRClusterColorControlAttributePrimary2IntensityID = 0x00000017, + MTRClusterColorControlAttributePrimary3XID = 0x00000019, + MTRClusterColorControlAttributePrimary3YID = 0x0000001A, + MTRClusterColorControlAttributePrimary3IntensityID = 0x0000001B, + MTRClusterColorControlAttributePrimary4XID = 0x00000020, + MTRClusterColorControlAttributePrimary4YID = 0x00000021, + MTRClusterColorControlAttributePrimary4IntensityID = 0x00000022, + MTRClusterColorControlAttributePrimary5XID = 0x00000024, + MTRClusterColorControlAttributePrimary5YID = 0x00000025, + MTRClusterColorControlAttributePrimary5IntensityID = 0x00000026, + MTRClusterColorControlAttributePrimary6XID = 0x00000028, + MTRClusterColorControlAttributePrimary6YID = 0x00000029, + MTRClusterColorControlAttributePrimary6IntensityID = 0x0000002A, + MTRClusterColorControlAttributeWhitePointXID = 0x00000030, + MTRClusterColorControlAttributeWhitePointYID = 0x00000031, + MTRClusterColorControlAttributeColorPointRXID = 0x00000032, + MTRClusterColorControlAttributeColorPointRYID = 0x00000033, + MTRClusterColorControlAttributeColorPointRIntensityID = 0x00000034, + MTRClusterColorControlAttributeColorPointGXID = 0x00000036, + MTRClusterColorControlAttributeColorPointGYID = 0x00000037, + MTRClusterColorControlAttributeColorPointGIntensityID = 0x00000038, + MTRClusterColorControlAttributeColorPointBXID = 0x0000003A, + MTRClusterColorControlAttributeColorPointBYID = 0x0000003B, + MTRClusterColorControlAttributeColorPointBIntensityID = 0x0000003C, + MTRClusterColorControlAttributeEnhancedCurrentHueID = 0x00004000, + MTRClusterColorControlAttributeEnhancedColorModeID = 0x00004001, + MTRClusterColorControlAttributeColorLoopActiveID = 0x00004002, + MTRClusterColorControlAttributeColorLoopDirectionID = 0x00004003, + MTRClusterColorControlAttributeColorLoopTimeID = 0x00004004, + MTRClusterColorControlAttributeColorLoopStartEnhancedHueID = 0x00004005, + MTRClusterColorControlAttributeColorLoopStoredEnhancedHueID = 0x00004006, + MTRClusterColorControlAttributeColorCapabilitiesID = 0x0000400A, + MTRClusterColorControlAttributeColorTempPhysicalMinMiredsID = 0x0000400B, + MTRClusterColorControlAttributeColorTempPhysicalMaxMiredsID = 0x0000400C, + MTRClusterColorControlAttributeCoupleColorTempToLevelMinMiredsID = 0x0000400D, + MTRClusterColorControlAttributeStartUpColorTemperatureMiredsID = 0x00004010, + MTRClusterColorControlAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterColorControlAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterColorControlAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterColorControlAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterColorControlAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster BallastConfiguration attributes - MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMinLevelID = 0x00000000, - MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMaxLevelID = 0x00000001, - MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastStatusID = 0x00000002, - MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID = 0x00000010, - MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID = 0x00000011, - MTRAttributeIDTypeClusterBallastConfigurationAttributeIntrinsicBalanceFactorID = 0x00000014, - MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastFactorAdjustmentID = 0x00000015, - MTRAttributeIDTypeClusterBallastConfigurationAttributeLampQuantityID = 0x00000020, - MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID = 0x00000030, - MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID = 0x00000031, - MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID = 0x00000032, - MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID = 0x00000033, - MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID = 0x00000034, - MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursTripPointID = 0x00000035, - MTRAttributeIDTypeClusterBallastConfigurationAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterBallastConfigurationAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterBallastConfigurationAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterBallastConfigurationAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterBallastConfigurationAttributePhysicalMinLevelID = 0x00000000, + MTRClusterBallastConfigurationAttributePhysicalMaxLevelID = 0x00000001, + MTRClusterBallastConfigurationAttributeBallastStatusID = 0x00000002, + MTRClusterBallastConfigurationAttributeMinLevelID = 0x00000010, + MTRClusterBallastConfigurationAttributeMaxLevelID = 0x00000011, + MTRClusterBallastConfigurationAttributeIntrinsicBalanceFactorID = 0x00000014, + MTRClusterBallastConfigurationAttributeBallastFactorAdjustmentID = 0x00000015, + MTRClusterBallastConfigurationAttributeLampQuantityID = 0x00000020, + MTRClusterBallastConfigurationAttributeLampTypeID = 0x00000030, + MTRClusterBallastConfigurationAttributeLampManufacturerID = 0x00000031, + MTRClusterBallastConfigurationAttributeLampRatedHoursID = 0x00000032, + MTRClusterBallastConfigurationAttributeLampBurnHoursID = 0x00000033, + MTRClusterBallastConfigurationAttributeLampAlarmModeID = 0x00000034, + MTRClusterBallastConfigurationAttributeLampBurnHoursTripPointID = 0x00000035, + MTRClusterBallastConfigurationAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterBallastConfigurationAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterBallastConfigurationAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterBallastConfigurationAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterBallastConfigurationAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster IlluminanceMeasurement attributes - MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMeasuredValueID = 0x00000000, - MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMinMeasuredValueID = 0x00000001, - MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMaxMeasuredValueID = 0x00000002, - MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeToleranceID = 0x00000003, - MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeLightSensorTypeID = 0x00000004, - MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterIlluminanceMeasurementAttributeMeasuredValueID = 0x00000000, + MTRClusterIlluminanceMeasurementAttributeMinMeasuredValueID = 0x00000001, + MTRClusterIlluminanceMeasurementAttributeMaxMeasuredValueID = 0x00000002, + MTRClusterIlluminanceMeasurementAttributeToleranceID = 0x00000003, + MTRClusterIlluminanceMeasurementAttributeLightSensorTypeID = 0x00000004, + MTRClusterIlluminanceMeasurementAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterIlluminanceMeasurementAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterIlluminanceMeasurementAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterIlluminanceMeasurementAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterIlluminanceMeasurementAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster TemperatureMeasurement attributes - MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMeasuredValueID = 0x00000000, - MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMinMeasuredValueID = 0x00000001, - MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMaxMeasuredValueID = 0x00000002, - MTRAttributeIDTypeClusterTemperatureMeasurementAttributeToleranceID = 0x00000003, - MTRAttributeIDTypeClusterTemperatureMeasurementAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterTemperatureMeasurementAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterTemperatureMeasurementAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterTemperatureMeasurementAttributeMeasuredValueID = 0x00000000, + MTRClusterTemperatureMeasurementAttributeMinMeasuredValueID = 0x00000001, + MTRClusterTemperatureMeasurementAttributeMaxMeasuredValueID = 0x00000002, + MTRClusterTemperatureMeasurementAttributeToleranceID = 0x00000003, + MTRClusterTemperatureMeasurementAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterTemperatureMeasurementAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterTemperatureMeasurementAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterTemperatureMeasurementAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterTemperatureMeasurementAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster PressureMeasurement attributes - MTRAttributeIDTypeClusterPressureMeasurementAttributeMeasuredValueID = 0x00000000, - MTRAttributeIDTypeClusterPressureMeasurementAttributeMinMeasuredValueID = 0x00000001, - MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxMeasuredValueID = 0x00000002, - MTRAttributeIDTypeClusterPressureMeasurementAttributeToleranceID = 0x00000003, - MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledValueID = 0x00000010, - MTRAttributeIDTypeClusterPressureMeasurementAttributeMinScaledValueID = 0x00000011, - MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxScaledValueID = 0x00000012, - MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledToleranceID = 0x00000013, - MTRAttributeIDTypeClusterPressureMeasurementAttributeScaleID = 0x00000014, - MTRAttributeIDTypeClusterPressureMeasurementAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterPressureMeasurementAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterPressureMeasurementAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterPressureMeasurementAttributeMeasuredValueID = 0x00000000, + MTRClusterPressureMeasurementAttributeMinMeasuredValueID = 0x00000001, + MTRClusterPressureMeasurementAttributeMaxMeasuredValueID = 0x00000002, + MTRClusterPressureMeasurementAttributeToleranceID = 0x00000003, + MTRClusterPressureMeasurementAttributeScaledValueID = 0x00000010, + MTRClusterPressureMeasurementAttributeMinScaledValueID = 0x00000011, + MTRClusterPressureMeasurementAttributeMaxScaledValueID = 0x00000012, + MTRClusterPressureMeasurementAttributeScaledToleranceID = 0x00000013, + MTRClusterPressureMeasurementAttributeScaleID = 0x00000014, + MTRClusterPressureMeasurementAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterPressureMeasurementAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterPressureMeasurementAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterPressureMeasurementAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterPressureMeasurementAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster FlowMeasurement attributes - MTRAttributeIDTypeClusterFlowMeasurementAttributeMeasuredValueID = 0x00000000, - MTRAttributeIDTypeClusterFlowMeasurementAttributeMinMeasuredValueID = 0x00000001, - MTRAttributeIDTypeClusterFlowMeasurementAttributeMaxMeasuredValueID = 0x00000002, - MTRAttributeIDTypeClusterFlowMeasurementAttributeToleranceID = 0x00000003, - MTRAttributeIDTypeClusterFlowMeasurementAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterFlowMeasurementAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterFlowMeasurementAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterFlowMeasurementAttributeMeasuredValueID = 0x00000000, + MTRClusterFlowMeasurementAttributeMinMeasuredValueID = 0x00000001, + MTRClusterFlowMeasurementAttributeMaxMeasuredValueID = 0x00000002, + MTRClusterFlowMeasurementAttributeToleranceID = 0x00000003, + MTRClusterFlowMeasurementAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterFlowMeasurementAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterFlowMeasurementAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterFlowMeasurementAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterFlowMeasurementAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster RelativeHumidityMeasurement attributes - MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMeasuredValueID = 0x00000000, - MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMinMeasuredValueID = 0x00000001, - MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMaxMeasuredValueID = 0x00000002, - MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeToleranceID = 0x00000003, - MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeClusterRevisionID - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterRelativeHumidityMeasurementAttributeMeasuredValueID = 0x00000000, + MTRClusterRelativeHumidityMeasurementAttributeMinMeasuredValueID = 0x00000001, + MTRClusterRelativeHumidityMeasurementAttributeMaxMeasuredValueID = 0x00000002, + MTRClusterRelativeHumidityMeasurementAttributeToleranceID = 0x00000003, + MTRClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterRelativeHumidityMeasurementAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterRelativeHumidityMeasurementAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterRelativeHumidityMeasurementAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster OccupancySensing attributes - MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancyID = 0x00000000, - MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeID = 0x00000001, - MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID = 0x00000002, - MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID = 0x00000010, - MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID = 0x00000011, - MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID = 0x00000012, - MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID = 0x00000020, - MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID = 0x00000021, - MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID = 0x00000022, - MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID = 0x00000030, - MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID = 0x00000031, - MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID = 0x00000032, - MTRAttributeIDTypeClusterOccupancySensingAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOccupancySensingAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOccupancySensingAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster WakeOnLAN attributes - MTRAttributeIDTypeClusterWakeOnLANAttributeMACAddressID = 0x00000000, - MTRAttributeIDTypeClusterWakeOnLANAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterWakeOnLANAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterWakeOnLANAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterOccupancySensingAttributeOccupancyID = 0x00000000, + MTRClusterOccupancySensingAttributeOccupancySensorTypeID = 0x00000001, + MTRClusterOccupancySensingAttributeOccupancySensorTypeBitmapID = 0x00000002, + MTRClusterOccupancySensingAttributePirOccupiedToUnoccupiedDelayID = 0x00000010, + MTRClusterOccupancySensingAttributePirUnoccupiedToOccupiedDelayID = 0x00000011, + MTRClusterOccupancySensingAttributePirUnoccupiedToOccupiedThresholdID = 0x00000012, + MTRClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID = 0x00000020, + MTRClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID = 0x00000021, + MTRClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID = 0x00000022, + MTRClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID = 0x00000030, + MTRClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID = 0x00000031, + MTRClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID = 0x00000032, + MTRClusterOccupancySensingAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterOccupancySensingAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterOccupancySensingAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterOccupancySensingAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterOccupancySensingAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, + + // Cluster WakeOnLan attributes + MTRClusterWakeOnLanAttributeMACAddressID = 0x00000000, + MTRClusterWakeOnLanAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterWakeOnLanAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterWakeOnLanAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterWakeOnLanAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterWakeOnLanAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster Channel attributes - MTRAttributeIDTypeClusterChannelAttributeChannelListID = 0x00000000, - MTRAttributeIDTypeClusterChannelAttributeLineupID = 0x00000001, - MTRAttributeIDTypeClusterChannelAttributeCurrentChannelID = 0x00000002, - MTRAttributeIDTypeClusterChannelAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterChannelAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterChannelAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterChannelAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterChannelAttributeChannelListID = 0x00000000, + MTRClusterChannelAttributeLineupID = 0x00000001, + MTRClusterChannelAttributeCurrentChannelID = 0x00000002, + MTRClusterChannelAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterChannelAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterChannelAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterChannelAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterChannelAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster TargetNavigator attributes - MTRAttributeIDTypeClusterTargetNavigatorAttributeTargetListID = 0x00000000, - MTRAttributeIDTypeClusterTargetNavigatorAttributeCurrentTargetID = 0x00000001, - MTRAttributeIDTypeClusterTargetNavigatorAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterTargetNavigatorAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterTargetNavigatorAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterTargetNavigatorAttributeTargetListID = 0x00000000, + MTRClusterTargetNavigatorAttributeCurrentTargetID = 0x00000001, + MTRClusterTargetNavigatorAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterTargetNavigatorAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterTargetNavigatorAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterTargetNavigatorAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterTargetNavigatorAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster MediaPlayback attributes - MTRAttributeIDTypeClusterMediaPlaybackAttributeCurrentStateID = 0x00000000, - MTRAttributeIDTypeClusterMediaPlaybackAttributeStartTimeID = 0x00000001, - MTRAttributeIDTypeClusterMediaPlaybackAttributeDurationID = 0x00000002, - MTRAttributeIDTypeClusterMediaPlaybackAttributeSampledPositionID = 0x00000003, - MTRAttributeIDTypeClusterMediaPlaybackAttributePlaybackSpeedID = 0x00000004, - MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeEndID = 0x00000005, - MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeStartID = 0x00000006, - MTRAttributeIDTypeClusterMediaPlaybackAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterMediaPlaybackAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterMediaPlaybackAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterMediaPlaybackAttributeCurrentStateID = 0x00000000, + MTRClusterMediaPlaybackAttributeStartTimeID = 0x00000001, + MTRClusterMediaPlaybackAttributeDurationID = 0x00000002, + MTRClusterMediaPlaybackAttributeSampledPositionID = 0x00000003, + MTRClusterMediaPlaybackAttributePlaybackSpeedID = 0x00000004, + MTRClusterMediaPlaybackAttributeSeekRangeEndID = 0x00000005, + MTRClusterMediaPlaybackAttributeSeekRangeStartID = 0x00000006, + MTRClusterMediaPlaybackAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterMediaPlaybackAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterMediaPlaybackAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterMediaPlaybackAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterMediaPlaybackAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster MediaInput attributes - MTRAttributeIDTypeClusterMediaInputAttributeInputListID = 0x00000000, - MTRAttributeIDTypeClusterMediaInputAttributeCurrentInputID = 0x00000001, - MTRAttributeIDTypeClusterMediaInputAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterMediaInputAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterMediaInputAttributeInputListID = 0x00000000, + MTRClusterMediaInputAttributeCurrentInputID = 0x00000001, + MTRClusterMediaInputAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterMediaInputAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterMediaInputAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterMediaInputAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterMediaInputAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster LowPower attributes - MTRAttributeIDTypeClusterLowPowerAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterLowPowerAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterLowPowerAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterLowPowerAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterLowPowerAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterLowPowerAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterLowPowerAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterLowPowerAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster KeypadInput attributes - MTRAttributeIDTypeClusterKeypadInputAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterKeypadInputAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterKeypadInputAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterKeypadInputAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterKeypadInputAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterKeypadInputAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterKeypadInputAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterKeypadInputAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster ContentLauncher attributes - MTRAttributeIDTypeClusterContentLauncherAttributeAcceptHeaderID = 0x00000000, - MTRAttributeIDTypeClusterContentLauncherAttributeSupportedStreamingProtocolsID = 0x00000001, - MTRAttributeIDTypeClusterContentLauncherAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterContentLauncherAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterContentLauncherAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterContentLauncherAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterContentLauncherAttributeAcceptHeaderID = 0x00000000, + MTRClusterContentLauncherAttributeSupportedStreamingProtocolsID = 0x00000001, + MTRClusterContentLauncherAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterContentLauncherAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterContentLauncherAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterContentLauncherAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterContentLauncherAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster AudioOutput attributes - MTRAttributeIDTypeClusterAudioOutputAttributeOutputListID = 0x00000000, - MTRAttributeIDTypeClusterAudioOutputAttributeCurrentOutputID = 0x00000001, - MTRAttributeIDTypeClusterAudioOutputAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterAudioOutputAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterAudioOutputAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterAudioOutputAttributeOutputListID = 0x00000000, + MTRClusterAudioOutputAttributeCurrentOutputID = 0x00000001, + MTRClusterAudioOutputAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterAudioOutputAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterAudioOutputAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterAudioOutputAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterAudioOutputAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster ApplicationLauncher attributes - MTRAttributeIDTypeClusterApplicationLauncherAttributeCatalogListID = 0x00000000, - MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID = 0x00000001, - MTRAttributeIDTypeClusterApplicationLauncherAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterApplicationLauncherAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterApplicationLauncherAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterApplicationLauncherAttributeCatalogListID = 0x00000000, + MTRClusterApplicationLauncherAttributeCurrentAppID = 0x00000001, + MTRClusterApplicationLauncherAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterApplicationLauncherAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterApplicationLauncherAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterApplicationLauncherAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterApplicationLauncherAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster ApplicationBasic attributes - MTRAttributeIDTypeClusterApplicationBasicAttributeVendorNameID = 0x00000000, - MTRAttributeIDTypeClusterApplicationBasicAttributeVendorIDID = 0x00000001, - MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationNameID = 0x00000002, - MTRAttributeIDTypeClusterApplicationBasicAttributeProductIDID = 0x00000003, - MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationID = 0x00000004, - MTRAttributeIDTypeClusterApplicationBasicAttributeStatusID = 0x00000005, - MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationVersionID = 0x00000006, - MTRAttributeIDTypeClusterApplicationBasicAttributeAllowedVendorListID = 0x00000007, - MTRAttributeIDTypeClusterApplicationBasicAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterApplicationBasicAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterApplicationBasicAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterApplicationBasicAttributeVendorNameID = 0x00000000, + MTRClusterApplicationBasicAttributeVendorIDID = 0x00000001, + MTRClusterApplicationBasicAttributeApplicationNameID = 0x00000002, + MTRClusterApplicationBasicAttributeProductIDID = 0x00000003, + MTRClusterApplicationBasicAttributeApplicationID = 0x00000004, + MTRClusterApplicationBasicAttributeStatusID = 0x00000005, + MTRClusterApplicationBasicAttributeApplicationVersionID = 0x00000006, + MTRClusterApplicationBasicAttributeAllowedVendorListID = 0x00000007, + MTRClusterApplicationBasicAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterApplicationBasicAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterApplicationBasicAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterApplicationBasicAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterApplicationBasicAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster AccountLogin attributes - MTRAttributeIDTypeClusterAccountLoginAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterAccountLoginAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterAccountLoginAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterAccountLoginAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterAccountLoginAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterAccountLoginAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterAccountLoginAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster ElectricalMeasurement attributes - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID = 0x00000000, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID = 0x00000100, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID = 0x00000101, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID = 0x00000102, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID = 0x00000103, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID = 0x00000104, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID = 0x00000105, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID = 0x00000106, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID = 0x00000107, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID = 0x00000108, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID = 0x00000200, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID = 0x00000201, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID = 0x00000202, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID = 0x00000203, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID = 0x00000204, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID = 0x00000205, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID = 0x00000300, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID = 0x00000301, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID = 0x00000302, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID = 0x00000303, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID = 0x00000304, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID = 0x00000305, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID = 0x00000306, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID = 0x00000307, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID = 0x00000308, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID = 0x00000309, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID = 0x0000030A, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID = 0x0000030B, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID = 0x0000030C, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID = 0x0000030D, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID = 0x0000030E, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID = 0x0000030F, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID = 0x00000310, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID = 0x00000311, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID = 0x00000312, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID = 0x00000400, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID = 0x00000401, - MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID = 0x00000402, - MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID = 0x00000403, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID = 0x00000404, - MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID = 0x00000405, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID = 0x00000500, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID = 0x00000501, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID = 0x00000502, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID = 0x00000503, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID = 0x00000504, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID = 0x00000505, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID = 0x00000506, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID = 0x00000507, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID = 0x00000508, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID = 0x00000509, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID = 0x0000050A, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID = 0x0000050B, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID = 0x0000050C, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID = 0x0000050D, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID = 0x0000050E, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID = 0x0000050F, - MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID = 0x00000510, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID = 0x00000511, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID = 0x00000513, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID = 0x00000514, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID = 0x00000515, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID = 0x00000516, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID = 0x00000517, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID = 0x00000600, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID = 0x00000601, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID = 0x00000602, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID = 0x00000603, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID = 0x00000604, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID = 0x00000605, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID = 0x00000700, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID = 0x00000701, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID = 0x00000702, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID = 0x00000800, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID = 0x00000801, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID = 0x00000802, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID = 0x00000803, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID = 0x00000804, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID = 0x00000805, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID = 0x00000806, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID = 0x00000807, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID = 0x00000808, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID = 0x00000809, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID = 0x0000080A, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID = 0x00000901, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID = 0x00000902, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID = 0x00000903, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID = 0x00000905, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID = 0x00000906, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID = 0x00000907, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID = 0x00000908, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID = 0x00000909, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID = 0x0000090A, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID = 0x0000090B, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID = 0x0000090C, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID = 0x0000090D, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID = 0x0000090E, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID = 0x0000090F, - MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID = 0x00000910, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID = 0x00000911, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID = 0x00000912, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID = 0x00000913, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID = 0x00000914, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID = 0x00000915, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID = 0x00000916, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID = 0x00000917, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID = 0x00000A01, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID = 0x00000A02, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID = 0x00000A03, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID = 0x00000A05, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID = 0x00000A06, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID = 0x00000A07, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID = 0x00000A08, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID = 0x00000A09, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID = 0x00000A0A, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID = 0x00000A0B, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID = 0x00000A0C, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID = 0x00000A0D, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID = 0x00000A0E, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID = 0x00000A0F, - MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID = 0x00000A10, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID = 0x00000A11, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID = 0x00000A12, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID = 0x00000A13, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID = 0x00000A14, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID = 0x00000A15, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID = 0x00000A16, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID = 0x00000A17, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterElectricalMeasurementAttributeMeasurementTypeID = 0x00000000, + MTRClusterElectricalMeasurementAttributeDcVoltageID = 0x00000100, + MTRClusterElectricalMeasurementAttributeDcVoltageMinID = 0x00000101, + MTRClusterElectricalMeasurementAttributeDcVoltageMaxID = 0x00000102, + MTRClusterElectricalMeasurementAttributeDcCurrentID = 0x00000103, + MTRClusterElectricalMeasurementAttributeDcCurrentMinID = 0x00000104, + MTRClusterElectricalMeasurementAttributeDcCurrentMaxID = 0x00000105, + MTRClusterElectricalMeasurementAttributeDcPowerID = 0x00000106, + MTRClusterElectricalMeasurementAttributeDcPowerMinID = 0x00000107, + MTRClusterElectricalMeasurementAttributeDcPowerMaxID = 0x00000108, + MTRClusterElectricalMeasurementAttributeDcVoltageMultiplierID = 0x00000200, + MTRClusterElectricalMeasurementAttributeDcVoltageDivisorID = 0x00000201, + MTRClusterElectricalMeasurementAttributeDcCurrentMultiplierID = 0x00000202, + MTRClusterElectricalMeasurementAttributeDcCurrentDivisorID = 0x00000203, + MTRClusterElectricalMeasurementAttributeDcPowerMultiplierID = 0x00000204, + MTRClusterElectricalMeasurementAttributeDcPowerDivisorID = 0x00000205, + MTRClusterElectricalMeasurementAttributeAcFrequencyID = 0x00000300, + MTRClusterElectricalMeasurementAttributeAcFrequencyMinID = 0x00000301, + MTRClusterElectricalMeasurementAttributeAcFrequencyMaxID = 0x00000302, + MTRClusterElectricalMeasurementAttributeNeutralCurrentID = 0x00000303, + MTRClusterElectricalMeasurementAttributeTotalActivePowerID = 0x00000304, + MTRClusterElectricalMeasurementAttributeTotalReactivePowerID = 0x00000305, + MTRClusterElectricalMeasurementAttributeTotalApparentPowerID = 0x00000306, + MTRClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID = 0x00000307, + MTRClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID = 0x00000308, + MTRClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID = 0x00000309, + MTRClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID = 0x0000030A, + MTRClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID = 0x0000030B, + MTRClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID = 0x0000030C, + MTRClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID = 0x0000030D, + MTRClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID = 0x0000030E, + MTRClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID = 0x0000030F, + MTRClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID = 0x00000310, + MTRClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID = 0x00000311, + MTRClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID = 0x00000312, + MTRClusterElectricalMeasurementAttributeAcFrequencyMultiplierID = 0x00000400, + MTRClusterElectricalMeasurementAttributeAcFrequencyDivisorID = 0x00000401, + MTRClusterElectricalMeasurementAttributePowerMultiplierID = 0x00000402, + MTRClusterElectricalMeasurementAttributePowerDivisorID = 0x00000403, + MTRClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID = 0x00000404, + MTRClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID = 0x00000405, + MTRClusterElectricalMeasurementAttributeInstantaneousVoltageID = 0x00000500, + MTRClusterElectricalMeasurementAttributeInstantaneousLineCurrentID = 0x00000501, + MTRClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID = 0x00000502, + MTRClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID = 0x00000503, + MTRClusterElectricalMeasurementAttributeInstantaneousPowerID = 0x00000504, + MTRClusterElectricalMeasurementAttributeRmsVoltageID = 0x00000505, + MTRClusterElectricalMeasurementAttributeRmsVoltageMinID = 0x00000506, + MTRClusterElectricalMeasurementAttributeRmsVoltageMaxID = 0x00000507, + MTRClusterElectricalMeasurementAttributeRmsCurrentID = 0x00000508, + MTRClusterElectricalMeasurementAttributeRmsCurrentMinID = 0x00000509, + MTRClusterElectricalMeasurementAttributeRmsCurrentMaxID = 0x0000050A, + MTRClusterElectricalMeasurementAttributeActivePowerID = 0x0000050B, + MTRClusterElectricalMeasurementAttributeActivePowerMinID = 0x0000050C, + MTRClusterElectricalMeasurementAttributeActivePowerMaxID = 0x0000050D, + MTRClusterElectricalMeasurementAttributeReactivePowerID = 0x0000050E, + MTRClusterElectricalMeasurementAttributeApparentPowerID = 0x0000050F, + MTRClusterElectricalMeasurementAttributePowerFactorID = 0x00000510, + MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID = 0x00000511, + MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID = 0x00000513, + MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID = 0x00000514, + MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID = 0x00000515, + MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID = 0x00000516, + MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID = 0x00000517, + MTRClusterElectricalMeasurementAttributeAcVoltageMultiplierID = 0x00000600, + MTRClusterElectricalMeasurementAttributeAcVoltageDivisorID = 0x00000601, + MTRClusterElectricalMeasurementAttributeAcCurrentMultiplierID = 0x00000602, + MTRClusterElectricalMeasurementAttributeAcCurrentDivisorID = 0x00000603, + MTRClusterElectricalMeasurementAttributeAcPowerMultiplierID = 0x00000604, + MTRClusterElectricalMeasurementAttributeAcPowerDivisorID = 0x00000605, + MTRClusterElectricalMeasurementAttributeOverloadAlarmsMaskID = 0x00000700, + MTRClusterElectricalMeasurementAttributeVoltageOverloadID = 0x00000701, + MTRClusterElectricalMeasurementAttributeCurrentOverloadID = 0x00000702, + MTRClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID = 0x00000800, + MTRClusterElectricalMeasurementAttributeAcVoltageOverloadID = 0x00000801, + MTRClusterElectricalMeasurementAttributeAcCurrentOverloadID = 0x00000802, + MTRClusterElectricalMeasurementAttributeAcActivePowerOverloadID = 0x00000803, + MTRClusterElectricalMeasurementAttributeAcReactivePowerOverloadID = 0x00000804, + MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageID = 0x00000805, + MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID = 0x00000806, + MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID = 0x00000807, + MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID = 0x00000808, + MTRClusterElectricalMeasurementAttributeRmsVoltageSagID = 0x00000809, + MTRClusterElectricalMeasurementAttributeRmsVoltageSwellID = 0x0000080A, + MTRClusterElectricalMeasurementAttributeLineCurrentPhaseBID = 0x00000901, + MTRClusterElectricalMeasurementAttributeActiveCurrentPhaseBID = 0x00000902, + MTRClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID = 0x00000903, + MTRClusterElectricalMeasurementAttributeRmsVoltagePhaseBID = 0x00000905, + MTRClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID = 0x00000906, + MTRClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID = 0x00000907, + MTRClusterElectricalMeasurementAttributeRmsCurrentPhaseBID = 0x00000908, + MTRClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID = 0x00000909, + MTRClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID = 0x0000090A, + MTRClusterElectricalMeasurementAttributeActivePowerPhaseBID = 0x0000090B, + MTRClusterElectricalMeasurementAttributeActivePowerMinPhaseBID = 0x0000090C, + MTRClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID = 0x0000090D, + MTRClusterElectricalMeasurementAttributeReactivePowerPhaseBID = 0x0000090E, + MTRClusterElectricalMeasurementAttributeApparentPowerPhaseBID = 0x0000090F, + MTRClusterElectricalMeasurementAttributePowerFactorPhaseBID = 0x00000910, + MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID = 0x00000911, + MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID = 0x00000912, + MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID = 0x00000913, + MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID = 0x00000914, + MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID = 0x00000915, + MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID = 0x00000916, + MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID = 0x00000917, + MTRClusterElectricalMeasurementAttributeLineCurrentPhaseCID = 0x00000A01, + MTRClusterElectricalMeasurementAttributeActiveCurrentPhaseCID = 0x00000A02, + MTRClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID = 0x00000A03, + MTRClusterElectricalMeasurementAttributeRmsVoltagePhaseCID = 0x00000A05, + MTRClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID = 0x00000A06, + MTRClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID = 0x00000A07, + MTRClusterElectricalMeasurementAttributeRmsCurrentPhaseCID = 0x00000A08, + MTRClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID = 0x00000A09, + MTRClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID = 0x00000A0A, + MTRClusterElectricalMeasurementAttributeActivePowerPhaseCID = 0x00000A0B, + MTRClusterElectricalMeasurementAttributeActivePowerMinPhaseCID = 0x00000A0C, + MTRClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID = 0x00000A0D, + MTRClusterElectricalMeasurementAttributeReactivePowerPhaseCID = 0x00000A0E, + MTRClusterElectricalMeasurementAttributeApparentPowerPhaseCID = 0x00000A0F, + MTRClusterElectricalMeasurementAttributePowerFactorPhaseCID = 0x00000A10, + MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID = 0x00000A11, + MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID = 0x00000A12, + MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID = 0x00000A13, + MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID = 0x00000A14, + MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID = 0x00000A15, + MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID = 0x00000A16, + MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID = 0x00000A17, + MTRClusterElectricalMeasurementAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterElectricalMeasurementAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterElectricalMeasurementAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterElectricalMeasurementAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterElectricalMeasurementAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster TestCluster attributes - MTRAttributeIDTypeClusterTestClusterAttributeBooleanID = 0x00000000, - MTRAttributeIDTypeClusterTestClusterAttributeBitmap8ID = 0x00000001, - MTRAttributeIDTypeClusterTestClusterAttributeBitmap16ID = 0x00000002, - MTRAttributeIDTypeClusterTestClusterAttributeBitmap32ID = 0x00000003, - MTRAttributeIDTypeClusterTestClusterAttributeBitmap64ID = 0x00000004, - MTRAttributeIDTypeClusterTestClusterAttributeInt8uID = 0x00000005, - MTRAttributeIDTypeClusterTestClusterAttributeInt16uID = 0x00000006, - MTRAttributeIDTypeClusterTestClusterAttributeInt24uID = 0x00000007, - MTRAttributeIDTypeClusterTestClusterAttributeInt32uID = 0x00000008, - MTRAttributeIDTypeClusterTestClusterAttributeInt40uID = 0x00000009, - MTRAttributeIDTypeClusterTestClusterAttributeInt48uID = 0x0000000A, - MTRAttributeIDTypeClusterTestClusterAttributeInt56uID = 0x0000000B, - MTRAttributeIDTypeClusterTestClusterAttributeInt64uID = 0x0000000C, - MTRAttributeIDTypeClusterTestClusterAttributeInt8sID = 0x0000000D, - MTRAttributeIDTypeClusterTestClusterAttributeInt16sID = 0x0000000E, - MTRAttributeIDTypeClusterTestClusterAttributeInt24sID = 0x0000000F, - MTRAttributeIDTypeClusterTestClusterAttributeInt32sID = 0x00000010, - MTRAttributeIDTypeClusterTestClusterAttributeInt40sID = 0x00000011, - MTRAttributeIDTypeClusterTestClusterAttributeInt48sID = 0x00000012, - MTRAttributeIDTypeClusterTestClusterAttributeInt56sID = 0x00000013, - MTRAttributeIDTypeClusterTestClusterAttributeInt64sID = 0x00000014, - MTRAttributeIDTypeClusterTestClusterAttributeEnum8ID = 0x00000015, - MTRAttributeIDTypeClusterTestClusterAttributeEnum16ID = 0x00000016, - MTRAttributeIDTypeClusterTestClusterAttributeFloatSingleID = 0x00000017, - MTRAttributeIDTypeClusterTestClusterAttributeFloatDoubleID = 0x00000018, - MTRAttributeIDTypeClusterTestClusterAttributeOctetStringID = 0x00000019, - MTRAttributeIDTypeClusterTestClusterAttributeListInt8uID = 0x0000001A, - MTRAttributeIDTypeClusterTestClusterAttributeListOctetStringID = 0x0000001B, - MTRAttributeIDTypeClusterTestClusterAttributeListStructOctetStringID = 0x0000001C, - MTRAttributeIDTypeClusterTestClusterAttributeLongOctetStringID = 0x0000001D, - MTRAttributeIDTypeClusterTestClusterAttributeCharStringID = 0x0000001E, - MTRAttributeIDTypeClusterTestClusterAttributeLongCharStringID = 0x0000001F, - MTRAttributeIDTypeClusterTestClusterAttributeEpochUsID = 0x00000020, - MTRAttributeIDTypeClusterTestClusterAttributeEpochSID = 0x00000021, - MTRAttributeIDTypeClusterTestClusterAttributeVendorIdID = 0x00000022, - MTRAttributeIDTypeClusterTestClusterAttributeListNullablesAndOptionalsStructID = 0x00000023, - MTRAttributeIDTypeClusterTestClusterAttributeEnumAttrID = 0x00000024, - MTRAttributeIDTypeClusterTestClusterAttributeStructAttrID = 0x00000025, - MTRAttributeIDTypeClusterTestClusterAttributeRangeRestrictedInt8uID = 0x00000026, - MTRAttributeIDTypeClusterTestClusterAttributeRangeRestrictedInt8sID = 0x00000027, - MTRAttributeIDTypeClusterTestClusterAttributeRangeRestrictedInt16uID = 0x00000028, - MTRAttributeIDTypeClusterTestClusterAttributeRangeRestrictedInt16sID = 0x00000029, - MTRAttributeIDTypeClusterTestClusterAttributeListLongOctetStringID = 0x0000002A, - MTRAttributeIDTypeClusterTestClusterAttributeListFabricScopedID = 0x0000002B, - MTRAttributeIDTypeClusterTestClusterAttributeTimedWriteBooleanID = 0x00000030, - MTRAttributeIDTypeClusterTestClusterAttributeGeneralErrorBooleanID = 0x00000031, - MTRAttributeIDTypeClusterTestClusterAttributeClusterErrorBooleanID = 0x00000032, - MTRAttributeIDTypeClusterTestClusterAttributeUnsupportedID = 0x000000FF, - MTRAttributeIDTypeClusterTestClusterAttributeNullableBooleanID = 0x00004000, - MTRAttributeIDTypeClusterTestClusterAttributeNullableBitmap8ID = 0x00004001, - MTRAttributeIDTypeClusterTestClusterAttributeNullableBitmap16ID = 0x00004002, - MTRAttributeIDTypeClusterTestClusterAttributeNullableBitmap32ID = 0x00004003, - MTRAttributeIDTypeClusterTestClusterAttributeNullableBitmap64ID = 0x00004004, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt8uID = 0x00004005, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt16uID = 0x00004006, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt24uID = 0x00004007, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt32uID = 0x00004008, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt40uID = 0x00004009, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt48uID = 0x0000400A, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt56uID = 0x0000400B, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt64uID = 0x0000400C, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt8sID = 0x0000400D, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt16sID = 0x0000400E, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt24sID = 0x0000400F, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt32sID = 0x00004010, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt40sID = 0x00004011, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt48sID = 0x00004012, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt56sID = 0x00004013, - MTRAttributeIDTypeClusterTestClusterAttributeNullableInt64sID = 0x00004014, - MTRAttributeIDTypeClusterTestClusterAttributeNullableEnum8ID = 0x00004015, - MTRAttributeIDTypeClusterTestClusterAttributeNullableEnum16ID = 0x00004016, - MTRAttributeIDTypeClusterTestClusterAttributeNullableFloatSingleID = 0x00004017, - MTRAttributeIDTypeClusterTestClusterAttributeNullableFloatDoubleID = 0x00004018, - MTRAttributeIDTypeClusterTestClusterAttributeNullableOctetStringID = 0x00004019, - MTRAttributeIDTypeClusterTestClusterAttributeNullableCharStringID = 0x0000401E, - MTRAttributeIDTypeClusterTestClusterAttributeNullableEnumAttrID = 0x00004024, - MTRAttributeIDTypeClusterTestClusterAttributeNullableStructID = 0x00004025, - MTRAttributeIDTypeClusterTestClusterAttributeNullableRangeRestrictedInt8uID = 0x00004026, - MTRAttributeIDTypeClusterTestClusterAttributeNullableRangeRestrictedInt8sID = 0x00004027, - MTRAttributeIDTypeClusterTestClusterAttributeNullableRangeRestrictedInt16uID = 0x00004028, - MTRAttributeIDTypeClusterTestClusterAttributeNullableRangeRestrictedInt16sID = 0x00004029, - MTRAttributeIDTypeClusterTestClusterAttributeWriteOnlyInt8uID = 0x0000402A, - MTRAttributeIDTypeClusterTestClusterAttributeGeneratedCommandListID = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterTestClusterAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTestClusterAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterTestClusterAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterTestClusterAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterTestClusterAttributeBooleanID = 0x00000000, + MTRClusterTestClusterAttributeBitmap8ID = 0x00000001, + MTRClusterTestClusterAttributeBitmap16ID = 0x00000002, + MTRClusterTestClusterAttributeBitmap32ID = 0x00000003, + MTRClusterTestClusterAttributeBitmap64ID = 0x00000004, + MTRClusterTestClusterAttributeInt8uID = 0x00000005, + MTRClusterTestClusterAttributeInt16uID = 0x00000006, + MTRClusterTestClusterAttributeInt24uID = 0x00000007, + MTRClusterTestClusterAttributeInt32uID = 0x00000008, + MTRClusterTestClusterAttributeInt40uID = 0x00000009, + MTRClusterTestClusterAttributeInt48uID = 0x0000000A, + MTRClusterTestClusterAttributeInt56uID = 0x0000000B, + MTRClusterTestClusterAttributeInt64uID = 0x0000000C, + MTRClusterTestClusterAttributeInt8sID = 0x0000000D, + MTRClusterTestClusterAttributeInt16sID = 0x0000000E, + MTRClusterTestClusterAttributeInt24sID = 0x0000000F, + MTRClusterTestClusterAttributeInt32sID = 0x00000010, + MTRClusterTestClusterAttributeInt40sID = 0x00000011, + MTRClusterTestClusterAttributeInt48sID = 0x00000012, + MTRClusterTestClusterAttributeInt56sID = 0x00000013, + MTRClusterTestClusterAttributeInt64sID = 0x00000014, + MTRClusterTestClusterAttributeEnum8ID = 0x00000015, + MTRClusterTestClusterAttributeEnum16ID = 0x00000016, + MTRClusterTestClusterAttributeFloatSingleID = 0x00000017, + MTRClusterTestClusterAttributeFloatDoubleID = 0x00000018, + MTRClusterTestClusterAttributeOctetStringID = 0x00000019, + MTRClusterTestClusterAttributeListInt8uID = 0x0000001A, + MTRClusterTestClusterAttributeListOctetStringID = 0x0000001B, + MTRClusterTestClusterAttributeListStructOctetStringID = 0x0000001C, + MTRClusterTestClusterAttributeLongOctetStringID = 0x0000001D, + MTRClusterTestClusterAttributeCharStringID = 0x0000001E, + MTRClusterTestClusterAttributeLongCharStringID = 0x0000001F, + MTRClusterTestClusterAttributeEpochUsID = 0x00000020, + MTRClusterTestClusterAttributeEpochSID = 0x00000021, + MTRClusterTestClusterAttributeVendorIdID = 0x00000022, + MTRClusterTestClusterAttributeListNullablesAndOptionalsStructID = 0x00000023, + MTRClusterTestClusterAttributeEnumAttrID = 0x00000024, + MTRClusterTestClusterAttributeStructAttrID = 0x00000025, + MTRClusterTestClusterAttributeRangeRestrictedInt8uID = 0x00000026, + MTRClusterTestClusterAttributeRangeRestrictedInt8sID = 0x00000027, + MTRClusterTestClusterAttributeRangeRestrictedInt16uID = 0x00000028, + MTRClusterTestClusterAttributeRangeRestrictedInt16sID = 0x00000029, + MTRClusterTestClusterAttributeListLongOctetStringID = 0x0000002A, + MTRClusterTestClusterAttributeListFabricScopedID = 0x0000002B, + MTRClusterTestClusterAttributeTimedWriteBooleanID = 0x00000030, + MTRClusterTestClusterAttributeGeneralErrorBooleanID = 0x00000031, + MTRClusterTestClusterAttributeClusterErrorBooleanID = 0x00000032, + MTRClusterTestClusterAttributeUnsupportedID = 0x000000FF, + MTRClusterTestClusterAttributeNullableBooleanID = 0x00004000, + MTRClusterTestClusterAttributeNullableBitmap8ID = 0x00004001, + MTRClusterTestClusterAttributeNullableBitmap16ID = 0x00004002, + MTRClusterTestClusterAttributeNullableBitmap32ID = 0x00004003, + MTRClusterTestClusterAttributeNullableBitmap64ID = 0x00004004, + MTRClusterTestClusterAttributeNullableInt8uID = 0x00004005, + MTRClusterTestClusterAttributeNullableInt16uID = 0x00004006, + MTRClusterTestClusterAttributeNullableInt24uID = 0x00004007, + MTRClusterTestClusterAttributeNullableInt32uID = 0x00004008, + MTRClusterTestClusterAttributeNullableInt40uID = 0x00004009, + MTRClusterTestClusterAttributeNullableInt48uID = 0x0000400A, + MTRClusterTestClusterAttributeNullableInt56uID = 0x0000400B, + MTRClusterTestClusterAttributeNullableInt64uID = 0x0000400C, + MTRClusterTestClusterAttributeNullableInt8sID = 0x0000400D, + MTRClusterTestClusterAttributeNullableInt16sID = 0x0000400E, + MTRClusterTestClusterAttributeNullableInt24sID = 0x0000400F, + MTRClusterTestClusterAttributeNullableInt32sID = 0x00004010, + MTRClusterTestClusterAttributeNullableInt40sID = 0x00004011, + MTRClusterTestClusterAttributeNullableInt48sID = 0x00004012, + MTRClusterTestClusterAttributeNullableInt56sID = 0x00004013, + MTRClusterTestClusterAttributeNullableInt64sID = 0x00004014, + MTRClusterTestClusterAttributeNullableEnum8ID = 0x00004015, + MTRClusterTestClusterAttributeNullableEnum16ID = 0x00004016, + MTRClusterTestClusterAttributeNullableFloatSingleID = 0x00004017, + MTRClusterTestClusterAttributeNullableFloatDoubleID = 0x00004018, + MTRClusterTestClusterAttributeNullableOctetStringID = 0x00004019, + MTRClusterTestClusterAttributeNullableCharStringID = 0x0000401E, + MTRClusterTestClusterAttributeNullableEnumAttrID = 0x00004024, + MTRClusterTestClusterAttributeNullableStructID = 0x00004025, + MTRClusterTestClusterAttributeNullableRangeRestrictedInt8uID = 0x00004026, + MTRClusterTestClusterAttributeNullableRangeRestrictedInt8sID = 0x00004027, + MTRClusterTestClusterAttributeNullableRangeRestrictedInt16uID = 0x00004028, + MTRClusterTestClusterAttributeNullableRangeRestrictedInt16sID = 0x00004029, + MTRClusterTestClusterAttributeWriteOnlyInt8uID = 0x0000402A, + MTRClusterTestClusterAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterTestClusterAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterTestClusterAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterTestClusterAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterTestClusterAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster FaultInjection attributes - MTRAttributeIDTypeClusterFaultInjectionAttributeGeneratedCommandListID - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterFaultInjectionAttributeAcceptedCommandListID = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFaultInjectionAttributeAttributeListID = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterFaultInjectionAttributeFeatureMapID = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterFaultInjectionAttributeClusterRevisionID = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRClusterFaultInjectionAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterFaultInjectionAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterFaultInjectionAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterFaultInjectionAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterFaultInjectionAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, }; #pragma mark - Commands IDs -typedef NS_ENUM(uint32_t, MTRCommandIDType) { +typedef NS_ENUM(uint32_t, MTRClusterCommandIDType) { // Cluster Identify commands - MTRCommandIDTypeClusterIdentifyCommandIdentifyID = 0x00000000, - MTRCommandIDTypeClusterIdentifyCommandTriggerEffectID = 0x00000040, + MTRClusterIdentifyCommandIdentifyID = 0x00000000, + MTRClusterIdentifyCommandTriggerEffectID = 0x00000040, // Cluster Groups commands - MTRCommandIDTypeClusterGroupsCommandAddGroupID = 0x00000000, - MTRCommandIDTypeClusterGroupsCommandAddGroupResponseID = 0x00000000, - MTRCommandIDTypeClusterGroupsCommandViewGroupID = 0x00000001, - MTRCommandIDTypeClusterGroupsCommandViewGroupResponseID = 0x00000001, - MTRCommandIDTypeClusterGroupsCommandGetGroupMembershipID = 0x00000002, - MTRCommandIDTypeClusterGroupsCommandGetGroupMembershipResponseID = 0x00000002, - MTRCommandIDTypeClusterGroupsCommandRemoveGroupID = 0x00000003, - MTRCommandIDTypeClusterGroupsCommandRemoveGroupResponseID = 0x00000003, - MTRCommandIDTypeClusterGroupsCommandRemoveAllGroupsID = 0x00000004, - MTRCommandIDTypeClusterGroupsCommandAddGroupIfIdentifyingID = 0x00000005, + MTRClusterGroupsCommandAddGroupID = 0x00000000, + MTRClusterGroupsCommandAddGroupResponseID = 0x00000000, + MTRClusterGroupsCommandViewGroupID = 0x00000001, + MTRClusterGroupsCommandViewGroupResponseID = 0x00000001, + MTRClusterGroupsCommandGetGroupMembershipID = 0x00000002, + MTRClusterGroupsCommandGetGroupMembershipResponseID = 0x00000002, + MTRClusterGroupsCommandRemoveGroupID = 0x00000003, + MTRClusterGroupsCommandRemoveGroupResponseID = 0x00000003, + MTRClusterGroupsCommandRemoveAllGroupsID = 0x00000004, + MTRClusterGroupsCommandAddGroupIfIdentifyingID = 0x00000005, // Cluster Scenes commands - MTRCommandIDTypeClusterScenesCommandAddSceneID = 0x00000000, - MTRCommandIDTypeClusterScenesCommandAddSceneResponseID = 0x00000000, - MTRCommandIDTypeClusterScenesCommandViewSceneID = 0x00000001, - MTRCommandIDTypeClusterScenesCommandViewSceneResponseID = 0x00000001, - MTRCommandIDTypeClusterScenesCommandRemoveSceneID = 0x00000002, - MTRCommandIDTypeClusterScenesCommandRemoveSceneResponseID = 0x00000002, - MTRCommandIDTypeClusterScenesCommandRemoveAllScenesID = 0x00000003, - MTRCommandIDTypeClusterScenesCommandRemoveAllScenesResponseID = 0x00000003, - MTRCommandIDTypeClusterScenesCommandStoreSceneID = 0x00000004, - MTRCommandIDTypeClusterScenesCommandStoreSceneResponseID = 0x00000004, - MTRCommandIDTypeClusterScenesCommandRecallSceneID = 0x00000005, - MTRCommandIDTypeClusterScenesCommandGetSceneMembershipID = 0x00000006, - MTRCommandIDTypeClusterScenesCommandGetSceneMembershipResponseID = 0x00000006, - MTRCommandIDTypeClusterScenesCommandEnhancedAddSceneID = 0x00000040, - MTRCommandIDTypeClusterScenesCommandEnhancedAddSceneResponseID = 0x00000040, - MTRCommandIDTypeClusterScenesCommandEnhancedViewSceneID = 0x00000041, - MTRCommandIDTypeClusterScenesCommandEnhancedViewSceneResponseID = 0x00000041, - MTRCommandIDTypeClusterScenesCommandCopySceneID = 0x00000042, - MTRCommandIDTypeClusterScenesCommandCopySceneResponseID = 0x00000042, + MTRClusterScenesCommandAddSceneID = 0x00000000, + MTRClusterScenesCommandAddSceneResponseID = 0x00000000, + MTRClusterScenesCommandViewSceneID = 0x00000001, + MTRClusterScenesCommandViewSceneResponseID = 0x00000001, + MTRClusterScenesCommandRemoveSceneID = 0x00000002, + MTRClusterScenesCommandRemoveSceneResponseID = 0x00000002, + MTRClusterScenesCommandRemoveAllScenesID = 0x00000003, + MTRClusterScenesCommandRemoveAllScenesResponseID = 0x00000003, + MTRClusterScenesCommandStoreSceneID = 0x00000004, + MTRClusterScenesCommandStoreSceneResponseID = 0x00000004, + MTRClusterScenesCommandRecallSceneID = 0x00000005, + MTRClusterScenesCommandGetSceneMembershipID = 0x00000006, + MTRClusterScenesCommandGetSceneMembershipResponseID = 0x00000006, + MTRClusterScenesCommandEnhancedAddSceneID = 0x00000040, + MTRClusterScenesCommandEnhancedAddSceneResponseID = 0x00000040, + MTRClusterScenesCommandEnhancedViewSceneID = 0x00000041, + MTRClusterScenesCommandEnhancedViewSceneResponseID = 0x00000041, + MTRClusterScenesCommandCopySceneID = 0x00000042, + MTRClusterScenesCommandCopySceneResponseID = 0x00000042, // Cluster OnOff commands - MTRCommandIDTypeClusterOnOffCommandOffID = 0x00000000, - MTRCommandIDTypeClusterOnOffCommandOnID = 0x00000001, - MTRCommandIDTypeClusterOnOffCommandToggleID = 0x00000002, - MTRCommandIDTypeClusterOnOffCommandOffWithEffectID = 0x00000040, - MTRCommandIDTypeClusterOnOffCommandOnWithRecallGlobalSceneID = 0x00000041, - MTRCommandIDTypeClusterOnOffCommandOnWithTimedOffID = 0x00000042, + MTRClusterOnOffCommandOffID = 0x00000000, + MTRClusterOnOffCommandOnID = 0x00000001, + MTRClusterOnOffCommandToggleID = 0x00000002, + MTRClusterOnOffCommandOffWithEffectID = 0x00000040, + MTRClusterOnOffCommandOnWithRecallGlobalSceneID = 0x00000041, + MTRClusterOnOffCommandOnWithTimedOffID = 0x00000042, // Cluster LevelControl commands - MTRCommandIDTypeClusterLevelControlCommandMoveToLevelID = 0x00000000, - MTRCommandIDTypeClusterLevelControlCommandMoveID = 0x00000001, - MTRCommandIDTypeClusterLevelControlCommandStepID = 0x00000002, - MTRCommandIDTypeClusterLevelControlCommandStopID = 0x00000003, - MTRCommandIDTypeClusterLevelControlCommandMoveToLevelWithOnOffID = 0x00000004, - MTRCommandIDTypeClusterLevelControlCommandMoveWithOnOffID = 0x00000005, - MTRCommandIDTypeClusterLevelControlCommandStepWithOnOffID = 0x00000006, - MTRCommandIDTypeClusterLevelControlCommandStopWithOnOffID = 0x00000007, - MTRCommandIDTypeClusterLevelControlCommandMoveToClosestFrequencyID = 0x00000008, + MTRClusterLevelControlCommandMoveToLevelID = 0x00000000, + MTRClusterLevelControlCommandMoveID = 0x00000001, + MTRClusterLevelControlCommandStepID = 0x00000002, + MTRClusterLevelControlCommandStopID = 0x00000003, + MTRClusterLevelControlCommandMoveToLevelWithOnOffID = 0x00000004, + MTRClusterLevelControlCommandMoveWithOnOffID = 0x00000005, + MTRClusterLevelControlCommandStepWithOnOffID = 0x00000006, + MTRClusterLevelControlCommandStopWithOnOffID = 0x00000007, + MTRClusterLevelControlCommandMoveToClosestFrequencyID = 0x00000008, // Cluster Actions commands - MTRCommandIDTypeClusterActionsCommandInstantActionID = 0x00000000, - MTRCommandIDTypeClusterActionsCommandInstantActionWithTransitionID = 0x00000001, - MTRCommandIDTypeClusterActionsCommandStartActionID = 0x00000002, - MTRCommandIDTypeClusterActionsCommandStartActionWithDurationID = 0x00000003, - MTRCommandIDTypeClusterActionsCommandStopActionID = 0x00000004, - MTRCommandIDTypeClusterActionsCommandPauseActionID = 0x00000005, - MTRCommandIDTypeClusterActionsCommandPauseActionWithDurationID = 0x00000006, - MTRCommandIDTypeClusterActionsCommandResumeActionID = 0x00000007, - MTRCommandIDTypeClusterActionsCommandEnableActionID = 0x00000008, - MTRCommandIDTypeClusterActionsCommandEnableActionWithDurationID = 0x00000009, - MTRCommandIDTypeClusterActionsCommandDisableActionID = 0x0000000A, - MTRCommandIDTypeClusterActionsCommandDisableActionWithDurationID = 0x0000000B, + MTRClusterActionsCommandInstantActionID = 0x00000000, + MTRClusterActionsCommandInstantActionWithTransitionID = 0x00000001, + MTRClusterActionsCommandStartActionID = 0x00000002, + MTRClusterActionsCommandStartActionWithDurationID = 0x00000003, + MTRClusterActionsCommandStopActionID = 0x00000004, + MTRClusterActionsCommandPauseActionID = 0x00000005, + MTRClusterActionsCommandPauseActionWithDurationID = 0x00000006, + MTRClusterActionsCommandResumeActionID = 0x00000007, + MTRClusterActionsCommandEnableActionID = 0x00000008, + MTRClusterActionsCommandEnableActionWithDurationID = 0x00000009, + MTRClusterActionsCommandDisableActionID = 0x0000000A, + MTRClusterActionsCommandDisableActionWithDurationID = 0x0000000B, // Cluster Basic commands - MTRCommandIDTypeClusterBasicCommandMfgSpecificPingID = 0x10020000, + MTRClusterBasicCommandMfgSpecificPingID = 0x10020000, - // Cluster OTASoftwareUpdateProvider commands - MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandQueryImageID = 0x00000000, - MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandQueryImageResponseID = 0x00000001, - MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandApplyUpdateRequestID = 0x00000002, - MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandApplyUpdateResponseID = 0x00000003, - MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandNotifyUpdateAppliedID = 0x00000004, + // Cluster OtaSoftwareUpdateProvider commands + MTRClusterOtaSoftwareUpdateProviderCommandQueryImageID = 0x00000000, + MTRClusterOtaSoftwareUpdateProviderCommandQueryImageResponseID = 0x00000001, + MTRClusterOtaSoftwareUpdateProviderCommandApplyUpdateRequestID = 0x00000002, + MTRClusterOtaSoftwareUpdateProviderCommandApplyUpdateResponseID = 0x00000003, + MTRClusterOtaSoftwareUpdateProviderCommandNotifyUpdateAppliedID = 0x00000004, - // Cluster OTASoftwareUpdateRequestor commands - MTRCommandIDTypeClusterOTASoftwareUpdateRequestorCommandAnnounceOtaProviderID = 0x00000000, + // Cluster OtaSoftwareUpdateRequestor commands + MTRClusterOtaSoftwareUpdateRequestorCommandAnnounceOtaProviderID = 0x00000000, // Cluster GeneralCommissioning commands - MTRCommandIDTypeClusterGeneralCommissioningCommandArmFailSafeID = 0x00000000, - MTRCommandIDTypeClusterGeneralCommissioningCommandArmFailSafeResponseID = 0x00000001, - MTRCommandIDTypeClusterGeneralCommissioningCommandSetRegulatoryConfigID = 0x00000002, - MTRCommandIDTypeClusterGeneralCommissioningCommandSetRegulatoryConfigResponseID = 0x00000003, - MTRCommandIDTypeClusterGeneralCommissioningCommandCommissioningCompleteID = 0x00000004, - MTRCommandIDTypeClusterGeneralCommissioningCommandCommissioningCompleteResponseID = 0x00000005, + MTRClusterGeneralCommissioningCommandArmFailSafeID = 0x00000000, + MTRClusterGeneralCommissioningCommandArmFailSafeResponseID = 0x00000001, + MTRClusterGeneralCommissioningCommandSetRegulatoryConfigID = 0x00000002, + MTRClusterGeneralCommissioningCommandSetRegulatoryConfigResponseID = 0x00000003, + MTRClusterGeneralCommissioningCommandCommissioningCompleteID = 0x00000004, + MTRClusterGeneralCommissioningCommandCommissioningCompleteResponseID = 0x00000005, // Cluster NetworkCommissioning commands - MTRCommandIDTypeClusterNetworkCommissioningCommandScanNetworksID = 0x00000000, - MTRCommandIDTypeClusterNetworkCommissioningCommandScanNetworksResponseID = 0x00000001, - MTRCommandIDTypeClusterNetworkCommissioningCommandAddOrUpdateWiFiNetworkID = 0x00000002, - MTRCommandIDTypeClusterNetworkCommissioningCommandAddOrUpdateThreadNetworkID = 0x00000003, - MTRCommandIDTypeClusterNetworkCommissioningCommandRemoveNetworkID = 0x00000004, - MTRCommandIDTypeClusterNetworkCommissioningCommandNetworkConfigResponseID = 0x00000005, - MTRCommandIDTypeClusterNetworkCommissioningCommandConnectNetworkID = 0x00000006, - MTRCommandIDTypeClusterNetworkCommissioningCommandConnectNetworkResponseID = 0x00000007, - MTRCommandIDTypeClusterNetworkCommissioningCommandReorderNetworkID = 0x00000008, + MTRClusterNetworkCommissioningCommandScanNetworksID = 0x00000000, + MTRClusterNetworkCommissioningCommandScanNetworksResponseID = 0x00000001, + MTRClusterNetworkCommissioningCommandAddOrUpdateWiFiNetworkID = 0x00000002, + MTRClusterNetworkCommissioningCommandAddOrUpdateThreadNetworkID = 0x00000003, + MTRClusterNetworkCommissioningCommandRemoveNetworkID = 0x00000004, + MTRClusterNetworkCommissioningCommandNetworkConfigResponseID = 0x00000005, + MTRClusterNetworkCommissioningCommandConnectNetworkID = 0x00000006, + MTRClusterNetworkCommissioningCommandConnectNetworkResponseID = 0x00000007, + MTRClusterNetworkCommissioningCommandReorderNetworkID = 0x00000008, // Cluster DiagnosticLogs commands - MTRCommandIDTypeClusterDiagnosticLogsCommandRetrieveLogsRequestID = 0x00000000, - MTRCommandIDTypeClusterDiagnosticLogsCommandRetrieveLogsResponseID = 0x00000001, + MTRClusterDiagnosticLogsCommandRetrieveLogsRequestID = 0x00000000, + MTRClusterDiagnosticLogsCommandRetrieveLogsResponseID = 0x00000001, // Cluster GeneralDiagnostics commands - MTRCommandIDTypeClusterGeneralDiagnosticsCommandTestEventTriggerID = 0x00000000, + MTRClusterGeneralDiagnosticsCommandTestEventTriggerID = 0x00000000, // Cluster SoftwareDiagnostics commands - MTRCommandIDTypeClusterSoftwareDiagnosticsCommandResetWatermarksID = 0x00000000, + MTRClusterSoftwareDiagnosticsCommandResetWatermarksID = 0x00000000, // Cluster ThreadNetworkDiagnostics commands - MTRCommandIDTypeClusterThreadNetworkDiagnosticsCommandResetCountsID = 0x00000000, + MTRClusterThreadNetworkDiagnosticsCommandResetCountsID = 0x00000000, // Cluster WiFiNetworkDiagnostics commands - MTRCommandIDTypeClusterWiFiNetworkDiagnosticsCommandResetCountsID = 0x00000000, + MTRClusterWiFiNetworkDiagnosticsCommandResetCountsID = 0x00000000, // Cluster EthernetNetworkDiagnostics commands - MTRCommandIDTypeClusterEthernetNetworkDiagnosticsCommandResetCountsID = 0x00000000, + MTRClusterEthernetNetworkDiagnosticsCommandResetCountsID = 0x00000000, // Cluster TimeSynchronization commands - MTRCommandIDTypeClusterTimeSynchronizationCommandSetUtcTimeID = 0x00000000, + MTRClusterTimeSynchronizationCommandSetUtcTimeID = 0x00000000, // Cluster AdministratorCommissioning commands - MTRCommandIDTypeClusterAdministratorCommissioningCommandOpenCommissioningWindowID = 0x00000000, - MTRCommandIDTypeClusterAdministratorCommissioningCommandOpenBasicCommissioningWindowID = 0x00000001, - MTRCommandIDTypeClusterAdministratorCommissioningCommandRevokeCommissioningID = 0x00000002, + MTRClusterAdministratorCommissioningCommandOpenCommissioningWindowID = 0x00000000, + MTRClusterAdministratorCommissioningCommandOpenBasicCommissioningWindowID = 0x00000001, + MTRClusterAdministratorCommissioningCommandRevokeCommissioningID = 0x00000002, // Cluster OperationalCredentials commands - MTRCommandIDTypeClusterOperationalCredentialsCommandAttestationRequestID = 0x00000000, - MTRCommandIDTypeClusterOperationalCredentialsCommandAttestationResponseID = 0x00000001, - MTRCommandIDTypeClusterOperationalCredentialsCommandCertificateChainRequestID = 0x00000002, - MTRCommandIDTypeClusterOperationalCredentialsCommandCertificateChainResponseID = 0x00000003, - MTRCommandIDTypeClusterOperationalCredentialsCommandCSRRequestID = 0x00000004, - MTRCommandIDTypeClusterOperationalCredentialsCommandCSRResponseID = 0x00000005, - MTRCommandIDTypeClusterOperationalCredentialsCommandAddNOCID = 0x00000006, - MTRCommandIDTypeClusterOperationalCredentialsCommandUpdateNOCID = 0x00000007, - MTRCommandIDTypeClusterOperationalCredentialsCommandNOCResponseID = 0x00000008, - MTRCommandIDTypeClusterOperationalCredentialsCommandUpdateFabricLabelID = 0x00000009, - MTRCommandIDTypeClusterOperationalCredentialsCommandRemoveFabricID = 0x0000000A, - MTRCommandIDTypeClusterOperationalCredentialsCommandAddTrustedRootCertificateID = 0x0000000B, + MTRClusterOperationalCredentialsCommandAttestationRequestID = 0x00000000, + MTRClusterOperationalCredentialsCommandAttestationResponseID = 0x00000001, + MTRClusterOperationalCredentialsCommandCertificateChainRequestID = 0x00000002, + MTRClusterOperationalCredentialsCommandCertificateChainResponseID = 0x00000003, + MTRClusterOperationalCredentialsCommandCSRRequestID = 0x00000004, + MTRClusterOperationalCredentialsCommandCSRResponseID = 0x00000005, + MTRClusterOperationalCredentialsCommandAddNOCID = 0x00000006, + MTRClusterOperationalCredentialsCommandUpdateNOCID = 0x00000007, + MTRClusterOperationalCredentialsCommandNOCResponseID = 0x00000008, + MTRClusterOperationalCredentialsCommandUpdateFabricLabelID = 0x00000009, + MTRClusterOperationalCredentialsCommandRemoveFabricID = 0x0000000A, + MTRClusterOperationalCredentialsCommandAddTrustedRootCertificateID = 0x0000000B, // Cluster GroupKeyManagement commands - MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetWriteID = 0x00000000, - MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadID = 0x00000001, - MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadResponseID = 0x00000002, - MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetRemoveID = 0x00000003, - MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadAllIndicesID = 0x00000004, - MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadAllIndicesResponseID = 0x00000005, + MTRClusterGroupKeyManagementCommandKeySetWriteID = 0x00000000, + MTRClusterGroupKeyManagementCommandKeySetReadID = 0x00000001, + MTRClusterGroupKeyManagementCommandKeySetReadResponseID = 0x00000002, + MTRClusterGroupKeyManagementCommandKeySetRemoveID = 0x00000003, + MTRClusterGroupKeyManagementCommandKeySetReadAllIndicesID = 0x00000004, + MTRClusterGroupKeyManagementCommandKeySetReadAllIndicesResponseID = 0x00000005, // Cluster ModeSelect commands - MTRCommandIDTypeClusterModeSelectCommandChangeToModeID = 0x00000000, + MTRClusterModeSelectCommandChangeToModeID = 0x00000000, // Cluster DoorLock commands - MTRCommandIDTypeClusterDoorLockCommandLockDoorID = 0x00000000, - MTRCommandIDTypeClusterDoorLockCommandUnlockDoorID = 0x00000001, - MTRCommandIDTypeClusterDoorLockCommandUnlockWithTimeoutID = 0x00000003, - MTRCommandIDTypeClusterDoorLockCommandSetWeekDayScheduleID = 0x0000000B, - MTRCommandIDTypeClusterDoorLockCommandGetWeekDayScheduleID = 0x0000000C, - MTRCommandIDTypeClusterDoorLockCommandGetWeekDayScheduleResponseID = 0x0000000C, - MTRCommandIDTypeClusterDoorLockCommandClearWeekDayScheduleID = 0x0000000D, - MTRCommandIDTypeClusterDoorLockCommandSetYearDayScheduleID = 0x0000000E, - MTRCommandIDTypeClusterDoorLockCommandGetYearDayScheduleID = 0x0000000F, - MTRCommandIDTypeClusterDoorLockCommandGetYearDayScheduleResponseID = 0x0000000F, - MTRCommandIDTypeClusterDoorLockCommandClearYearDayScheduleID = 0x00000010, - MTRCommandIDTypeClusterDoorLockCommandSetHolidayScheduleID = 0x00000011, - MTRCommandIDTypeClusterDoorLockCommandGetHolidayScheduleID = 0x00000012, - MTRCommandIDTypeClusterDoorLockCommandGetHolidayScheduleResponseID = 0x00000012, - MTRCommandIDTypeClusterDoorLockCommandClearHolidayScheduleID = 0x00000013, - MTRCommandIDTypeClusterDoorLockCommandSetUserID = 0x0000001A, - MTRCommandIDTypeClusterDoorLockCommandGetUserID = 0x0000001B, - MTRCommandIDTypeClusterDoorLockCommandGetUserResponseID = 0x0000001C, - MTRCommandIDTypeClusterDoorLockCommandClearUserID = 0x0000001D, - MTRCommandIDTypeClusterDoorLockCommandSetCredentialID = 0x00000022, - MTRCommandIDTypeClusterDoorLockCommandSetCredentialResponseID = 0x00000023, - MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusID = 0x00000024, - MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusResponseID = 0x00000025, - MTRCommandIDTypeClusterDoorLockCommandClearCredentialID = 0x00000026, + MTRClusterDoorLockCommandLockDoorID = 0x00000000, + MTRClusterDoorLockCommandUnlockDoorID = 0x00000001, + MTRClusterDoorLockCommandUnlockWithTimeoutID = 0x00000003, + MTRClusterDoorLockCommandSetWeekDayScheduleID = 0x0000000B, + MTRClusterDoorLockCommandGetWeekDayScheduleID = 0x0000000C, + MTRClusterDoorLockCommandGetWeekDayScheduleResponseID = 0x0000000C, + MTRClusterDoorLockCommandClearWeekDayScheduleID = 0x0000000D, + MTRClusterDoorLockCommandSetYearDayScheduleID = 0x0000000E, + MTRClusterDoorLockCommandGetYearDayScheduleID = 0x0000000F, + MTRClusterDoorLockCommandGetYearDayScheduleResponseID = 0x0000000F, + MTRClusterDoorLockCommandClearYearDayScheduleID = 0x00000010, + MTRClusterDoorLockCommandSetHolidayScheduleID = 0x00000011, + MTRClusterDoorLockCommandGetHolidayScheduleID = 0x00000012, + MTRClusterDoorLockCommandGetHolidayScheduleResponseID = 0x00000012, + MTRClusterDoorLockCommandClearHolidayScheduleID = 0x00000013, + MTRClusterDoorLockCommandSetUserID = 0x0000001A, + MTRClusterDoorLockCommandGetUserID = 0x0000001B, + MTRClusterDoorLockCommandGetUserResponseID = 0x0000001C, + MTRClusterDoorLockCommandClearUserID = 0x0000001D, + MTRClusterDoorLockCommandSetCredentialID = 0x00000022, + MTRClusterDoorLockCommandSetCredentialResponseID = 0x00000023, + MTRClusterDoorLockCommandGetCredentialStatusID = 0x00000024, + MTRClusterDoorLockCommandGetCredentialStatusResponseID = 0x00000025, + MTRClusterDoorLockCommandClearCredentialID = 0x00000026, // Cluster WindowCovering commands - MTRCommandIDTypeClusterWindowCoveringCommandUpOrOpenID = 0x00000000, - MTRCommandIDTypeClusterWindowCoveringCommandDownOrCloseID = 0x00000001, - MTRCommandIDTypeClusterWindowCoveringCommandStopMotionID = 0x00000002, - MTRCommandIDTypeClusterWindowCoveringCommandGoToLiftValueID = 0x00000004, - MTRCommandIDTypeClusterWindowCoveringCommandGoToLiftPercentageID = 0x00000005, - MTRCommandIDTypeClusterWindowCoveringCommandGoToTiltValueID = 0x00000007, - MTRCommandIDTypeClusterWindowCoveringCommandGoToTiltPercentageID = 0x00000008, + MTRClusterWindowCoveringCommandUpOrOpenID = 0x00000000, + MTRClusterWindowCoveringCommandDownOrCloseID = 0x00000001, + MTRClusterWindowCoveringCommandStopMotionID = 0x00000002, + MTRClusterWindowCoveringCommandGoToLiftValueID = 0x00000004, + MTRClusterWindowCoveringCommandGoToLiftPercentageID = 0x00000005, + MTRClusterWindowCoveringCommandGoToTiltValueID = 0x00000007, + MTRClusterWindowCoveringCommandGoToTiltPercentageID = 0x00000008, // Cluster BarrierControl commands - MTRCommandIDTypeClusterBarrierControlCommandBarrierControlGoToPercentID = 0x00000000, - MTRCommandIDTypeClusterBarrierControlCommandBarrierControlStopID = 0x00000001, + MTRClusterBarrierControlCommandBarrierControlGoToPercentID = 0x00000000, + MTRClusterBarrierControlCommandBarrierControlStopID = 0x00000001, // Cluster Thermostat commands - MTRCommandIDTypeClusterThermostatCommandSetpointRaiseLowerID = 0x00000000, - MTRCommandIDTypeClusterThermostatCommandGetWeeklyScheduleResponseID = 0x00000000, - MTRCommandIDTypeClusterThermostatCommandSetWeeklyScheduleID = 0x00000001, - MTRCommandIDTypeClusterThermostatCommandGetWeeklyScheduleID = 0x00000002, - MTRCommandIDTypeClusterThermostatCommandClearWeeklyScheduleID = 0x00000003, + MTRClusterThermostatCommandSetpointRaiseLowerID = 0x00000000, + MTRClusterThermostatCommandGetWeeklyScheduleResponseID = 0x00000000, + MTRClusterThermostatCommandSetWeeklyScheduleID = 0x00000001, + MTRClusterThermostatCommandGetWeeklyScheduleID = 0x00000002, + MTRClusterThermostatCommandClearWeeklyScheduleID = 0x00000003, // Cluster ColorControl commands - MTRCommandIDTypeClusterColorControlCommandMoveToHueID = 0x00000000, - MTRCommandIDTypeClusterColorControlCommandMoveHueID = 0x00000001, - MTRCommandIDTypeClusterColorControlCommandStepHueID = 0x00000002, - MTRCommandIDTypeClusterColorControlCommandMoveToSaturationID = 0x00000003, - MTRCommandIDTypeClusterColorControlCommandMoveSaturationID = 0x00000004, - MTRCommandIDTypeClusterColorControlCommandStepSaturationID = 0x00000005, - MTRCommandIDTypeClusterColorControlCommandMoveToHueAndSaturationID = 0x00000006, - MTRCommandIDTypeClusterColorControlCommandMoveToColorID = 0x00000007, - MTRCommandIDTypeClusterColorControlCommandMoveColorID = 0x00000008, - MTRCommandIDTypeClusterColorControlCommandStepColorID = 0x00000009, - MTRCommandIDTypeClusterColorControlCommandMoveToColorTemperatureID = 0x0000000A, - MTRCommandIDTypeClusterColorControlCommandEnhancedMoveToHueID = 0x00000040, - MTRCommandIDTypeClusterColorControlCommandEnhancedMoveHueID = 0x00000041, - MTRCommandIDTypeClusterColorControlCommandEnhancedStepHueID = 0x00000042, - MTRCommandIDTypeClusterColorControlCommandEnhancedMoveToHueAndSaturationID = 0x00000043, - MTRCommandIDTypeClusterColorControlCommandColorLoopSetID = 0x00000044, - MTRCommandIDTypeClusterColorControlCommandStopMoveStepID = 0x00000047, - MTRCommandIDTypeClusterColorControlCommandMoveColorTemperatureID = 0x0000004B, - MTRCommandIDTypeClusterColorControlCommandStepColorTemperatureID = 0x0000004C, + MTRClusterColorControlCommandMoveToHueID = 0x00000000, + MTRClusterColorControlCommandMoveHueID = 0x00000001, + MTRClusterColorControlCommandStepHueID = 0x00000002, + MTRClusterColorControlCommandMoveToSaturationID = 0x00000003, + MTRClusterColorControlCommandMoveSaturationID = 0x00000004, + MTRClusterColorControlCommandStepSaturationID = 0x00000005, + MTRClusterColorControlCommandMoveToHueAndSaturationID = 0x00000006, + MTRClusterColorControlCommandMoveToColorID = 0x00000007, + MTRClusterColorControlCommandMoveColorID = 0x00000008, + MTRClusterColorControlCommandStepColorID = 0x00000009, + MTRClusterColorControlCommandMoveToColorTemperatureID = 0x0000000A, + MTRClusterColorControlCommandEnhancedMoveToHueID = 0x00000040, + MTRClusterColorControlCommandEnhancedMoveHueID = 0x00000041, + MTRClusterColorControlCommandEnhancedStepHueID = 0x00000042, + MTRClusterColorControlCommandEnhancedMoveToHueAndSaturationID = 0x00000043, + MTRClusterColorControlCommandColorLoopSetID = 0x00000044, + MTRClusterColorControlCommandStopMoveStepID = 0x00000047, + MTRClusterColorControlCommandMoveColorTemperatureID = 0x0000004B, + MTRClusterColorControlCommandStepColorTemperatureID = 0x0000004C, // Cluster Channel commands - MTRCommandIDTypeClusterChannelCommandChangeChannelID = 0x00000000, - MTRCommandIDTypeClusterChannelCommandChangeChannelResponseID = 0x00000001, - MTRCommandIDTypeClusterChannelCommandChangeChannelByNumberID = 0x00000002, - MTRCommandIDTypeClusterChannelCommandSkipChannelID = 0x00000003, + MTRClusterChannelCommandChangeChannelID = 0x00000000, + MTRClusterChannelCommandChangeChannelResponseID = 0x00000001, + MTRClusterChannelCommandChangeChannelByNumberID = 0x00000002, + MTRClusterChannelCommandSkipChannelID = 0x00000003, // Cluster TargetNavigator commands - MTRCommandIDTypeClusterTargetNavigatorCommandNavigateTargetID = 0x00000000, - MTRCommandIDTypeClusterTargetNavigatorCommandNavigateTargetResponseID = 0x00000001, + MTRClusterTargetNavigatorCommandNavigateTargetID = 0x00000000, + MTRClusterTargetNavigatorCommandNavigateTargetResponseID = 0x00000001, // Cluster MediaPlayback commands - MTRCommandIDTypeClusterMediaPlaybackCommandPlayID = 0x00000000, - MTRCommandIDTypeClusterMediaPlaybackCommandPauseID = 0x00000001, - MTRCommandIDTypeClusterMediaPlaybackCommandStopPlaybackID = 0x00000002, - MTRCommandIDTypeClusterMediaPlaybackCommandStartOverID = 0x00000003, - MTRCommandIDTypeClusterMediaPlaybackCommandPreviousID = 0x00000004, - MTRCommandIDTypeClusterMediaPlaybackCommandNextID = 0x00000005, - MTRCommandIDTypeClusterMediaPlaybackCommandRewindID = 0x00000006, - MTRCommandIDTypeClusterMediaPlaybackCommandFastForwardID = 0x00000007, - MTRCommandIDTypeClusterMediaPlaybackCommandSkipForwardID = 0x00000008, - MTRCommandIDTypeClusterMediaPlaybackCommandSkipBackwardID = 0x00000009, - MTRCommandIDTypeClusterMediaPlaybackCommandPlaybackResponseID = 0x0000000A, - MTRCommandIDTypeClusterMediaPlaybackCommandSeekID = 0x0000000B, + MTRClusterMediaPlaybackCommandPlayID = 0x00000000, + MTRClusterMediaPlaybackCommandPauseID = 0x00000001, + MTRClusterMediaPlaybackCommandStopPlaybackID = 0x00000002, + MTRClusterMediaPlaybackCommandStartOverID = 0x00000003, + MTRClusterMediaPlaybackCommandPreviousID = 0x00000004, + MTRClusterMediaPlaybackCommandNextID = 0x00000005, + MTRClusterMediaPlaybackCommandRewindID = 0x00000006, + MTRClusterMediaPlaybackCommandFastForwardID = 0x00000007, + MTRClusterMediaPlaybackCommandSkipForwardID = 0x00000008, + MTRClusterMediaPlaybackCommandSkipBackwardID = 0x00000009, + MTRClusterMediaPlaybackCommandPlaybackResponseID = 0x0000000A, + MTRClusterMediaPlaybackCommandSeekID = 0x0000000B, // Cluster MediaInput commands - MTRCommandIDTypeClusterMediaInputCommandSelectInputID = 0x00000000, - MTRCommandIDTypeClusterMediaInputCommandShowInputStatusID = 0x00000001, - MTRCommandIDTypeClusterMediaInputCommandHideInputStatusID = 0x00000002, - MTRCommandIDTypeClusterMediaInputCommandRenameInputID = 0x00000003, + MTRClusterMediaInputCommandSelectInputID = 0x00000000, + MTRClusterMediaInputCommandShowInputStatusID = 0x00000001, + MTRClusterMediaInputCommandHideInputStatusID = 0x00000002, + MTRClusterMediaInputCommandRenameInputID = 0x00000003, // Cluster LowPower commands - MTRCommandIDTypeClusterLowPowerCommandSleepID = 0x00000000, + MTRClusterLowPowerCommandSleepID = 0x00000000, // Cluster KeypadInput commands - MTRCommandIDTypeClusterKeypadInputCommandSendKeyID = 0x00000000, - MTRCommandIDTypeClusterKeypadInputCommandSendKeyResponseID = 0x00000001, + MTRClusterKeypadInputCommandSendKeyID = 0x00000000, + MTRClusterKeypadInputCommandSendKeyResponseID = 0x00000001, // Cluster ContentLauncher commands - MTRCommandIDTypeClusterContentLauncherCommandLaunchContentID = 0x00000000, - MTRCommandIDTypeClusterContentLauncherCommandLaunchURLID = 0x00000001, - MTRCommandIDTypeClusterContentLauncherCommandLaunchResponseID = 0x00000002, + MTRClusterContentLauncherCommandLaunchContentID = 0x00000000, + MTRClusterContentLauncherCommandLaunchURLID = 0x00000001, + MTRClusterContentLauncherCommandLaunchResponseID = 0x00000002, // Cluster AudioOutput commands - MTRCommandIDTypeClusterAudioOutputCommandSelectOutputID = 0x00000000, - MTRCommandIDTypeClusterAudioOutputCommandRenameOutputID = 0x00000001, + MTRClusterAudioOutputCommandSelectOutputID = 0x00000000, + MTRClusterAudioOutputCommandRenameOutputID = 0x00000001, // Cluster ApplicationLauncher commands - MTRCommandIDTypeClusterApplicationLauncherCommandLaunchAppID = 0x00000000, - MTRCommandIDTypeClusterApplicationLauncherCommandStopAppID = 0x00000001, - MTRCommandIDTypeClusterApplicationLauncherCommandHideAppID = 0x00000002, - MTRCommandIDTypeClusterApplicationLauncherCommandLauncherResponseID = 0x00000003, + MTRClusterApplicationLauncherCommandLaunchAppID = 0x00000000, + MTRClusterApplicationLauncherCommandStopAppID = 0x00000001, + MTRClusterApplicationLauncherCommandHideAppID = 0x00000002, + MTRClusterApplicationLauncherCommandLauncherResponseID = 0x00000003, // Cluster AccountLogin commands - MTRCommandIDTypeClusterAccountLoginCommandGetSetupPINID = 0x00000000, - MTRCommandIDTypeClusterAccountLoginCommandGetSetupPINResponseID = 0x00000001, - MTRCommandIDTypeClusterAccountLoginCommandLoginID = 0x00000002, - MTRCommandIDTypeClusterAccountLoginCommandLogoutID = 0x00000003, + MTRClusterAccountLoginCommandGetSetupPINID = 0x00000000, + MTRClusterAccountLoginCommandGetSetupPINResponseID = 0x00000001, + MTRClusterAccountLoginCommandLoginID = 0x00000002, + MTRClusterAccountLoginCommandLogoutID = 0x00000003, // Cluster ElectricalMeasurement commands - MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID = 0x00000000, - MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoCommandID = 0x00000000, - MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID = 0x00000001, - MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileCommandID = 0x00000001, + MTRClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID = 0x00000000, + MTRClusterElectricalMeasurementCommandGetProfileInfoCommandID = 0x00000000, + MTRClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID = 0x00000001, + MTRClusterElectricalMeasurementCommandGetMeasurementProfileCommandID = 0x00000001, // Cluster TestCluster commands - MTRCommandIDTypeClusterTestClusterCommandTestID = 0x00000000, - MTRCommandIDTypeClusterTestClusterCommandTestSpecificResponseID = 0x00000000, - MTRCommandIDTypeClusterTestClusterCommandTestNotHandledID = 0x00000001, - MTRCommandIDTypeClusterTestClusterCommandTestAddArgumentsResponseID = 0x00000001, - MTRCommandIDTypeClusterTestClusterCommandTestSpecificID = 0x00000002, - MTRCommandIDTypeClusterTestClusterCommandTestSimpleArgumentResponseID = 0x00000002, - MTRCommandIDTypeClusterTestClusterCommandTestUnknownCommandID = 0x00000003, - MTRCommandIDTypeClusterTestClusterCommandTestStructArrayArgumentResponseID = 0x00000003, - MTRCommandIDTypeClusterTestClusterCommandTestAddArgumentsID = 0x00000004, - MTRCommandIDTypeClusterTestClusterCommandTestListInt8UReverseResponseID = 0x00000004, - MTRCommandIDTypeClusterTestClusterCommandTestSimpleArgumentRequestID = 0x00000005, - MTRCommandIDTypeClusterTestClusterCommandTestEnumsResponseID = 0x00000005, - MTRCommandIDTypeClusterTestClusterCommandTestStructArrayArgumentRequestID = 0x00000006, - MTRCommandIDTypeClusterTestClusterCommandTestNullableOptionalResponseID = 0x00000006, - MTRCommandIDTypeClusterTestClusterCommandTestStructArgumentRequestID = 0x00000007, - MTRCommandIDTypeClusterTestClusterCommandTestComplexNullableOptionalResponseID = 0x00000007, - MTRCommandIDTypeClusterTestClusterCommandTestNestedStructArgumentRequestID = 0x00000008, - MTRCommandIDTypeClusterTestClusterCommandBooleanResponseID = 0x00000008, - MTRCommandIDTypeClusterTestClusterCommandTestListStructArgumentRequestID = 0x00000009, - MTRCommandIDTypeClusterTestClusterCommandSimpleStructResponseID = 0x00000009, - MTRCommandIDTypeClusterTestClusterCommandTestListInt8UArgumentRequestID = 0x0000000A, - MTRCommandIDTypeClusterTestClusterCommandTestEmitTestEventResponseID = 0x0000000A, - MTRCommandIDTypeClusterTestClusterCommandTestNestedStructListArgumentRequestID = 0x0000000B, - MTRCommandIDTypeClusterTestClusterCommandTestEmitTestFabricScopedEventResponseID = 0x0000000B, - MTRCommandIDTypeClusterTestClusterCommandTestListNestedStructListArgumentRequestID = 0x0000000C, - MTRCommandIDTypeClusterTestClusterCommandTestListInt8UReverseRequestID = 0x0000000D, - MTRCommandIDTypeClusterTestClusterCommandTestEnumsRequestID = 0x0000000E, - MTRCommandIDTypeClusterTestClusterCommandTestNullableOptionalRequestID = 0x0000000F, - MTRCommandIDTypeClusterTestClusterCommandTestComplexNullableOptionalRequestID = 0x00000010, - MTRCommandIDTypeClusterTestClusterCommandSimpleStructEchoRequestID = 0x00000011, - MTRCommandIDTypeClusterTestClusterCommandTimedInvokeRequestID = 0x00000012, - MTRCommandIDTypeClusterTestClusterCommandTestSimpleOptionalArgumentRequestID = 0x00000013, - MTRCommandIDTypeClusterTestClusterCommandTestEmitTestEventRequestID = 0x00000014, - MTRCommandIDTypeClusterTestClusterCommandTestEmitTestFabricScopedEventRequestID = 0x00000015, + MTRClusterTestClusterCommandTestID = 0x00000000, + MTRClusterTestClusterCommandTestSpecificResponseID = 0x00000000, + MTRClusterTestClusterCommandTestNotHandledID = 0x00000001, + MTRClusterTestClusterCommandTestAddArgumentsResponseID = 0x00000001, + MTRClusterTestClusterCommandTestSpecificID = 0x00000002, + MTRClusterTestClusterCommandTestSimpleArgumentResponseID = 0x00000002, + MTRClusterTestClusterCommandTestUnknownCommandID = 0x00000003, + MTRClusterTestClusterCommandTestStructArrayArgumentResponseID = 0x00000003, + MTRClusterTestClusterCommandTestAddArgumentsID = 0x00000004, + MTRClusterTestClusterCommandTestListInt8UReverseResponseID = 0x00000004, + MTRClusterTestClusterCommandTestSimpleArgumentRequestID = 0x00000005, + MTRClusterTestClusterCommandTestEnumsResponseID = 0x00000005, + MTRClusterTestClusterCommandTestStructArrayArgumentRequestID = 0x00000006, + MTRClusterTestClusterCommandTestNullableOptionalResponseID = 0x00000006, + MTRClusterTestClusterCommandTestStructArgumentRequestID = 0x00000007, + MTRClusterTestClusterCommandTestComplexNullableOptionalResponseID = 0x00000007, + MTRClusterTestClusterCommandTestNestedStructArgumentRequestID = 0x00000008, + MTRClusterTestClusterCommandBooleanResponseID = 0x00000008, + MTRClusterTestClusterCommandTestListStructArgumentRequestID = 0x00000009, + MTRClusterTestClusterCommandSimpleStructResponseID = 0x00000009, + MTRClusterTestClusterCommandTestListInt8UArgumentRequestID = 0x0000000A, + MTRClusterTestClusterCommandTestEmitTestEventResponseID = 0x0000000A, + MTRClusterTestClusterCommandTestNestedStructListArgumentRequestID = 0x0000000B, + MTRClusterTestClusterCommandTestEmitTestFabricScopedEventResponseID = 0x0000000B, + MTRClusterTestClusterCommandTestListNestedStructListArgumentRequestID = 0x0000000C, + MTRClusterTestClusterCommandTestListInt8UReverseRequestID = 0x0000000D, + MTRClusterTestClusterCommandTestEnumsRequestID = 0x0000000E, + MTRClusterTestClusterCommandTestNullableOptionalRequestID = 0x0000000F, + MTRClusterTestClusterCommandTestComplexNullableOptionalRequestID = 0x00000010, + MTRClusterTestClusterCommandSimpleStructEchoRequestID = 0x00000011, + MTRClusterTestClusterCommandTimedInvokeRequestID = 0x00000012, + MTRClusterTestClusterCommandTestSimpleOptionalArgumentRequestID = 0x00000013, + MTRClusterTestClusterCommandTestEmitTestEventRequestID = 0x00000014, + MTRClusterTestClusterCommandTestEmitTestFabricScopedEventRequestID = 0x00000015, // Cluster FaultInjection commands - MTRCommandIDTypeClusterFaultInjectionCommandFailAtFaultID = 0x00000000, - MTRCommandIDTypeClusterFaultInjectionCommandFailRandomlyAtFaultID = 0x00000001, + MTRClusterFaultInjectionCommandFailAtFaultID = 0x00000000, + MTRClusterFaultInjectionCommandFailRandomlyAtFaultID = 0x00000001, }; #pragma mark - Events IDs -typedef NS_ENUM(uint32_t, MTREventIDType) { +typedef NS_ENUM(uint32_t, MTRClusterEventIDType) { // Cluster AccessControl events - MTREventIDTypeClusterAccessControlEventAccessControlEntryChangedID = 0x00000000, - MTREventIDTypeClusterAccessControlEventAccessControlExtensionChangedID = 0x00000001, + MTRClusterAccessControlEventAccessControlEntryChangedID = 0x00000000, + MTRClusterAccessControlEventAccessControlExtensionChangedID = 0x00000001, // Cluster Actions events - MTREventIDTypeClusterActionsEventStateChangedID = 0x00000000, - MTREventIDTypeClusterActionsEventActionFailedID = 0x00000001, + MTRClusterActionsEventStateChangedID = 0x00000000, + MTRClusterActionsEventActionFailedID = 0x00000001, // Cluster Basic events - MTREventIDTypeClusterBasicEventStartUpID = 0x00000000, - MTREventIDTypeClusterBasicEventShutDownID = 0x00000001, - MTREventIDTypeClusterBasicEventLeaveID = 0x00000002, - MTREventIDTypeClusterBasicEventReachableChangedID = 0x00000003, + MTRClusterBasicEventStartUpID = 0x00000000, + MTRClusterBasicEventShutDownID = 0x00000001, + MTRClusterBasicEventLeaveID = 0x00000002, + MTRClusterBasicEventReachableChangedID = 0x00000003, - // Cluster OTASoftwareUpdateRequestor events - MTREventIDTypeClusterOTASoftwareUpdateRequestorEventStateTransitionID = 0x00000000, - MTREventIDTypeClusterOTASoftwareUpdateRequestorEventVersionAppliedID = 0x00000001, - MTREventIDTypeClusterOTASoftwareUpdateRequestorEventDownloadErrorID = 0x00000002, + // Cluster OtaSoftwareUpdateRequestor events + MTRClusterOtaSoftwareUpdateRequestorEventStateTransitionID = 0x00000000, + MTRClusterOtaSoftwareUpdateRequestorEventVersionAppliedID = 0x00000001, + MTRClusterOtaSoftwareUpdateRequestorEventDownloadErrorID = 0x00000002, // Cluster GeneralDiagnostics events - MTREventIDTypeClusterGeneralDiagnosticsEventHardwareFaultChangeID = 0x00000000, - MTREventIDTypeClusterGeneralDiagnosticsEventRadioFaultChangeID = 0x00000001, - MTREventIDTypeClusterGeneralDiagnosticsEventNetworkFaultChangeID = 0x00000002, - MTREventIDTypeClusterGeneralDiagnosticsEventBootReasonID = 0x00000003, + MTRClusterGeneralDiagnosticsEventHardwareFaultChangeID = 0x00000000, + MTRClusterGeneralDiagnosticsEventRadioFaultChangeID = 0x00000001, + MTRClusterGeneralDiagnosticsEventNetworkFaultChangeID = 0x00000002, + MTRClusterGeneralDiagnosticsEventBootReasonID = 0x00000003, // Cluster SoftwareDiagnostics events - MTREventIDTypeClusterSoftwareDiagnosticsEventSoftwareFaultID = 0x00000000, + MTRClusterSoftwareDiagnosticsEventSoftwareFaultID = 0x00000000, // Cluster ThreadNetworkDiagnostics events - MTREventIDTypeClusterThreadNetworkDiagnosticsEventConnectionStatusID = 0x00000000, - MTREventIDTypeClusterThreadNetworkDiagnosticsEventNetworkFaultChangeID = 0x00000001, + MTRClusterThreadNetworkDiagnosticsEventConnectionStatusID = 0x00000000, + MTRClusterThreadNetworkDiagnosticsEventNetworkFaultChangeID = 0x00000001, // Cluster WiFiNetworkDiagnostics events - MTREventIDTypeClusterWiFiNetworkDiagnosticsEventDisconnectionID = 0x00000000, - MTREventIDTypeClusterWiFiNetworkDiagnosticsEventAssociationFailureID = 0x00000001, - MTREventIDTypeClusterWiFiNetworkDiagnosticsEventConnectionStatusID = 0x00000002, + MTRClusterWiFiNetworkDiagnosticsEventDisconnectionID = 0x00000000, + MTRClusterWiFiNetworkDiagnosticsEventAssociationFailureID = 0x00000001, + MTRClusterWiFiNetworkDiagnosticsEventConnectionStatusID = 0x00000002, // Cluster BridgedDeviceBasic events - MTREventIDTypeClusterBridgedDeviceBasicEventStartUpID = 0x00000000, - MTREventIDTypeClusterBridgedDeviceBasicEventShutDownID = 0x00000001, - MTREventIDTypeClusterBridgedDeviceBasicEventLeaveID = 0x00000002, - MTREventIDTypeClusterBridgedDeviceBasicEventReachableChangedID = 0x00000003, + MTRClusterBridgedDeviceBasicEventStartUpID = 0x00000000, + MTRClusterBridgedDeviceBasicEventShutDownID = 0x00000001, + MTRClusterBridgedDeviceBasicEventLeaveID = 0x00000002, + MTRClusterBridgedDeviceBasicEventReachableChangedID = 0x00000003, // Cluster Switch events - MTREventIDTypeClusterSwitchEventSwitchLatchedID = 0x00000000, - MTREventIDTypeClusterSwitchEventInitialPressID = 0x00000001, - MTREventIDTypeClusterSwitchEventLongPressID = 0x00000002, - MTREventIDTypeClusterSwitchEventShortReleaseID = 0x00000003, - MTREventIDTypeClusterSwitchEventLongReleaseID = 0x00000004, - MTREventIDTypeClusterSwitchEventMultiPressOngoingID = 0x00000005, - MTREventIDTypeClusterSwitchEventMultiPressCompleteID = 0x00000006, + MTRClusterSwitchEventSwitchLatchedID = 0x00000000, + MTRClusterSwitchEventInitialPressID = 0x00000001, + MTRClusterSwitchEventLongPressID = 0x00000002, + MTRClusterSwitchEventShortReleaseID = 0x00000003, + MTRClusterSwitchEventLongReleaseID = 0x00000004, + MTRClusterSwitchEventMultiPressOngoingID = 0x00000005, + MTRClusterSwitchEventMultiPressCompleteID = 0x00000006, // Cluster BooleanState events - MTREventIDTypeClusterBooleanStateEventStateChangeID = 0x00000000, + MTRClusterBooleanStateEventStateChangeID = 0x00000000, // Cluster DoorLock events - MTREventIDTypeClusterDoorLockEventDoorLockAlarmID = 0x00000000, - MTREventIDTypeClusterDoorLockEventDoorStateChangeID = 0x00000001, - MTREventIDTypeClusterDoorLockEventLockOperationID = 0x00000002, - MTREventIDTypeClusterDoorLockEventLockOperationErrorID = 0x00000003, - MTREventIDTypeClusterDoorLockEventLockUserChangeID = 0x00000004, + MTRClusterDoorLockEventDoorLockAlarmID = 0x00000000, + MTRClusterDoorLockEventDoorStateChangeID = 0x00000001, + MTRClusterDoorLockEventLockOperationID = 0x00000002, + MTRClusterDoorLockEventLockOperationErrorID = 0x00000003, + MTRClusterDoorLockEventLockUserChangeID = 0x00000004, // Cluster PumpConfigurationAndControl events - MTREventIDTypeClusterPumpConfigurationAndControlEventSupplyVoltageLowID = 0x00000000, - MTREventIDTypeClusterPumpConfigurationAndControlEventSupplyVoltageHighID = 0x00000001, - MTREventIDTypeClusterPumpConfigurationAndControlEventPowerMissingPhaseID = 0x00000002, - MTREventIDTypeClusterPumpConfigurationAndControlEventSystemPressureLowID = 0x00000003, - MTREventIDTypeClusterPumpConfigurationAndControlEventSystemPressureHighID = 0x00000004, - MTREventIDTypeClusterPumpConfigurationAndControlEventDryRunningID = 0x00000005, - MTREventIDTypeClusterPumpConfigurationAndControlEventMotorTemperatureHighID = 0x00000006, - MTREventIDTypeClusterPumpConfigurationAndControlEventPumpMotorFatalFailureID = 0x00000007, - MTREventIDTypeClusterPumpConfigurationAndControlEventElectronicTemperatureHighID = 0x00000008, - MTREventIDTypeClusterPumpConfigurationAndControlEventPumpBlockedID = 0x00000009, - MTREventIDTypeClusterPumpConfigurationAndControlEventSensorFailureID = 0x0000000A, - MTREventIDTypeClusterPumpConfigurationAndControlEventElectronicNonFatalFailureID = 0x0000000B, - MTREventIDTypeClusterPumpConfigurationAndControlEventElectronicFatalFailureID = 0x0000000C, - MTREventIDTypeClusterPumpConfigurationAndControlEventGeneralFaultID = 0x0000000D, - MTREventIDTypeClusterPumpConfigurationAndControlEventLeakageID = 0x0000000E, - MTREventIDTypeClusterPumpConfigurationAndControlEventAirDetectionID = 0x0000000F, - MTREventIDTypeClusterPumpConfigurationAndControlEventTurbineOperationID = 0x00000010, + MTRClusterPumpConfigurationAndControlEventSupplyVoltageLowID = 0x00000000, + MTRClusterPumpConfigurationAndControlEventSupplyVoltageHighID = 0x00000001, + MTRClusterPumpConfigurationAndControlEventPowerMissingPhaseID = 0x00000002, + MTRClusterPumpConfigurationAndControlEventSystemPressureLowID = 0x00000003, + MTRClusterPumpConfigurationAndControlEventSystemPressureHighID = 0x00000004, + MTRClusterPumpConfigurationAndControlEventDryRunningID = 0x00000005, + MTRClusterPumpConfigurationAndControlEventMotorTemperatureHighID = 0x00000006, + MTRClusterPumpConfigurationAndControlEventPumpMotorFatalFailureID = 0x00000007, + MTRClusterPumpConfigurationAndControlEventElectronicTemperatureHighID = 0x00000008, + MTRClusterPumpConfigurationAndControlEventPumpBlockedID = 0x00000009, + MTRClusterPumpConfigurationAndControlEventSensorFailureID = 0x0000000A, + MTRClusterPumpConfigurationAndControlEventElectronicNonFatalFailureID = 0x0000000B, + MTRClusterPumpConfigurationAndControlEventElectronicFatalFailureID = 0x0000000C, + MTRClusterPumpConfigurationAndControlEventGeneralFaultID = 0x0000000D, + MTRClusterPumpConfigurationAndControlEventLeakageID = 0x0000000E, + MTRClusterPumpConfigurationAndControlEventAirDetectionID = 0x0000000F, + MTRClusterPumpConfigurationAndControlEventTurbineOperationID = 0x00000010, // Cluster TestCluster events - MTREventIDTypeClusterTestClusterEventTestEventID = 0x00000001, - MTREventIDTypeClusterTestClusterEventTestFabricScopedEventID = 0x00000002, + MTRClusterTestClusterEventTestEventID = 0x00000001, + MTRClusterTestClusterEventTestFabricScopedEventID = 0x00000002, }; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 2182161a4f13ac..4b9c73a67e8f09 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -15,9 +15,11 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import -#import +#import #import #import @@ -32,18 +34,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterIdentify : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeIdentifyTimeWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)dataValueDictionary @@ -75,40 +77,41 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterGroups : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)removeAllGroupsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params; @@ -133,58 +136,59 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterScenes : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (NSDictionary *)readAttributeSceneCountWithParams:(MTRReadParams * _Nullable)params; @@ -219,46 +223,46 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterOnOff : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)offWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)onWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)toggleWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)onWithRecallGlobalSceneWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeOnOffWithParams:(MTRReadParams * _Nullable)params; @@ -306,9 +310,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterOnOffSwitchConfiguration : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params; @@ -340,46 +344,46 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterLevelControl : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params; @@ -465,9 +469,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterBinaryInputBasic : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeActiveTextWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataValueDictionary @@ -539,11 +543,11 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterDescriptor : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (NSDictionary *)readAttributeDeviceTypeListWithParams:(MTRReadParams * _Nullable)params; +- (NSDictionary *)readAttributeDeviceListWithParams:(MTRReadParams * _Nullable)params; - (NSDictionary *)readAttributeServerListWithParams:(MTRReadParams * _Nullable)params; @@ -572,9 +576,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterBinding : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValueDictionary @@ -607,14 +611,14 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterAccessControl : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (NSDictionary *)readAttributeACLWithParams:(MTRReadParams * _Nullable)params; -- (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDictionary +- (NSDictionary *)readAttributeAclWithParams:(MTRReadParams * _Nullable)params; +- (void)writeAttributeAclWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs; -- (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributeAclWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params; @@ -652,58 +656,58 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterActions : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeActionListWithParams:(MTRReadParams * _Nullable)params; @@ -734,17 +738,17 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterBasic : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)mfgSpecificPingWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeDataModelRevisionWithParams:(MTRReadParams * _Nullable)params; @@ -820,26 +824,26 @@ NS_ASSUME_NONNULL_BEGIN * Cluster OTA Software Update Provider * Provides an interface for providing OTA software updates */ -@interface MTRClusterOTASoftwareUpdateProvider : MTRCluster +@interface MTRClusterOtaSoftwareUpdateProvider : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParams *)params +- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completion; -- (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completion; -- (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params; @@ -860,16 +864,16 @@ NS_ASSUME_NONNULL_BEGIN * Cluster OTA Software Update Requestor * Provides an interface for downloading and applying OTA software updates */ -@interface MTRClusterOTASoftwareUpdateRequestor : MTRCluster +@interface MTRClusterOtaSoftwareUpdateRequestor : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; -- (void)announceOtaProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params +- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary *)dataValueDictionary @@ -908,9 +912,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterLocalizationConfiguration : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeActiveLocaleWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)dataValueDictionary @@ -945,9 +949,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterTimeFormatLocalization : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeHourFormatWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataValueDictionary @@ -989,9 +993,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterUnitLocalization : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeTemperatureUnitWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)dataValueDictionary @@ -1021,9 +1025,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterPowerSourceConfiguration : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeSourcesWithParams:(MTRReadParams * _Nullable)params; @@ -1049,9 +1053,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterPowerSource : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params; @@ -1136,32 +1140,31 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterGeneralCommissioning : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)commissioningCompleteWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)( - MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (NSDictionary *)readAttributeBreadcrumbWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataValueDictionary @@ -1199,40 +1202,40 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterNetworkCommissioning : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (NSDictionary *)readAttributeMaxNetworksWithParams:(MTRReadParams * _Nullable)params; @@ -1276,15 +1279,15 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterDiagnosticLogs : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params; @@ -1308,14 +1311,14 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterGeneralDiagnostics : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeNetworkInterfacesWithParams:(MTRReadParams * _Nullable)params; @@ -1357,17 +1360,17 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterSoftwareDiagnostics : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)resetWatermarksWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeThreadMetricsWithParams:(MTRReadParams * _Nullable)params; @@ -1399,17 +1402,17 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterThreadNetworkDiagnostics : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeChannelWithParams:(MTRReadParams * _Nullable)params; @@ -1559,17 +1562,17 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterWiFiNetworkDiagnostics : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeBssidWithParams:(MTRReadParams * _Nullable)params; @@ -1619,17 +1622,17 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterEthernetNetworkDiagnostics : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributePHYRateWithParams:(MTRReadParams * _Nullable)params; @@ -1673,9 +1676,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRClusterBridgedDeviceBasic : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params; @@ -1738,9 +1741,9 @@ light or a window shade. */ @interface MTRClusterSwitch : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeNumberOfPositionsWithParams:(MTRReadParams * _Nullable)params; @@ -1769,25 +1772,25 @@ light or a window shade. */ @interface MTRClusterAdministratorCommissioning : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)revokeCommissioningWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeWindowStatusWithParams:(MTRReadParams * _Nullable)params; @@ -1817,49 +1820,49 @@ light or a window shade. */ @interface MTRClusterOperationalCredentials : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params; @@ -1894,28 +1897,28 @@ light or a window shade. */ @interface MTRClusterGroupKeyManagement : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (NSDictionary *)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataValueDictionary @@ -1952,9 +1955,9 @@ labels. */ @interface MTRClusterFixedLabel : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params; @@ -1979,9 +1982,9 @@ labels. */ @interface MTRClusterUserLabel : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataValueDictionary @@ -2011,9 +2014,9 @@ labels. */ @interface MTRClusterBooleanState : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeStateValueWithParams:(MTRReadParams * _Nullable)params; @@ -2038,14 +2041,14 @@ labels. */ @interface MTRClusterModeSelect : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params; @@ -2090,87 +2093,88 @@ labels. */ @interface MTRClusterDoorLock : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params; @@ -2355,47 +2359,47 @@ labels. */ @interface MTRClusterWindowCovering : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)upOrOpenWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)downOrCloseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)stopMotionWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeTypeWithParams:(MTRReadParams * _Nullable)params; @@ -2467,21 +2471,21 @@ labels. */ @interface MTRClusterBarrierControl : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)barrierControlStopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeBarrierMovingStateWithParams:(MTRReadParams * _Nullable)params; @@ -2554,9 +2558,9 @@ labels. */ @interface MTRClusterPumpConfigurationAndControl : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMaxPressureWithParams:(MTRReadParams * _Nullable)params; @@ -2645,30 +2649,30 @@ labels. */ @interface MTRClusterThermostat : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)clearWeeklyScheduleWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params; @@ -2924,9 +2928,9 @@ labels. */ @interface MTRClusterFanControl : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeFanModeWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValueDictionary @@ -3001,9 +3005,9 @@ labels. */ @interface MTRClusterThermostatUserInterfaceConfiguration : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeTemperatureDisplayModeWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeTemperatureDisplayModeWithValue:(NSDictionary *)dataValueDictionary @@ -3047,86 +3051,86 @@ labels. */ @interface MTRClusterColorControl : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeCurrentHueWithParams:(MTRReadParams * _Nullable)params; @@ -3318,9 +3322,9 @@ labels. */ @interface MTRClusterBallastConfiguration : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributePhysicalMinLevelWithParams:(MTRReadParams * _Nullable)params; @@ -3421,9 +3425,9 @@ labels. */ @interface MTRClusterIlluminanceMeasurement : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3456,9 +3460,9 @@ labels. */ @interface MTRClusterTemperatureMeasurement : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3489,9 +3493,9 @@ labels. */ @interface MTRClusterPressureMeasurement : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3532,9 +3536,9 @@ labels. */ @interface MTRClusterFlowMeasurement : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3565,9 +3569,9 @@ labels. */ @interface MTRClusterRelativeHumidityMeasurement : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3598,9 +3602,9 @@ labels. */ @interface MTRClusterOccupancySensing : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params; @@ -3608,24 +3612,24 @@ labels. - (NSDictionary *)readAttributeOccupancySensorTypeBitmapWithParams:(MTRReadParams * _Nullable)params; -- (NSDictionary *)readAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params; -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary +- (NSDictionary *)readAttributePirOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params; +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs; -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params; -- (NSDictionary *)readAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params; -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary +- (NSDictionary *)readAttributePirUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params; +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs; -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params; -- (NSDictionary *)readAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params; -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary +- (NSDictionary *)readAttributePirUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params; +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs; -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params; @@ -3691,11 +3695,11 @@ labels. * Cluster Wake on LAN * This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ -@interface MTRClusterWakeOnLAN : MTRCluster +@interface MTRClusterWakeOnLan : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeMACAddressWithParams:(MTRReadParams * _Nullable)params; @@ -3720,23 +3724,23 @@ labels. */ @interface MTRClusterChannel : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeChannelListWithParams:(MTRReadParams * _Nullable)params; @@ -3765,15 +3769,15 @@ labels. */ @interface MTRClusterTargetNavigator : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (NSDictionary *)readAttributeTargetListWithParams:(MTRReadParams * _Nullable)params; @@ -3801,97 +3805,97 @@ labels. */ @interface MTRClusterMediaPlayback : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)playWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)stopPlaybackWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)startOverWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)previousWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)nextWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)rewindWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)fastForwardWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (NSDictionary *)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params; @@ -3928,32 +3932,32 @@ labels. */ @interface MTRClusterMediaInput : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)showInputStatusWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)hideInputStatusWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeInputListWithParams:(MTRReadParams * _Nullable)params; @@ -3980,17 +3984,17 @@ labels. */ @interface MTRClusterLowPower : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)sleepWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params; @@ -4013,15 +4017,15 @@ labels. */ @interface MTRClusterKeypadInput : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params; @@ -4044,20 +4048,20 @@ labels. */ @interface MTRClusterContentLauncher : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (NSDictionary *)readAttributeAcceptHeaderWithParams:(MTRReadParams * _Nullable)params; @@ -4089,18 +4093,18 @@ labels. */ @interface MTRClusterAudioOutput : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeOutputListWithParams:(MTRReadParams * _Nullable)params; @@ -4127,25 +4131,25 @@ labels. */ @interface MTRClusterApplicationLauncher : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (NSDictionary *)readAttributeCatalogListWithParams:(MTRReadParams * _Nullable)params; @@ -4178,9 +4182,9 @@ labels. */ @interface MTRClusterApplicationBasic : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params; @@ -4221,26 +4225,26 @@ labels. */ @interface MTRClusterAccountLogin : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)logoutWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params; @@ -4264,21 +4268,21 @@ labels. */ @interface MTRClusterElectricalMeasurement : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)getProfileInfoCommandWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params; @@ -4597,142 +4601,141 @@ labels. */ @interface MTRClusterTestCluster : MTRCluster -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)testWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)testNotHandledWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testSpecificWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)testUnknownCommandWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params expectedValues: (NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testListNestedStructListArgumentRequestWithParams: (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params expectedValues: (NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completion; -- (void) - testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completion; + 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; - (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, - NSError * _Nullable error))completion; + completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)timedInvokeRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params expectedValues: (NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion; + completionHandler:(StatusCompletion)completionHandler; - (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, - NSError * _Nullable error))completion; -- (void) - testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params - expectedValues: - (NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion: - (void (^)( - MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, - NSError * _Nullable error))completion; + 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; - (NSDictionary *)readAttributeBooleanWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValueDictionary diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 0cb9da06b3129e..5aa5ac5ed74270 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -15,12 +15,14 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import +#import "MTRAttributeCacheContainer_Internal.h" #import "MTRBaseDevice_internal.h" #import "MTRCallbackBridge_internal.h" #import "MTRClusterConstants.h" -#import "MTRClusterStateCacheContainer_Internal.h" #import "MTRCluster_internal.h" #import "MTRClusters_internal.h" #import "MTRCommandPayloadsObjc.h" @@ -41,14 +43,14 @@ // NOLINTBEGIN(clang-analyzer-cplusplus.NewDeleteLeaks): Linter is unable to locate the delete on these objects. @implementation MTRClusterIdentify -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -57,7 +59,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -65,7 +67,7 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -90,7 +92,7 @@ new MTRCommandSuccessCallbackBridge( - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -98,7 +100,7 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -126,8 +128,8 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeIdentifyTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIdentifyID) - attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID) + clusterID:@(MTRClusterIdentifyID) + attributeID:@(MTRClusterIdentifyAttributeIdentifyTimeID) params:params]; } @@ -143,8 +145,8 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIdentifyID) - attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID) + clusterID:@(MTRClusterIdentifyID) + attributeID:@(MTRClusterIdentifyAttributeIdentifyTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -153,48 +155,48 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeIdentifyTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIdentifyID) - attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTypeID) + clusterID:@(MTRClusterIdentifyID) + attributeID:@(MTRClusterIdentifyAttributeIdentifyTypeID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIdentifyID) - attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeGeneratedCommandListID) + clusterID:@(MTRClusterIdentifyID) + attributeID:@(MTRClusterIdentifyAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIdentifyID) - attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAcceptedCommandListID) + clusterID:@(MTRClusterIdentifyID) + attributeID:@(MTRClusterIdentifyAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIdentifyID) - attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAttributeListID) + clusterID:@(MTRClusterIdentifyID) + attributeID:@(MTRClusterIdentifyAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIdentifyID) - attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeFeatureMapID) + clusterID:@(MTRClusterIdentifyID) + attributeID:@(MTRClusterIdentifyAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIdentifyID) - attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeClusterRevisionID) + clusterID:@(MTRClusterIdentifyID) + attributeID:@(MTRClusterIdentifyAttributeClusterRevisionID) params:params]; } @@ -202,14 +204,14 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data @implementation MTRClusterGroups -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -218,12 +220,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGroupsClusterAddGroupResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRGroupsClusterAddGroupResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -248,13 +251,13 @@ new MTRGroupsClusterAddGroupResponseCallbackBridge(self.callbackQueue, baseDevic - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGroupsClusterViewGroupResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRGroupsClusterViewGroupResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -278,13 +281,13 @@ new MTRGroupsClusterViewGroupResponseCallbackBridge(self.callbackQueue, baseDevi - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -329,13 +332,13 @@ new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(self.callbackQueue, - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGroupsClusterRemoveGroupResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRGroupsClusterRemoveGroupResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -358,17 +361,17 @@ new MTRGroupsClusterRemoveGroupResponseCallbackBridge(self.callbackQueue, baseDe - (void)removeAllGroupsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self removeAllGroupsWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -376,7 +379,7 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -400,7 +403,7 @@ new MTRCommandSuccessCallbackBridge( - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -408,7 +411,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -434,48 +437,48 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupsID) - attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeNameSupportID) + clusterID:@(MTRClusterGroupsID) + attributeID:@(MTRClusterGroupsAttributeNameSupportID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupsID) - attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeGeneratedCommandListID) + clusterID:@(MTRClusterGroupsID) + attributeID:@(MTRClusterGroupsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupsID) - attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAcceptedCommandListID) + clusterID:@(MTRClusterGroupsID) + attributeID:@(MTRClusterGroupsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupsID) - attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAttributeListID) + clusterID:@(MTRClusterGroupsID) + attributeID:@(MTRClusterGroupsAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupsID) - attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeFeatureMapID) + clusterID:@(MTRClusterGroupsID) + attributeID:@(MTRClusterGroupsAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupsID) - attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeClusterRevisionID) + clusterID:@(MTRClusterGroupsID) + attributeID:@(MTRClusterGroupsAttributeClusterRevisionID) params:params]; } @@ -483,14 +486,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterScenes -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -499,12 +502,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterAddSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRScenesClusterAddSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -604,13 +608,13 @@ new MTRScenesClusterAddSceneResponseCallbackBridge(self.callbackQueue, baseDevic - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterViewSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRScenesClusterViewSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -635,13 +639,13 @@ new MTRScenesClusterViewSceneResponseCallbackBridge(self.callbackQueue, baseDevi - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterRemoveSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRScenesClusterRemoveSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -666,13 +670,13 @@ new MTRScenesClusterRemoveSceneResponseCallbackBridge(self.callbackQueue, baseDe - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterRemoveAllScenesResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRScenesClusterRemoveAllScenesResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -696,13 +700,13 @@ new MTRScenesClusterRemoveAllScenesResponseCallbackBridge(self.callbackQueue, ba - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterStoreSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRScenesClusterStoreSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -727,7 +731,7 @@ new MTRScenesClusterStoreSceneResponseCallbackBridge(self.callbackQueue, baseDev - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -735,7 +739,7 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -770,13 +774,13 @@ new MTRCommandSuccessCallbackBridge( - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterGetSceneMembershipResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRScenesClusterGetSceneMembershipResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -800,13 +804,13 @@ new MTRScenesClusterGetSceneMembershipResponseCallbackBridge(self.callbackQueue, - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -906,13 +910,13 @@ new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(self.callbackQueue, b - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -937,13 +941,13 @@ new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(self.callbackQueue, - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterCopySceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRScenesClusterCopySceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -971,88 +975,88 @@ new MTRScenesClusterCopySceneResponseCallbackBridge(self.callbackQueue, baseDevi - (NSDictionary *)readAttributeSceneCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneCountID) + clusterID:@(MTRClusterScenesID) + attributeID:@(MTRClusterScenesAttributeSceneCountID) params:params]; } - (NSDictionary *)readAttributeCurrentSceneWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeCurrentSceneID) + clusterID:@(MTRClusterScenesID) + attributeID:@(MTRClusterScenesAttributeCurrentSceneID) params:params]; } - (NSDictionary *)readAttributeCurrentGroupWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeCurrentGroupID) + clusterID:@(MTRClusterScenesID) + attributeID:@(MTRClusterScenesAttributeCurrentGroupID) params:params]; } - (NSDictionary *)readAttributeSceneValidWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneValidID) + clusterID:@(MTRClusterScenesID) + attributeID:@(MTRClusterScenesAttributeSceneValidID) params:params]; } - (NSDictionary *)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeNameSupportID) + clusterID:@(MTRClusterScenesID) + attributeID:@(MTRClusterScenesAttributeNameSupportID) params:params]; } - (NSDictionary *)readAttributeLastConfiguredByWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeLastConfiguredByID) + clusterID:@(MTRClusterScenesID) + attributeID:@(MTRClusterScenesAttributeLastConfiguredByID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeGeneratedCommandListID) + clusterID:@(MTRClusterScenesID) + attributeID:@(MTRClusterScenesAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID) + clusterID:@(MTRClusterScenesID) + attributeID:@(MTRClusterScenesAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeAttributeListID) + clusterID:@(MTRClusterScenesID) + attributeID:@(MTRClusterScenesAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeFeatureMapID) + clusterID:@(MTRClusterScenesID) + attributeID:@(MTRClusterScenesAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeClusterRevisionID) + clusterID:@(MTRClusterScenesID) + attributeID:@(MTRClusterScenesAttributeClusterRevisionID) params:params]; } @@ -1060,14 +1064,14 @@ new MTRScenesClusterCopySceneResponseCallbackBridge(self.callbackQueue, baseDevi @implementation MTRClusterOnOff -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -1075,14 +1079,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)offWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self offWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self offWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; } - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1090,7 +1097,7 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1113,14 +1120,17 @@ new MTRCommandSuccessCallbackBridge( - (void)onWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self onWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self onWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; } - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1128,7 +1138,7 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1151,14 +1161,17 @@ new MTRCommandSuccessCallbackBridge( - (void)toggleWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self toggleWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self toggleWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; } - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1166,7 +1179,7 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1190,7 +1203,7 @@ new MTRCommandSuccessCallbackBridge( - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1198,7 +1211,7 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1224,17 +1237,17 @@ new MTRCommandSuccessCallbackBridge( - (void)onWithRecallGlobalSceneWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self onWithRecallGlobalSceneWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1242,7 +1255,7 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1266,7 +1279,7 @@ new MTRCommandSuccessCallbackBridge( - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1274,7 +1287,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1302,24 +1315,24 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeOnOffWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnOffID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeOnOffID) params:params]; } - (NSDictionary *)readAttributeGlobalSceneControlWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGlobalSceneControlID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeGlobalSceneControlID) params:params]; } - (NSDictionary *)readAttributeOnTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeOnTimeID) params:params]; } @@ -1335,8 +1348,8 @@ - (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeOnTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -1345,8 +1358,8 @@ - (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeOffWaitTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeOffWaitTimeID) params:params]; } @@ -1362,8 +1375,8 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeOffWaitTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -1372,8 +1385,8 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeStartUpOnOffWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeStartUpOnOffID) params:params]; } @@ -1389,8 +1402,8 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeStartUpOnOffID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -1399,40 +1412,40 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGeneratedCommandListID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAttributeListID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeClusterRevisionID) + clusterID:@(MTRClusterOnOffID) + attributeID:@(MTRClusterOnOffAttributeClusterRevisionID) params:params]; } @@ -1440,14 +1453,14 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data @implementation MTRClusterOnOffSwitchConfiguration -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -1456,16 +1469,16 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID) + clusterID:@(MTRClusterOnOffSwitchConfigurationID) + attributeID:@(MTRClusterOnOffSwitchConfigurationAttributeSwitchTypeID) params:params]; } - (NSDictionary *)readAttributeSwitchActionsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) + clusterID:@(MTRClusterOnOffSwitchConfigurationID) + attributeID:@(MTRClusterOnOffSwitchConfigurationAttributeSwitchActionsID) params:params]; } @@ -1481,8 +1494,8 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) + clusterID:@(MTRClusterOnOffSwitchConfigurationID) + attributeID:@(MTRClusterOnOffSwitchConfigurationAttributeSwitchActionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -1490,43 +1503,41 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOnOffSwitchConfigurationID) + attributeID:@(MTRClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOnOffSwitchConfigurationID) + attributeID:@(MTRClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID) + clusterID:@(MTRClusterOnOffSwitchConfigurationID) + attributeID:@(MTRClusterOnOffSwitchConfigurationAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID) + clusterID:@(MTRClusterOnOffSwitchConfigurationID) + attributeID:@(MTRClusterOnOffSwitchConfigurationAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID) + clusterID:@(MTRClusterOnOffSwitchConfigurationID) + attributeID:@(MTRClusterOnOffSwitchConfigurationAttributeClusterRevisionID) params:params]; } @@ -1534,14 +1545,14 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat @implementation MTRClusterLevelControl -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -1550,7 +1561,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1558,7 +1569,7 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1591,7 +1602,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1599,7 +1610,7 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1632,7 +1643,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1640,7 +1651,7 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1674,7 +1685,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1682,7 +1693,7 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1708,7 +1719,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1716,7 +1727,7 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1749,7 +1760,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1757,7 +1768,7 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1790,7 +1801,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1798,7 +1809,7 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1832,7 +1843,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1840,7 +1851,7 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1866,7 +1877,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -1874,7 +1885,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1899,64 +1910,64 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentLevelID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeCurrentLevelID) params:params]; } - (NSDictionary *)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeRemainingTimeID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeRemainingTimeID) params:params]; } - (NSDictionary *)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinLevelID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeMinLevelID) params:params]; } - (NSDictionary *)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxLevelID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeMaxLevelID) params:params]; } - (NSDictionary *)readAttributeCurrentFrequencyWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentFrequencyID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeCurrentFrequencyID) params:params]; } - (NSDictionary *)readAttributeMinFrequencyWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinFrequencyID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeMinFrequencyID) params:params]; } - (NSDictionary *)readAttributeMaxFrequencyWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxFrequencyID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeMaxFrequencyID) params:params]; } - (NSDictionary *)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeOptionsID) params:params]; } @@ -1972,8 +1983,8 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeOptionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -1982,8 +1993,8 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeOnOffTransitionTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeOnOffTransitionTimeID) params:params]; } @@ -1999,8 +2010,8 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeOnOffTransitionTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2009,8 +2020,8 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary - (NSDictionary *)readAttributeOnLevelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeOnLevelID) params:params]; } @@ -2026,8 +2037,8 @@ - (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValue NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeOnLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2036,8 +2047,8 @@ - (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeOnTransitionTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeOnTransitionTimeID) params:params]; } @@ -2053,8 +2064,8 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSDictionary *) NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeOnTransitionTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2063,8 +2074,8 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSDictionary *) - (NSDictionary *)readAttributeOffTransitionTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeOffTransitionTimeID) params:params]; } @@ -2080,8 +2091,8 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSDictionary * NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeOffTransitionTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2090,8 +2101,8 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSDictionary * - (NSDictionary *)readAttributeDefaultMoveRateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeDefaultMoveRateID) params:params]; } @@ -2107,8 +2118,8 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSDictionary *)d NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeDefaultMoveRateID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2117,8 +2128,8 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeStartUpCurrentLevelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeStartUpCurrentLevelID) params:params]; } @@ -2134,8 +2145,8 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeStartUpCurrentLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2144,40 +2155,40 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeGeneratedCommandListID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAcceptedCommandListID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAttributeListID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeFeatureMapID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeClusterRevisionID) + clusterID:@(MTRClusterLevelControlID) + attributeID:@(MTRClusterLevelControlAttributeClusterRevisionID) params:params]; } @@ -2185,14 +2196,14 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary @implementation MTRClusterBinaryInputBasic -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -2201,8 +2212,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeActiveTextWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeActiveTextID) params:params]; } @@ -2218,8 +2229,8 @@ - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataVa NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeActiveTextID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2228,8 +2239,8 @@ - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeDescriptionID) params:params]; } @@ -2245,8 +2256,8 @@ - (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeDescriptionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2255,8 +2266,8 @@ - (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeInactiveTextWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeInactiveTextID) params:params]; } @@ -2272,8 +2283,8 @@ - (void)writeAttributeInactiveTextWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeInactiveTextID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2282,8 +2293,8 @@ - (void)writeAttributeInactiveTextWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeOutOfServiceWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeOutOfServiceID) params:params]; } @@ -2299,8 +2310,8 @@ - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeOutOfServiceID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2309,16 +2320,16 @@ - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)data - (NSDictionary *)readAttributePolarityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributePolarityID) params:params]; } - (NSDictionary *)readAttributePresentValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributePresentValueID) params:params]; } @@ -2334,8 +2345,8 @@ - (void)writeAttributePresentValueWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributePresentValueID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2344,8 +2355,8 @@ - (void)writeAttributePresentValueWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeReliabilityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeReliabilityID) params:params]; } @@ -2361,8 +2372,8 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeReliabilityID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2371,56 +2382,56 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeStatusFlagsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeStatusFlagsID) params:params]; } - (NSDictionary *)readAttributeApplicationTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeApplicationTypeID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID) + clusterID:@(MTRClusterBinaryInputBasicID) + attributeID:@(MTRClusterBinaryInputBasicAttributeClusterRevisionID) params:params]; } @@ -2428,88 +2439,88 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV @implementation MTRClusterDescriptor -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; } -- (NSDictionary *)readAttributeDeviceTypeListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeDeviceListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDescriptorID) - attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeDeviceTypeListID) + clusterID:@(MTRClusterDescriptorID) + attributeID:@(MTRClusterDescriptorAttributeDeviceTypeListID) params:params]; } - (NSDictionary *)readAttributeServerListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDescriptorID) - attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeServerListID) + clusterID:@(MTRClusterDescriptorID) + attributeID:@(MTRClusterDescriptorAttributeServerListID) params:params]; } - (NSDictionary *)readAttributeClientListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDescriptorID) - attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeClientListID) + clusterID:@(MTRClusterDescriptorID) + attributeID:@(MTRClusterDescriptorAttributeClientListID) params:params]; } - (NSDictionary *)readAttributePartsListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDescriptorID) - attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributePartsListID) + clusterID:@(MTRClusterDescriptorID) + attributeID:@(MTRClusterDescriptorAttributePartsListID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDescriptorID) - attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeGeneratedCommandListID) + clusterID:@(MTRClusterDescriptorID) + attributeID:@(MTRClusterDescriptorAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDescriptorID) - attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAcceptedCommandListID) + clusterID:@(MTRClusterDescriptorID) + attributeID:@(MTRClusterDescriptorAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDescriptorID) - attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAttributeListID) + clusterID:@(MTRClusterDescriptorID) + attributeID:@(MTRClusterDescriptorAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDescriptorID) - attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeFeatureMapID) + clusterID:@(MTRClusterDescriptorID) + attributeID:@(MTRClusterDescriptorAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDescriptorID) - attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeClusterRevisionID) + clusterID:@(MTRClusterDescriptorID) + attributeID:@(MTRClusterDescriptorAttributeClusterRevisionID) params:params]; } @@ -2517,14 +2528,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint @implementation MTRClusterBinding -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -2533,8 +2544,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBindingID) - attributeID:@(MTRAttributeIDTypeClusterBindingAttributeBindingID) + clusterID:@(MTRClusterBindingID) + attributeID:@(MTRClusterBindingAttributeBindingID) params:params]; } @@ -2550,8 +2561,8 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBindingID) - attributeID:@(MTRAttributeIDTypeClusterBindingAttributeBindingID) + clusterID:@(MTRClusterBindingID) + attributeID:@(MTRClusterBindingAttributeBindingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2560,40 +2571,40 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBindingID) - attributeID:@(MTRAttributeIDTypeClusterBindingAttributeGeneratedCommandListID) + clusterID:@(MTRClusterBindingID) + attributeID:@(MTRClusterBindingAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBindingID) - attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAcceptedCommandListID) + clusterID:@(MTRClusterBindingID) + attributeID:@(MTRClusterBindingAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBindingID) - attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAttributeListID) + clusterID:@(MTRClusterBindingID) + attributeID:@(MTRClusterBindingAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBindingID) - attributeID:@(MTRAttributeIDTypeClusterBindingAttributeFeatureMapID) + clusterID:@(MTRClusterBindingID) + attributeID:@(MTRClusterBindingAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBindingID) - attributeID:@(MTRAttributeIDTypeClusterBindingAttributeClusterRevisionID) + clusterID:@(MTRClusterBindingID) + attributeID:@(MTRClusterBindingAttributeClusterRevisionID) params:params]; } @@ -2601,41 +2612,41 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue @implementation MTRClusterAccessControl -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; } -- (NSDictionary *)readAttributeACLWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeAclWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeACLID) + clusterID:@(MTRClusterAccessControlID) + attributeID:@(MTRClusterAccessControlAttributeAclID) params:params]; } -- (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributeAclWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributeACLWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self writeAttributeAclWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributeAclWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeACLID) + clusterID:@(MTRClusterAccessControlID) + attributeID:@(MTRClusterAccessControlAttributeAclID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2644,8 +2655,8 @@ - (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDict - (NSDictionary *)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeExtensionID) + clusterID:@(MTRClusterAccessControlID) + attributeID:@(MTRClusterAccessControlAttributeExtensionID) params:params]; } @@ -2661,8 +2672,8 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeExtensionID) + clusterID:@(MTRClusterAccessControlID) + attributeID:@(MTRClusterAccessControlAttributeExtensionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -2670,67 +2681,65 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSubjectsPerAccessControlEntryWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeSubjectsPerAccessControlEntryID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterAccessControlID) + attributeID:@(MTRClusterAccessControlAttributeSubjectsPerAccessControlEntryID) + params:params]; } - (NSDictionary *)readAttributeTargetsPerAccessControlEntryWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeTargetsPerAccessControlEntryID) + clusterID:@(MTRClusterAccessControlID) + attributeID:@(MTRClusterAccessControlAttributeTargetsPerAccessControlEntryID) params:params]; } - (NSDictionary *)readAttributeAccessControlEntriesPerFabricWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAccessControlEntriesPerFabricID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterAccessControlID) + attributeID:@(MTRClusterAccessControlAttributeAccessControlEntriesPerFabricID) + params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeGeneratedCommandListID) + clusterID:@(MTRClusterAccessControlID) + attributeID:@(MTRClusterAccessControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAcceptedCommandListID) + clusterID:@(MTRClusterAccessControlID) + attributeID:@(MTRClusterAccessControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAttributeListID) + clusterID:@(MTRClusterAccessControlID) + attributeID:@(MTRClusterAccessControlAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeFeatureMapID) + clusterID:@(MTRClusterAccessControlID) + attributeID:@(MTRClusterAccessControlAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeClusterRevisionID) + clusterID:@(MTRClusterAccessControlID) + attributeID:@(MTRClusterAccessControlAttributeClusterRevisionID) params:params]; } @@ -2738,14 +2747,14 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal @implementation MTRClusterActions -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -2754,7 +2763,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -2762,7 +2771,7 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2791,7 +2800,7 @@ new MTRCommandSuccessCallbackBridge( - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -2799,7 +2808,7 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2829,7 +2838,7 @@ new MTRCommandSuccessCallbackBridge( - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -2837,7 +2846,7 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2866,7 +2875,7 @@ new MTRCommandSuccessCallbackBridge( - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -2874,7 +2883,7 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2904,7 +2913,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -2912,7 +2921,7 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2941,7 +2950,7 @@ new MTRCommandSuccessCallbackBridge( - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -2949,7 +2958,7 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2978,7 +2987,7 @@ new MTRCommandSuccessCallbackBridge( - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -2986,7 +2995,7 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3016,7 +3025,7 @@ new MTRCommandSuccessCallbackBridge( - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -3024,7 +3033,7 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3053,7 +3062,7 @@ new MTRCommandSuccessCallbackBridge( - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -3061,7 +3070,7 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3090,7 +3099,7 @@ new MTRCommandSuccessCallbackBridge( - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -3098,7 +3107,7 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3128,7 +3137,7 @@ new MTRCommandSuccessCallbackBridge( - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -3136,7 +3145,7 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3165,7 +3174,7 @@ new MTRCommandSuccessCallbackBridge( - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -3173,7 +3182,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3203,64 +3212,64 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeActionListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActionsID) - attributeID:@(MTRAttributeIDTypeClusterActionsAttributeActionListID) + clusterID:@(MTRClusterActionsID) + attributeID:@(MTRClusterActionsAttributeActionListID) params:params]; } - (NSDictionary *)readAttributeEndpointListsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActionsID) - attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEndpointListsID) + clusterID:@(MTRClusterActionsID) + attributeID:@(MTRClusterActionsAttributeEndpointListsID) params:params]; } - (NSDictionary *)readAttributeSetupURLWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActionsID) - attributeID:@(MTRAttributeIDTypeClusterActionsAttributeSetupURLID) + clusterID:@(MTRClusterActionsID) + attributeID:@(MTRClusterActionsAttributeSetupURLID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActionsID) - attributeID:@(MTRAttributeIDTypeClusterActionsAttributeGeneratedCommandListID) + clusterID:@(MTRClusterActionsID) + attributeID:@(MTRClusterActionsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActionsID) - attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAcceptedCommandListID) + clusterID:@(MTRClusterActionsID) + attributeID:@(MTRClusterActionsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActionsID) - attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAttributeListID) + clusterID:@(MTRClusterActionsID) + attributeID:@(MTRClusterActionsAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActionsID) - attributeID:@(MTRAttributeIDTypeClusterActionsAttributeFeatureMapID) + clusterID:@(MTRClusterActionsID) + attributeID:@(MTRClusterActionsAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActionsID) - attributeID:@(MTRAttributeIDTypeClusterActionsAttributeClusterRevisionID) + clusterID:@(MTRClusterActionsID) + attributeID:@(MTRClusterActionsAttributeClusterRevisionID) params:params]; } @@ -3268,14 +3277,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterBasic -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -3283,17 +3292,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)mfgSpecificPingWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self mfgSpecificPingWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -3301,7 +3310,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3325,48 +3334,48 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeDataModelRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeDataModelRevisionID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeDataModelRevisionID) params:params]; } - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeVendorNameID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeVendorNameID) params:params]; } - (NSDictionary *)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeVendorIDID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeVendorIDID) params:params]; } - (NSDictionary *)readAttributeProductNameWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeProductNameID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeProductNameID) params:params]; } - (NSDictionary *)readAttributeProductIDWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeProductIDID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeProductIDID) params:params]; } - (NSDictionary *)readAttributeNodeLabelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeNodeLabelID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeNodeLabelID) params:params]; } @@ -3382,8 +3391,8 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeNodeLabelID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeNodeLabelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -3392,8 +3401,8 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeLocationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeLocationID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeLocationID) params:params]; } @@ -3409,8 +3418,8 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeLocationID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeLocationID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -3419,80 +3428,80 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeHardwareVersionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeHardwareVersionID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeHardwareVersionID) params:params]; } - (NSDictionary *)readAttributeHardwareVersionStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeHardwareVersionStringID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeHardwareVersionStringID) params:params]; } - (NSDictionary *)readAttributeSoftwareVersionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeSoftwareVersionID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeSoftwareVersionID) params:params]; } - (NSDictionary *)readAttributeSoftwareVersionStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeSoftwareVersionStringID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeSoftwareVersionStringID) params:params]; } - (NSDictionary *)readAttributeManufacturingDateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeManufacturingDateID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeManufacturingDateID) params:params]; } - (NSDictionary *)readAttributePartNumberWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributePartNumberID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributePartNumberID) params:params]; } - (NSDictionary *)readAttributeProductURLWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeProductURLID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeProductURLID) params:params]; } - (NSDictionary *)readAttributeProductLabelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeProductLabelID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeProductLabelID) params:params]; } - (NSDictionary *)readAttributeSerialNumberWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeSerialNumberID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeSerialNumberID) params:params]; } - (NSDictionary *)readAttributeLocalConfigDisabledWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeLocalConfigDisabledID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeLocalConfigDisabledID) params:params]; } @@ -3508,8 +3517,8 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeLocalConfigDisabledID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeLocalConfigDisabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -3518,94 +3527,94 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeReachableWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeReachableID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeReachableID) params:params]; } - (NSDictionary *)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeUniqueIDID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeUniqueIDID) params:params]; } - (NSDictionary *)readAttributeCapabilityMinimaWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeCapabilityMinimaID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeCapabilityMinimaID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeGeneratedCommandListID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeAcceptedCommandListID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeAttributeListID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeFeatureMapID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicID) - attributeID:@(MTRAttributeIDTypeClusterBasicAttributeClusterRevisionID) + clusterID:@(MTRClusterBasicID) + attributeID:@(MTRClusterBasicAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterOTASoftwareUpdateProvider +@implementation MTRClusterOtaSoftwareUpdateProvider -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; } -- (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParams *)params +- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -3658,7 +3667,7 @@ new MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(self.cal definedValue_0 = [self asByteSpan:params.metadataForProvider]; } - auto successFn = Callback::FromCancelable(success); + 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); @@ -3667,16 +3676,16 @@ new MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(self.cal [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; } -- (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams *)params +- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -3689,7 +3698,7 @@ new MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(self.ca request.updateToken = [self asByteSpan:params.updateToken]; request.newVersion = params.newVersion.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); + 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); @@ -3698,10 +3707,10 @@ new MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(self.ca [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; } -- (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params +- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -3709,7 +3718,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3734,67 +3743,65 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOtaSoftwareUpdateProviderID) + attributeID:@(MTRClusterOtaSoftwareUpdateProviderAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAcceptedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOtaSoftwareUpdateProviderID) + attributeID:@(MTRClusterOtaSoftwareUpdateProviderAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAttributeListID) + clusterID:@(MTRClusterOtaSoftwareUpdateProviderID) + attributeID:@(MTRClusterOtaSoftwareUpdateProviderAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeFeatureMapID) + clusterID:@(MTRClusterOtaSoftwareUpdateProviderID) + attributeID:@(MTRClusterOtaSoftwareUpdateProviderAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeClusterRevisionID) + clusterID:@(MTRClusterOtaSoftwareUpdateProviderID) + attributeID:@(MTRClusterOtaSoftwareUpdateProviderAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterOTASoftwareUpdateRequestor +@implementation MTRClusterOtaSoftwareUpdateRequestor -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; } -- (void)announceOtaProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params +- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -3802,7 +3809,7 @@ - (void)announceOtaProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -3834,11 +3841,10 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOtaProvidersID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOtaSoftwareUpdateRequestorID) + attributeID:@(MTRClusterOtaSoftwareUpdateRequestorAttributeDefaultOtaProvidersID) + params:params]; } - (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary *)dataValueDictionary @@ -3853,8 +3859,8 @@ - (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOtaProvidersID) + clusterID:@(MTRClusterOtaSoftwareUpdateRequestorID) + attributeID:@(MTRClusterOtaSoftwareUpdateRequestorAttributeDefaultOtaProvidersID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -3863,67 +3869,64 @@ - (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeUpdatePossibleWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdatePossibleID) + clusterID:@(MTRClusterOtaSoftwareUpdateRequestorID) + attributeID:@(MTRClusterOtaSoftwareUpdateRequestorAttributeUpdatePossibleID) params:params]; } - (NSDictionary *)readAttributeUpdateStateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateID) + clusterID:@(MTRClusterOtaSoftwareUpdateRequestorID) + attributeID:@(MTRClusterOtaSoftwareUpdateRequestorAttributeUpdateStateID) params:params]; } - (NSDictionary *)readAttributeUpdateStateProgressWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateProgressID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOtaSoftwareUpdateRequestorID) + attributeID:@(MTRClusterOtaSoftwareUpdateRequestorAttributeUpdateStateProgressID) + params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOtaSoftwareUpdateRequestorID) + attributeID:@(MTRClusterOtaSoftwareUpdateRequestorAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAcceptedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOtaSoftwareUpdateRequestorID) + attributeID:@(MTRClusterOtaSoftwareUpdateRequestorAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAttributeListID) + clusterID:@(MTRClusterOtaSoftwareUpdateRequestorID) + attributeID:@(MTRClusterOtaSoftwareUpdateRequestorAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeFeatureMapID) + clusterID:@(MTRClusterOtaSoftwareUpdateRequestorID) + attributeID:@(MTRClusterOtaSoftwareUpdateRequestorAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeClusterRevisionID) + clusterID:@(MTRClusterOtaSoftwareUpdateRequestorID) + attributeID:@(MTRClusterOtaSoftwareUpdateRequestorAttributeClusterRevisionID) params:params]; } @@ -3931,14 +3934,14 @@ - (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary @implementation MTRClusterLocalizationConfiguration -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -3947,8 +3950,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeActiveLocaleWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID) + clusterID:@(MTRClusterLocalizationConfigurationID) + attributeID:@(MTRClusterLocalizationConfigurationAttributeActiveLocaleID) params:params]; } @@ -3964,8 +3967,8 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID) + clusterID:@(MTRClusterLocalizationConfigurationID) + attributeID:@(MTRClusterLocalizationConfigurationAttributeActiveLocaleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -3974,50 +3977,48 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeSupportedLocalesWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeSupportedLocalesID) + clusterID:@(MTRClusterLocalizationConfigurationID) + attributeID:@(MTRClusterLocalizationConfigurationAttributeSupportedLocalesID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterLocalizationConfigurationID) + attributeID:@(MTRClusterLocalizationConfigurationAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAcceptedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterLocalizationConfigurationID) + attributeID:@(MTRClusterLocalizationConfigurationAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAttributeListID) + clusterID:@(MTRClusterLocalizationConfigurationID) + attributeID:@(MTRClusterLocalizationConfigurationAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeFeatureMapID) + clusterID:@(MTRClusterLocalizationConfigurationID) + attributeID:@(MTRClusterLocalizationConfigurationAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeClusterRevisionID) + clusterID:@(MTRClusterLocalizationConfigurationID) + attributeID:@(MTRClusterLocalizationConfigurationAttributeClusterRevisionID) params:params]; } @@ -4025,14 +4026,14 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data @implementation MTRClusterTimeFormatLocalization -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -4041,8 +4042,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeHourFormatWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID) + clusterID:@(MTRClusterTimeFormatLocalizationID) + attributeID:@(MTRClusterTimeFormatLocalizationAttributeHourFormatID) params:params]; } @@ -4058,8 +4059,8 @@ - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataVa NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID) + clusterID:@(MTRClusterTimeFormatLocalizationID) + attributeID:@(MTRClusterTimeFormatLocalizationAttributeHourFormatID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -4068,8 +4069,8 @@ - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeActiveCalendarTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) + clusterID:@(MTRClusterTimeFormatLocalizationID) + attributeID:@(MTRClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) params:params]; } @@ -4085,8 +4086,8 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) + clusterID:@(MTRClusterTimeFormatLocalizationID) + attributeID:@(MTRClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -4094,51 +4095,49 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeSupportedCalendarTypesWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeSupportedCalendarTypesID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterTimeFormatLocalizationID) + attributeID:@(MTRClusterTimeFormatLocalizationAttributeSupportedCalendarTypesID) + params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterTimeFormatLocalizationID) + attributeID:@(MTRClusterTimeFormatLocalizationAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAcceptedCommandListID) + clusterID:@(MTRClusterTimeFormatLocalizationID) + attributeID:@(MTRClusterTimeFormatLocalizationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAttributeListID) + clusterID:@(MTRClusterTimeFormatLocalizationID) + attributeID:@(MTRClusterTimeFormatLocalizationAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeFeatureMapID) + clusterID:@(MTRClusterTimeFormatLocalizationID) + attributeID:@(MTRClusterTimeFormatLocalizationAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeClusterRevisionID) + clusterID:@(MTRClusterTimeFormatLocalizationID) + attributeID:@(MTRClusterTimeFormatLocalizationAttributeClusterRevisionID) params:params]; } @@ -4146,14 +4145,14 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary @implementation MTRClusterUnitLocalization -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -4162,8 +4161,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeTemperatureUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUnitLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID) + clusterID:@(MTRClusterUnitLocalizationID) + attributeID:@(MTRClusterUnitLocalizationAttributeTemperatureUnitID) params:params]; } @@ -4179,8 +4178,8 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUnitLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID) + clusterID:@(MTRClusterUnitLocalizationID) + attributeID:@(MTRClusterUnitLocalizationAttributeTemperatureUnitID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -4189,40 +4188,40 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUnitLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeGeneratedCommandListID) + clusterID:@(MTRClusterUnitLocalizationID) + attributeID:@(MTRClusterUnitLocalizationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUnitLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAcceptedCommandListID) + clusterID:@(MTRClusterUnitLocalizationID) + attributeID:@(MTRClusterUnitLocalizationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUnitLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAttributeListID) + clusterID:@(MTRClusterUnitLocalizationID) + attributeID:@(MTRClusterUnitLocalizationAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUnitLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeFeatureMapID) + clusterID:@(MTRClusterUnitLocalizationID) + attributeID:@(MTRClusterUnitLocalizationAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUnitLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeClusterRevisionID) + clusterID:@(MTRClusterUnitLocalizationID) + attributeID:@(MTRClusterUnitLocalizationAttributeClusterRevisionID) params:params]; } @@ -4230,14 +4229,14 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d @implementation MTRClusterPowerSourceConfiguration -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -4246,50 +4245,48 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeSourcesWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeSourcesID) + clusterID:@(MTRClusterPowerSourceConfigurationID) + attributeID:@(MTRClusterPowerSourceConfigurationAttributeSourcesID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPowerSourceConfigurationID) + attributeID:@(MTRClusterPowerSourceConfigurationAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAcceptedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPowerSourceConfigurationID) + attributeID:@(MTRClusterPowerSourceConfigurationAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAttributeListID) + clusterID:@(MTRClusterPowerSourceConfigurationID) + attributeID:@(MTRClusterPowerSourceConfigurationAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeFeatureMapID) + clusterID:@(MTRClusterPowerSourceConfigurationID) + attributeID:@(MTRClusterPowerSourceConfigurationAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeClusterRevisionID) + clusterID:@(MTRClusterPowerSourceConfigurationID) + attributeID:@(MTRClusterPowerSourceConfigurationAttributeClusterRevisionID) params:params]; } @@ -4297,14 +4294,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint @implementation MTRClusterPowerSource -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -4313,288 +4310,288 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeStatusID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeStatusID) params:params]; } - (NSDictionary *)readAttributeOrderWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeOrderID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeOrderID) params:params]; } - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeDescriptionID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeDescriptionID) params:params]; } - (NSDictionary *)readAttributeWiredAssessedInputVoltageWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputVoltageID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeWiredAssessedInputVoltageID) params:params]; } - (NSDictionary *)readAttributeWiredAssessedInputFrequencyWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputFrequencyID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeWiredAssessedInputFrequencyID) params:params]; } - (NSDictionary *)readAttributeWiredCurrentTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredCurrentTypeID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeWiredCurrentTypeID) params:params]; } - (NSDictionary *)readAttributeWiredAssessedCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedCurrentID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeWiredAssessedCurrentID) params:params]; } - (NSDictionary *)readAttributeWiredNominalVoltageWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredNominalVoltageID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeWiredNominalVoltageID) params:params]; } - (NSDictionary *)readAttributeWiredMaximumCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredMaximumCurrentID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeWiredMaximumCurrentID) params:params]; } - (NSDictionary *)readAttributeWiredPresentWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredPresentID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeWiredPresentID) params:params]; } - (NSDictionary *)readAttributeActiveWiredFaultsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveWiredFaultsID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeActiveWiredFaultsID) params:params]; } - (NSDictionary *)readAttributeBatVoltageWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatVoltageID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatVoltageID) params:params]; } - (NSDictionary *)readAttributeBatPercentRemainingWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatPercentRemainingID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatPercentRemainingID) params:params]; } - (NSDictionary *)readAttributeBatTimeRemainingWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeRemainingID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatTimeRemainingID) params:params]; } - (NSDictionary *)readAttributeBatChargeLevelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeLevelID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatChargeLevelID) params:params]; } - (NSDictionary *)readAttributeBatReplacementNeededWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementNeededID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatReplacementNeededID) params:params]; } - (NSDictionary *)readAttributeBatReplaceabilityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplaceabilityID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatReplaceabilityID) params:params]; } - (NSDictionary *)readAttributeBatPresentWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatPresentID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatPresentID) params:params]; } - (NSDictionary *)readAttributeActiveBatFaultsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatFaultsID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeActiveBatFaultsID) params:params]; } - (NSDictionary *)readAttributeBatReplacementDescriptionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementDescriptionID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatReplacementDescriptionID) params:params]; } - (NSDictionary *)readAttributeBatCommonDesignationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatCommonDesignationID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatCommonDesignationID) params:params]; } - (NSDictionary *)readAttributeBatANSIDesignationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatANSIDesignationID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatANSIDesignationID) params:params]; } - (NSDictionary *)readAttributeBatIECDesignationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatIECDesignationID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatIECDesignationID) params:params]; } - (NSDictionary *)readAttributeBatApprovedChemistryWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatApprovedChemistryID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatApprovedChemistryID) params:params]; } - (NSDictionary *)readAttributeBatCapacityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatCapacityID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatCapacityID) params:params]; } - (NSDictionary *)readAttributeBatQuantityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatQuantityID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatQuantityID) params:params]; } - (NSDictionary *)readAttributeBatChargeStateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeStateID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatChargeStateID) params:params]; } - (NSDictionary *)readAttributeBatTimeToFullChargeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeToFullChargeID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatTimeToFullChargeID) params:params]; } - (NSDictionary *)readAttributeBatFunctionalWhileChargingWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatFunctionalWhileChargingID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatFunctionalWhileChargingID) params:params]; } - (NSDictionary *)readAttributeBatChargingCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargingCurrentID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeBatChargingCurrentID) params:params]; } - (NSDictionary *)readAttributeActiveBatChargeFaultsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatChargeFaultsID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeActiveBatChargeFaultsID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeGeneratedCommandListID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAcceptedCommandListID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAttributeListID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeFeatureMapID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeClusterRevisionID) + clusterID:@(MTRClusterPowerSourceID) + attributeID:@(MTRClusterPowerSourceAttributeClusterRevisionID) params:params]; } @@ -4602,14 +4599,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint @implementation MTRClusterGeneralCommissioning -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -4618,13 +4615,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -4649,13 +4646,13 @@ new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(self.callbac - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -4681,27 +4678,26 @@ new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(self - (void)commissioningCompleteWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)( - MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { [self commissioningCompleteWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -4725,8 +4721,8 @@ new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(se - (NSDictionary *)readAttributeBreadcrumbWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID) + clusterID:@(MTRClusterGeneralCommissioningID) + attributeID:@(MTRClusterGeneralCommissioningAttributeBreadcrumbID) params:params]; } @@ -4742,8 +4738,8 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID) + clusterID:@(MTRClusterGeneralCommissioningID) + attributeID:@(MTRClusterGeneralCommissioningAttributeBreadcrumbID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -4751,75 +4747,73 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeBasicCommissioningInfoWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBasicCommissioningInfoID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterGeneralCommissioningID) + attributeID:@(MTRClusterGeneralCommissioningAttributeBasicCommissioningInfoID) + params:params]; } - (NSDictionary *)readAttributeRegulatoryConfigWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeRegulatoryConfigID) + clusterID:@(MTRClusterGeneralCommissioningID) + attributeID:@(MTRClusterGeneralCommissioningAttributeRegulatoryConfigID) params:params]; } - (NSDictionary *)readAttributeLocationCapabilityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeLocationCapabilityID) + clusterID:@(MTRClusterGeneralCommissioningID) + attributeID:@(MTRClusterGeneralCommissioningAttributeLocationCapabilityID) params:params]; } - (NSDictionary *)readAttributeSupportsConcurrentConnectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeSupportsConcurrentConnectionID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterGeneralCommissioningID) + attributeID:@(MTRClusterGeneralCommissioningAttributeSupportsConcurrentConnectionID) + params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeGeneratedCommandListID) + clusterID:@(MTRClusterGeneralCommissioningID) + attributeID:@(MTRClusterGeneralCommissioningAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAcceptedCommandListID) + clusterID:@(MTRClusterGeneralCommissioningID) + attributeID:@(MTRClusterGeneralCommissioningAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAttributeListID) + clusterID:@(MTRClusterGeneralCommissioningID) + attributeID:@(MTRClusterGeneralCommissioningAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeFeatureMapID) + clusterID:@(MTRClusterGeneralCommissioningID) + attributeID:@(MTRClusterGeneralCommissioningAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeClusterRevisionID) + clusterID:@(MTRClusterGeneralCommissioningID) + attributeID:@(MTRClusterGeneralCommissioningAttributeClusterRevisionID) params:params]; } @@ -4827,14 +4821,14 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa @implementation MTRClusterNetworkCommissioning -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -4843,13 +4837,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -4887,13 +4881,13 @@ new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(self.callba - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -4922,13 +4916,13 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callb - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -4956,13 +4950,13 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callb - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -4990,13 +4984,13 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callb - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -5024,13 +5018,13 @@ new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(self.call - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -5059,40 +5053,40 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callb - (NSDictionary *)readAttributeMaxNetworksWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeMaxNetworksID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeMaxNetworksID) params:params]; } - (NSDictionary *)readAttributeNetworksWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeNetworksID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeNetworksID) params:params]; } - (NSDictionary *)readAttributeScanMaxTimeSecondsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeScanMaxTimeSecondsID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeScanMaxTimeSecondsID) params:params]; } - (NSDictionary *)readAttributeConnectMaxTimeSecondsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeConnectMaxTimeSecondsID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeConnectMaxTimeSecondsID) params:params]; } - (NSDictionary *)readAttributeInterfaceEnabledWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeInterfaceEnabledID) params:params]; } @@ -5108,8 +5102,8 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeInterfaceEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -5118,64 +5112,64 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLastNetworkingStatusWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkingStatusID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeLastNetworkingStatusID) params:params]; } - (NSDictionary *)readAttributeLastNetworkIDWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkIDID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeLastNetworkIDID) params:params]; } - (NSDictionary *)readAttributeLastConnectErrorValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastConnectErrorValueID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeLastConnectErrorValueID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeGeneratedCommandListID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAcceptedCommandListID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAttributeListID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeFeatureMapID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeClusterRevisionID) + clusterID:@(MTRClusterNetworkCommissioningID) + attributeID:@(MTRClusterNetworkCommissioningAttributeClusterRevisionID) params:params]; } @@ -5183,14 +5177,14 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) @implementation MTRClusterDiagnosticLogs -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -5199,13 +5193,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -5232,40 +5226,40 @@ new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(self.callbackQueu - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDiagnosticLogsID) - attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeGeneratedCommandListID) + clusterID:@(MTRClusterDiagnosticLogsID) + attributeID:@(MTRClusterDiagnosticLogsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDiagnosticLogsID) - attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAcceptedCommandListID) + clusterID:@(MTRClusterDiagnosticLogsID) + attributeID:@(MTRClusterDiagnosticLogsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDiagnosticLogsID) - attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAttributeListID) + clusterID:@(MTRClusterDiagnosticLogsID) + attributeID:@(MTRClusterDiagnosticLogsAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDiagnosticLogsID) - attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeFeatureMapID) + clusterID:@(MTRClusterDiagnosticLogsID) + attributeID:@(MTRClusterDiagnosticLogsAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDiagnosticLogsID) - attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeClusterRevisionID) + clusterID:@(MTRClusterDiagnosticLogsID) + attributeID:@(MTRClusterDiagnosticLogsAttributeClusterRevisionID) params:params]; } @@ -5273,14 +5267,14 @@ new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(self.callbackQueu @implementation MTRClusterGeneralDiagnostics -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -5289,7 +5283,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -5297,7 +5291,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -5323,113 +5317,112 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeNetworkInterfacesWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeNetworkInterfacesID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeNetworkInterfacesID) params:params]; } - (NSDictionary *)readAttributeRebootCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeRebootCountID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeRebootCountID) params:params]; } - (NSDictionary *)readAttributeUpTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeUpTimeID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeUpTimeID) params:params]; } - (NSDictionary *)readAttributeTotalOperationalHoursWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTotalOperationalHoursID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeTotalOperationalHoursID) params:params]; } - (NSDictionary *)readAttributeBootReasonsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeBootReasonsID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeBootReasonsID) params:params]; } - (NSDictionary *)readAttributeActiveHardwareFaultsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveHardwareFaultsID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeActiveHardwareFaultsID) params:params]; } - (NSDictionary *)readAttributeActiveRadioFaultsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveRadioFaultsID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeActiveRadioFaultsID) params:params]; } - (NSDictionary *)readAttributeActiveNetworkFaultsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveNetworkFaultsID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeActiveNetworkFaultsID) params:params]; } - (NSDictionary *)readAttributeTestEventTriggersEnabledWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID) + params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeGeneratedCommandListID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAcceptedCommandListID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAttributeListID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeFeatureMapID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeClusterRevisionID) + clusterID:@(MTRClusterGeneralDiagnosticsID) + attributeID:@(MTRClusterGeneralDiagnosticsAttributeClusterRevisionID) params:params]; } @@ -5437,14 +5430,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterSoftwareDiagnostics -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -5452,17 +5445,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)resetWatermarksWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self resetWatermarksWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -5470,7 +5463,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -5494,73 +5487,72 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeThreadMetricsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeThreadMetricsID) + clusterID:@(MTRClusterSoftwareDiagnosticsID) + attributeID:@(MTRClusterSoftwareDiagnosticsAttributeThreadMetricsID) params:params]; } - (NSDictionary *)readAttributeCurrentHeapFreeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapFreeID) + clusterID:@(MTRClusterSoftwareDiagnosticsID) + attributeID:@(MTRClusterSoftwareDiagnosticsAttributeCurrentHeapFreeID) params:params]; } - (NSDictionary *)readAttributeCurrentHeapUsedWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapUsedID) + clusterID:@(MTRClusterSoftwareDiagnosticsID) + attributeID:@(MTRClusterSoftwareDiagnosticsAttributeCurrentHeapUsedID) params:params]; } - (NSDictionary *)readAttributeCurrentHeapHighWatermarkWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapHighWatermarkID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterSoftwareDiagnosticsID) + attributeID:@(MTRClusterSoftwareDiagnosticsAttributeCurrentHeapHighWatermarkID) + params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeGeneratedCommandListID) + clusterID:@(MTRClusterSoftwareDiagnosticsID) + attributeID:@(MTRClusterSoftwareDiagnosticsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAcceptedCommandListID) + clusterID:@(MTRClusterSoftwareDiagnosticsID) + attributeID:@(MTRClusterSoftwareDiagnosticsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAttributeListID) + clusterID:@(MTRClusterSoftwareDiagnosticsID) + attributeID:@(MTRClusterSoftwareDiagnosticsAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeFeatureMapID) + clusterID:@(MTRClusterSoftwareDiagnosticsID) + attributeID:@(MTRClusterSoftwareDiagnosticsAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeClusterRevisionID) + clusterID:@(MTRClusterSoftwareDiagnosticsID) + attributeID:@(MTRClusterSoftwareDiagnosticsAttributeClusterRevisionID) params:params]; } @@ -5568,14 +5560,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterThreadNetworkDiagnostics -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -5583,17 +5575,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self resetCountsWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -5601,7 +5593,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -5625,562 +5617,545 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeChannelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeChannelID) params:params]; } - (NSDictionary *)readAttributeRoutingRoleWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRoutingRoleID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRoutingRoleID) params:params]; } - (NSDictionary *)readAttributeNetworkNameWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNetworkNameID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeNetworkNameID) params:params]; } - (NSDictionary *)readAttributePanIdWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePanIdID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributePanIdID) params:params]; } - (NSDictionary *)readAttributeExtendedPanIdWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeExtendedPanIdID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeExtendedPanIdID) params:params]; } - (NSDictionary *)readAttributeMeshLocalPrefixWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeMeshLocalPrefixID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeMeshLocalPrefixID) params:params]; } - (NSDictionary *)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOverrunCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeOverrunCountID) params:params]; } - (NSDictionary *)readAttributeNeighborTableListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNeighborTableListID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeNeighborTableListID) params:params]; } - (NSDictionary *)readAttributeRouteTableListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouteTableListID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRouteTableListID) params:params]; } - (NSDictionary *)readAttributePartitionIdWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributePartitionIdID) params:params]; } - (NSDictionary *)readAttributeWeightingWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeWeightingID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeWeightingID) params:params]; } - (NSDictionary *)readAttributeDataVersionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDataVersionID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeDataVersionID) params:params]; } - (NSDictionary *)readAttributeStableDataVersionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeStableDataVersionID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeStableDataVersionID) params:params]; } - (NSDictionary *)readAttributeLeaderRouterIdWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRouterIdID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeLeaderRouterIdID) params:params]; } - (NSDictionary *)readAttributeDetachedRoleCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDetachedRoleCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeDetachedRoleCountID) params:params]; } - (NSDictionary *)readAttributeChildRoleCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChildRoleCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeChildRoleCountID) params:params]; } - (NSDictionary *)readAttributeRouterRoleCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouterRoleCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRouterRoleCountID) params:params]; } - (NSDictionary *)readAttributeLeaderRoleCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRoleCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeLeaderRoleCountID) params:params]; } - (NSDictionary *)readAttributeAttachAttemptCountWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttachAttemptCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeAttachAttemptCountID) + params:params]; } - (NSDictionary *)readAttributePartitionIdChangeCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdChangeCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributePartitionIdChangeCountID) + params:params]; } - (NSDictionary *)readAttributeBetterPartitionAttachAttemptCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeBetterPartitionAttachAttemptCountID) - params:params]; + return + [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeBetterPartitionAttachAttemptCountID) + params:params]; } - (NSDictionary *)readAttributeParentChangeCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeParentChangeCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeParentChangeCountID) params:params]; } - (NSDictionary *)readAttributeTxTotalCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxTotalCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxTotalCountID) params:params]; } - (NSDictionary *)readAttributeTxUnicastCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxUnicastCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxUnicastCountID) params:params]; } - (NSDictionary *)readAttributeTxBroadcastCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBroadcastCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxBroadcastCountID) params:params]; } - (NSDictionary *)readAttributeTxAckRequestedCountWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckRequestedCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxAckRequestedCountID) + params:params]; } - (NSDictionary *)readAttributeTxAckedCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckedCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxAckedCountID) params:params]; } - (NSDictionary *)readAttributeTxNoAckRequestedCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxNoAckRequestedCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxNoAckRequestedCountID) + params:params]; } - (NSDictionary *)readAttributeTxDataCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxDataCountID) params:params]; } - (NSDictionary *)readAttributeTxDataPollCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataPollCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxDataPollCountID) params:params]; } - (NSDictionary *)readAttributeTxBeaconCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxBeaconCountID) params:params]; } - (NSDictionary *)readAttributeTxBeaconRequestCountWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconRequestCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxBeaconRequestCountID) + params:params]; } - (NSDictionary *)readAttributeTxOtherCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxOtherCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxOtherCountID) params:params]; } - (NSDictionary *)readAttributeTxRetryCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxRetryCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxRetryCountID) params:params]; } - (NSDictionary *)readAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDirectMaxRetryExpiryCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxDirectMaxRetryExpiryCountID) + params:params]; } - (NSDictionary *)readAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxIndirectMaxRetryExpiryCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxIndirectMaxRetryExpiryCountID) + params:params]; } - (NSDictionary *)readAttributeTxErrCcaCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrCcaCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxErrCcaCountID) params:params]; } - (NSDictionary *)readAttributeTxErrAbortCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrAbortCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxErrAbortCountID) params:params]; } - (NSDictionary *)readAttributeTxErrBusyChannelCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrBusyChannelCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeTxErrBusyChannelCountID) + params:params]; } - (NSDictionary *)readAttributeRxTotalCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxTotalCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxTotalCountID) params:params]; } - (NSDictionary *)readAttributeRxUnicastCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxUnicastCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxUnicastCountID) params:params]; } - (NSDictionary *)readAttributeRxBroadcastCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBroadcastCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxBroadcastCountID) params:params]; } - (NSDictionary *)readAttributeRxDataCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxDataCountID) params:params]; } - (NSDictionary *)readAttributeRxDataPollCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataPollCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxDataPollCountID) params:params]; } - (NSDictionary *)readAttributeRxBeaconCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxBeaconCountID) params:params]; } - (NSDictionary *)readAttributeRxBeaconRequestCountWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconRequestCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxBeaconRequestCountID) + params:params]; } - (NSDictionary *)readAttributeRxOtherCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxOtherCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxOtherCountID) params:params]; } - (NSDictionary *)readAttributeRxAddressFilteredCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxAddressFilteredCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxAddressFilteredCountID) + params:params]; } - (NSDictionary *)readAttributeRxDestAddrFilteredCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDestAddrFilteredCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxDestAddrFilteredCountID) + params:params]; } - (NSDictionary *)readAttributeRxDuplicatedCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDuplicatedCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxDuplicatedCountID) params:params]; } - (NSDictionary *)readAttributeRxErrNoFrameCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrNoFrameCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxErrNoFrameCountID) params:params]; } - (NSDictionary *)readAttributeRxErrUnknownNeighborCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrUnknownNeighborCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxErrUnknownNeighborCountID) + params:params]; } - (NSDictionary *)readAttributeRxErrInvalidSrcAddrCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrInvalidSrcAddrCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxErrInvalidSrcAddrCountID) + params:params]; } - (NSDictionary *)readAttributeRxErrSecCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrSecCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxErrSecCountID) params:params]; } - (NSDictionary *)readAttributeRxErrFcsCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrFcsCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxErrFcsCountID) params:params]; } - (NSDictionary *)readAttributeRxErrOtherCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrOtherCountID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeRxErrOtherCountID) params:params]; } - (NSDictionary *)readAttributeActiveTimestampWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveTimestampID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeActiveTimestampID) params:params]; } - (NSDictionary *)readAttributePendingTimestampWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePendingTimestampID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributePendingTimestampID) params:params]; } - (NSDictionary *)readAttributeDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDelayID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeDelayID) params:params]; } - (NSDictionary *)readAttributeSecurityPolicyWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeSecurityPolicyID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeSecurityPolicyID) params:params]; } - (NSDictionary *)readAttributeChannelPage0MaskWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelPage0MaskID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeChannelPage0MaskID) params:params]; } - (NSDictionary *)readAttributeOperationalDatasetComponentsWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOperationalDatasetComponentsID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeOperationalDatasetComponentsID) + params:params]; } - (NSDictionary *)readAttributeActiveNetworkFaultsListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveNetworkFaultsListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeActiveNetworkFaultsListID) + params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttributeListID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeFeatureMapID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeClusterRevisionID) + clusterID:@(MTRClusterThreadNetworkDiagnosticsID) + attributeID:@(MTRClusterThreadNetworkDiagnosticsAttributeClusterRevisionID) params:params]; } @@ -6188,14 +6163,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterWiFiNetworkDiagnostics -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -6203,17 +6178,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self resetCountsWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -6221,7 +6196,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -6245,149 +6220,144 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeBssidWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBssidID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeBssidID) params:params]; } - (NSDictionary *)readAttributeSecurityTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeSecurityTypeID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeSecurityTypeID) params:params]; } - (NSDictionary *)readAttributeWiFiVersionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeWiFiVersionID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeWiFiVersionID) params:params]; } - (NSDictionary *)readAttributeChannelNumberWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeChannelNumberID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeChannelNumberID) params:params]; } - (NSDictionary *)readAttributeRssiWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeRssiID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeRssiID) params:params]; } - (NSDictionary *)readAttributeBeaconLostCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconLostCountID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeBeaconLostCountID) params:params]; } - (NSDictionary *)readAttributeBeaconRxCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconRxCountID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeBeaconRxCountID) params:params]; } - (NSDictionary *)readAttributePacketMulticastRxCountWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastRxCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributePacketMulticastRxCountID) + params:params]; } - (NSDictionary *)readAttributePacketMulticastTxCountWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastTxCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributePacketMulticastTxCountID) + params:params]; } - (NSDictionary *)readAttributePacketUnicastRxCountWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastRxCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributePacketUnicastRxCountID) + params:params]; } - (NSDictionary *)readAttributePacketUnicastTxCountWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastTxCountID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributePacketUnicastTxCountID) + params:params]; } - (NSDictionary *)readAttributeCurrentMaxRateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeCurrentMaxRateID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeCurrentMaxRateID) params:params]; } - (NSDictionary *)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeOverrunCountID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeOverrunCountID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAttributeListID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeFeatureMapID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeClusterRevisionID) + clusterID:@(MTRClusterWiFiNetworkDiagnosticsID) + attributeID:@(MTRClusterWiFiNetworkDiagnosticsAttributeClusterRevisionID) params:params]; } @@ -6395,14 +6365,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterEthernetNetworkDiagnostics -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -6410,17 +6380,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self resetCountsWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -6428,7 +6398,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -6452,114 +6422,112 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributePHYRateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePHYRateID) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributePHYRateID) params:params]; } - (NSDictionary *)readAttributeFullDuplexWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFullDuplexID) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributeFullDuplexID) params:params]; } - (NSDictionary *)readAttributePacketRxCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketRxCountID) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributePacketRxCountID) params:params]; } - (NSDictionary *)readAttributePacketTxCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketTxCountID) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributePacketTxCountID) params:params]; } - (NSDictionary *)readAttributeTxErrCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTxErrCountID) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributeTxErrCountID) params:params]; } - (NSDictionary *)readAttributeCollisionCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCollisionCountID) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributeCollisionCountID) params:params]; } - (NSDictionary *)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeOverrunCountID) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributeOverrunCountID) params:params]; } - (NSDictionary *)readAttributeCarrierDetectWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCarrierDetectID) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributeCarrierDetectID) params:params]; } - (NSDictionary *)readAttributeTimeSinceResetWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTimeSinceResetID) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributeTimeSinceResetID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAttributeListID) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFeatureMapID) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeClusterRevisionID) + clusterID:@(MTRClusterEthernetNetworkDiagnosticsID) + attributeID:@(MTRClusterEthernetNetworkDiagnosticsAttributeClusterRevisionID) params:params]; } @@ -6567,14 +6535,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterBridgedDeviceBasic -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -6583,32 +6551,32 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeVendorNameID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeVendorNameID) params:params]; } - (NSDictionary *)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeVendorIDID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeVendorIDID) params:params]; } - (NSDictionary *)readAttributeProductNameWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeProductNameID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeProductNameID) params:params]; } - (NSDictionary *)readAttributeNodeLabelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeNodeLabelID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeNodeLabelID) params:params]; } @@ -6624,8 +6592,8 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeNodeLabelID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeNodeLabelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -6634,128 +6602,128 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeHardwareVersionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeHardwareVersionID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeHardwareVersionID) params:params]; } - (NSDictionary *)readAttributeHardwareVersionStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeHardwareVersionStringID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeHardwareVersionStringID) params:params]; } - (NSDictionary *)readAttributeSoftwareVersionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeSoftwareVersionID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeSoftwareVersionID) params:params]; } - (NSDictionary *)readAttributeSoftwareVersionStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeSoftwareVersionStringID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeSoftwareVersionStringID) params:params]; } - (NSDictionary *)readAttributeManufacturingDateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeManufacturingDateID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeManufacturingDateID) params:params]; } - (NSDictionary *)readAttributePartNumberWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributePartNumberID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributePartNumberID) params:params]; } - (NSDictionary *)readAttributeProductURLWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeProductURLID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeProductURLID) params:params]; } - (NSDictionary *)readAttributeProductLabelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeProductLabelID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeProductLabelID) params:params]; } - (NSDictionary *)readAttributeSerialNumberWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeSerialNumberID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeSerialNumberID) params:params]; } - (NSDictionary *)readAttributeReachableWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeReachableID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeReachableID) params:params]; } - (NSDictionary *)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeUniqueIDID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeUniqueIDID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeGeneratedCommandListID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeAcceptedCommandListID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeAttributeListID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeFeatureMapID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicAttributeClusterRevisionID) + clusterID:@(MTRClusterBridgedDeviceBasicID) + attributeID:@(MTRClusterBridgedDeviceBasicAttributeClusterRevisionID) params:params]; } @@ -6763,14 +6731,14 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal @implementation MTRClusterSwitch -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -6779,64 +6747,64 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeNumberOfPositionsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSwitchID) - attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeNumberOfPositionsID) + clusterID:@(MTRClusterSwitchID) + attributeID:@(MTRClusterSwitchAttributeNumberOfPositionsID) params:params]; } - (NSDictionary *)readAttributeCurrentPositionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSwitchID) - attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeCurrentPositionID) + clusterID:@(MTRClusterSwitchID) + attributeID:@(MTRClusterSwitchAttributeCurrentPositionID) params:params]; } - (NSDictionary *)readAttributeMultiPressMaxWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSwitchID) - attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeMultiPressMaxID) + clusterID:@(MTRClusterSwitchID) + attributeID:@(MTRClusterSwitchAttributeMultiPressMaxID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSwitchID) - attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeGeneratedCommandListID) + clusterID:@(MTRClusterSwitchID) + attributeID:@(MTRClusterSwitchAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSwitchID) - attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID) + clusterID:@(MTRClusterSwitchID) + attributeID:@(MTRClusterSwitchAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSwitchID) - attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAttributeListID) + clusterID:@(MTRClusterSwitchID) + attributeID:@(MTRClusterSwitchAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSwitchID) - attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeFeatureMapID) + clusterID:@(MTRClusterSwitchID) + attributeID:@(MTRClusterSwitchAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSwitchID) - attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeClusterRevisionID) + clusterID:@(MTRClusterSwitchID) + attributeID:@(MTRClusterSwitchAttributeClusterRevisionID) params:params]; } @@ -6844,14 +6812,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint @implementation MTRClusterAdministratorCommissioning -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -6860,7 +6828,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -6868,7 +6836,7 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -6900,7 +6868,7 @@ new MTRCommandSuccessCallbackBridge( - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -6908,7 +6876,7 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -6935,17 +6903,17 @@ new MTRCommandSuccessCallbackBridge( - (void)revokeCommissioningWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self revokeCommissioningWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -6953,7 +6921,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -6980,67 +6948,64 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeWindowStatusWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeWindowStatusID) + clusterID:@(MTRClusterAdministratorCommissioningID) + attributeID:@(MTRClusterAdministratorCommissioningAttributeWindowStatusID) params:params]; } - (NSDictionary *)readAttributeAdminFabricIndexWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminFabricIndexID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterAdministratorCommissioningID) + attributeID:@(MTRClusterAdministratorCommissioningAttributeAdminFabricIndexID) + params:params]; } - (NSDictionary *)readAttributeAdminVendorIdWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminVendorIdID) + clusterID:@(MTRClusterAdministratorCommissioningID) + attributeID:@(MTRClusterAdministratorCommissioningAttributeAdminVendorIdID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterAdministratorCommissioningID) + attributeID:@(MTRClusterAdministratorCommissioningAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterAdministratorCommissioningID) + attributeID:@(MTRClusterAdministratorCommissioningAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID) + clusterID:@(MTRClusterAdministratorCommissioningID) + attributeID:@(MTRClusterAdministratorCommissioningAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeFeatureMapID) + clusterID:@(MTRClusterAdministratorCommissioningID) + attributeID:@(MTRClusterAdministratorCommissioningAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeClusterRevisionID) + clusterID:@(MTRClusterAdministratorCommissioningID) + attributeID:@(MTRClusterAdministratorCommissioningAttributeClusterRevisionID) params:params]; } @@ -7048,14 +7013,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterOperationalCredentials -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -7064,13 +7029,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -7094,13 +7059,13 @@ new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callb - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -7124,13 +7089,13 @@ new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self. - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -7158,13 +7123,13 @@ new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -7196,13 +7161,13 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -7230,13 +7195,13 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -7260,13 +7225,13 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -7290,7 +7255,7 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -7298,7 +7263,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -7323,90 +7288,88 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalCredentialsID) - attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeNOCsID) + clusterID:@(MTRClusterOperationalCredentialsID) + attributeID:@(MTRClusterOperationalCredentialsAttributeNOCsID) params:params]; } - (NSDictionary *)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalCredentialsID) - attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFabricsID) + clusterID:@(MTRClusterOperationalCredentialsID) + attributeID:@(MTRClusterOperationalCredentialsAttributeFabricsID) params:params]; } - (NSDictionary *)readAttributeSupportedFabricsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalCredentialsID) - attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeSupportedFabricsID) + clusterID:@(MTRClusterOperationalCredentialsID) + attributeID:@(MTRClusterOperationalCredentialsAttributeSupportedFabricsID) params:params]; } - (NSDictionary *)readAttributeCommissionedFabricsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalCredentialsID) - attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCommissionedFabricsID) + clusterID:@(MTRClusterOperationalCredentialsID) + attributeID:@(MTRClusterOperationalCredentialsAttributeCommissionedFabricsID) params:params]; } - (NSDictionary *)readAttributeTrustedRootCertificatesWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalCredentialsID) - attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeTrustedRootCertificatesID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOperationalCredentialsID) + attributeID:@(MTRClusterOperationalCredentialsAttributeTrustedRootCertificatesID) + params:params]; } - (NSDictionary *)readAttributeCurrentFabricIndexWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalCredentialsID) - attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCurrentFabricIndexID) + clusterID:@(MTRClusterOperationalCredentialsID) + attributeID:@(MTRClusterOperationalCredentialsAttributeCurrentFabricIndexID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalCredentialsID) - attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOperationalCredentialsID) + attributeID:@(MTRClusterOperationalCredentialsAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalCredentialsID) - attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID) + clusterID:@(MTRClusterOperationalCredentialsID) + attributeID:@(MTRClusterOperationalCredentialsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalCredentialsID) - attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID) + clusterID:@(MTRClusterOperationalCredentialsID) + attributeID:@(MTRClusterOperationalCredentialsAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalCredentialsID) - attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFeatureMapID) + clusterID:@(MTRClusterOperationalCredentialsID) + attributeID:@(MTRClusterOperationalCredentialsAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalCredentialsID) - attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeClusterRevisionID) + clusterID:@(MTRClusterOperationalCredentialsID) + attributeID:@(MTRClusterOperationalCredentialsAttributeClusterRevisionID) params:params]; } @@ -7414,14 +7377,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterGroupKeyManagement -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -7430,7 +7393,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -7438,7 +7401,7 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -7502,13 +7465,13 @@ new MTRCommandSuccessCallbackBridge( - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -7532,7 +7495,7 @@ new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQu - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -7540,7 +7503,7 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -7565,13 +7528,13 @@ new MTRCommandSuccessCallbackBridge( - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -7616,8 +7579,8 @@ new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(self. - (NSDictionary *)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupKeyManagementID) - attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) + clusterID:@(MTRClusterGroupKeyManagementID) + attributeID:@(MTRClusterGroupKeyManagementAttributeGroupKeyMapID) params:params]; } @@ -7633,8 +7596,8 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupKeyManagementID) - attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) + clusterID:@(MTRClusterGroupKeyManagementID) + attributeID:@(MTRClusterGroupKeyManagementAttributeGroupKeyMapID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -7643,64 +7606,64 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupKeyManagementID) - attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupTableID) + clusterID:@(MTRClusterGroupKeyManagementID) + attributeID:@(MTRClusterGroupKeyManagementAttributeGroupTableID) params:params]; } - (NSDictionary *)readAttributeMaxGroupsPerFabricWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupKeyManagementID) - attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupsPerFabricID) + clusterID:@(MTRClusterGroupKeyManagementID) + attributeID:@(MTRClusterGroupKeyManagementAttributeMaxGroupsPerFabricID) params:params]; } - (NSDictionary *)readAttributeMaxGroupKeysPerFabricWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupKeyManagementID) - attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupKeysPerFabricID) + clusterID:@(MTRClusterGroupKeyManagementID) + attributeID:@(MTRClusterGroupKeyManagementAttributeMaxGroupKeysPerFabricID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupKeyManagementID) - attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGeneratedCommandListID) + clusterID:@(MTRClusterGroupKeyManagementID) + attributeID:@(MTRClusterGroupKeyManagementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupKeyManagementID) - attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID) + clusterID:@(MTRClusterGroupKeyManagementID) + attributeID:@(MTRClusterGroupKeyManagementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupKeyManagementID) - attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID) + clusterID:@(MTRClusterGroupKeyManagementID) + attributeID:@(MTRClusterGroupKeyManagementAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupKeyManagementID) - attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeFeatureMapID) + clusterID:@(MTRClusterGroupKeyManagementID) + attributeID:@(MTRClusterGroupKeyManagementAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupKeyManagementID) - attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeClusterRevisionID) + clusterID:@(MTRClusterGroupKeyManagementID) + attributeID:@(MTRClusterGroupKeyManagementAttributeClusterRevisionID) params:params]; } @@ -7708,14 +7671,14 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV @implementation MTRClusterFixedLabel -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -7724,48 +7687,48 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFixedLabelID) - attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeLabelListID) + clusterID:@(MTRClusterFixedLabelID) + attributeID:@(MTRClusterFixedLabelAttributeLabelListID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFixedLabelID) - attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeGeneratedCommandListID) + clusterID:@(MTRClusterFixedLabelID) + attributeID:@(MTRClusterFixedLabelAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFixedLabelID) - attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID) + clusterID:@(MTRClusterFixedLabelID) + attributeID:@(MTRClusterFixedLabelAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFixedLabelID) - attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID) + clusterID:@(MTRClusterFixedLabelID) + attributeID:@(MTRClusterFixedLabelAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFixedLabelID) - attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeFeatureMapID) + clusterID:@(MTRClusterFixedLabelID) + attributeID:@(MTRClusterFixedLabelAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFixedLabelID) - attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeClusterRevisionID) + clusterID:@(MTRClusterFixedLabelID) + attributeID:@(MTRClusterFixedLabelAttributeClusterRevisionID) params:params]; } @@ -7773,14 +7736,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint @implementation MTRClusterUserLabel -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -7789,8 +7752,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUserLabelID) - attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) + clusterID:@(MTRClusterUserLabelID) + attributeID:@(MTRClusterUserLabelAttributeLabelListID) params:params]; } @@ -7806,8 +7769,8 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUserLabelID) - attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) + clusterID:@(MTRClusterUserLabelID) + attributeID:@(MTRClusterUserLabelAttributeLabelListID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -7816,40 +7779,40 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUserLabelID) - attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeGeneratedCommandListID) + clusterID:@(MTRClusterUserLabelID) + attributeID:@(MTRClusterUserLabelAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUserLabelID) - attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID) + clusterID:@(MTRClusterUserLabelID) + attributeID:@(MTRClusterUserLabelAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUserLabelID) - attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID) + clusterID:@(MTRClusterUserLabelID) + attributeID:@(MTRClusterUserLabelAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUserLabelID) - attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeFeatureMapID) + clusterID:@(MTRClusterUserLabelID) + attributeID:@(MTRClusterUserLabelAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUserLabelID) - attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeClusterRevisionID) + clusterID:@(MTRClusterUserLabelID) + attributeID:@(MTRClusterUserLabelAttributeClusterRevisionID) params:params]; } @@ -7857,14 +7820,14 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal @implementation MTRClusterBooleanState -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -7873,48 +7836,48 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeStateValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBooleanStateID) - attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeStateValueID) + clusterID:@(MTRClusterBooleanStateID) + attributeID:@(MTRClusterBooleanStateAttributeStateValueID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBooleanStateID) - attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeGeneratedCommandListID) + clusterID:@(MTRClusterBooleanStateID) + attributeID:@(MTRClusterBooleanStateAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBooleanStateID) - attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID) + clusterID:@(MTRClusterBooleanStateID) + attributeID:@(MTRClusterBooleanStateAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBooleanStateID) - attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID) + clusterID:@(MTRClusterBooleanStateID) + attributeID:@(MTRClusterBooleanStateAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBooleanStateID) - attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeFeatureMapID) + clusterID:@(MTRClusterBooleanStateID) + attributeID:@(MTRClusterBooleanStateAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBooleanStateID) - attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID) + clusterID:@(MTRClusterBooleanStateID) + attributeID:@(MTRClusterBooleanStateAttributeClusterRevisionID) params:params]; } @@ -7922,14 +7885,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint @implementation MTRClusterModeSelect -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -7938,7 +7901,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -7946,7 +7909,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -7971,40 +7934,40 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeDescriptionID) params:params]; } - (NSDictionary *)readAttributeStandardNamespaceWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStandardNamespaceID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeStandardNamespaceID) params:params]; } - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeSupportedModesID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeSupportedModesID) params:params]; } - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeCurrentModeID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeCurrentModeID) params:params]; } - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeStartUpModeID) params:params]; } @@ -8020,8 +7983,8 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -8030,8 +7993,8 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeOnModeID) params:params]; } @@ -8047,8 +8010,8 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -8057,40 +8020,40 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeGeneratedCommandListID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID) + clusterID:@(MTRClusterModeSelectID) + attributeID:@(MTRClusterModeSelectAttributeClusterRevisionID) params:params]; } @@ -8098,14 +8061,14 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD @implementation MTRClusterDoorLock -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -8114,7 +8077,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -8122,7 +8085,7 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8155,7 +8118,7 @@ new MTRCommandSuccessCallbackBridge( - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -8163,7 +8126,7 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8196,7 +8159,7 @@ new MTRCommandSuccessCallbackBridge( - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -8204,7 +8167,7 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8236,7 +8199,7 @@ new MTRCommandSuccessCallbackBridge( - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -8244,7 +8207,7 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8275,13 +8238,13 @@ new MTRCommandSuccessCallbackBridge( - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8306,7 +8269,7 @@ new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueu - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -8314,7 +8277,7 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8340,7 +8303,7 @@ new MTRCommandSuccessCallbackBridge( - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -8348,7 +8311,7 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8376,13 +8339,13 @@ new MTRCommandSuccessCallbackBridge( - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8407,7 +8370,7 @@ new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueu - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -8415,7 +8378,7 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8441,7 +8404,7 @@ new MTRCommandSuccessCallbackBridge( - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -8449,7 +8412,7 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8478,13 +8441,13 @@ new MTRCommandSuccessCallbackBridge( - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8508,7 +8471,7 @@ new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(self.callbackQueu - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -8516,7 +8479,7 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8541,7 +8504,7 @@ new MTRCommandSuccessCallbackBridge( - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -8549,7 +8512,7 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8611,12 +8574,13 @@ new MTRCommandSuccessCallbackBridge( - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDoorLockClusterGetUserResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRDoorLockClusterGetUserResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8640,7 +8604,7 @@ new MTRDoorLockClusterGetUserResponseCallbackBridge(self.callbackQueue, baseDevi - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -8648,7 +8612,7 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8676,13 +8640,13 @@ new MTRCommandSuccessCallbackBridge( - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDoorLockClusterSetCredentialResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRDoorLockClusterSetCredentialResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8733,13 +8697,13 @@ new MTRDoorLockClusterSetCredentialResponseCallbackBridge(self.callbackQueue, ba - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8765,7 +8729,7 @@ new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(self.callbackQue - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -8773,7 +8737,7 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -8808,40 +8772,40 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockStateID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeLockStateID) params:params]; } - (NSDictionary *)readAttributeLockTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockTypeID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeLockTypeID) params:params]; } - (NSDictionary *)readAttributeActuatorEnabledWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeActuatorEnabledID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeActuatorEnabledID) params:params]; } - (NSDictionary *)readAttributeDoorStateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorStateID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeDoorStateID) params:params]; } - (NSDictionary *)readAttributeDoorOpenEventsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeDoorOpenEventsID) params:params]; } @@ -8857,8 +8821,8 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeDoorOpenEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -8867,8 +8831,8 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeDoorClosedEventsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeDoorClosedEventsID) params:params]; } @@ -8884,8 +8848,8 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *) NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeDoorClosedEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -8894,8 +8858,8 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *) - (NSDictionary *)readAttributeOpenPeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeOpenPeriodID) params:params]; } @@ -8911,8 +8875,8 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeOpenPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -8921,107 +8885,104 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfTotalUsersSupportedWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfTotalUsersSupportedID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeNumberOfTotalUsersSupportedID) params:params]; } - (NSDictionary *)readAttributeNumberOfPINUsersSupportedWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfPINUsersSupportedID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeNumberOfPINUsersSupportedID) params:params]; } - (NSDictionary *)readAttributeNumberOfRFIDUsersSupportedWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfRFIDUsersSupportedID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeNumberOfRFIDUsersSupportedID) params:params]; } - (NSDictionary *)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID) + params:params]; } - (NSDictionary *)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID) + params:params]; } - (NSDictionary *)readAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID) params:params]; } - (NSDictionary *)readAttributeMaxPINCodeLengthWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxPINCodeLengthID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeMaxPINCodeLengthID) params:params]; } - (NSDictionary *)readAttributeMinPINCodeLengthWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinPINCodeLengthID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeMinPINCodeLengthID) params:params]; } - (NSDictionary *)readAttributeMaxRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxRFIDCodeLengthID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeMaxRFIDCodeLengthID) params:params]; } - (NSDictionary *)readAttributeMinRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinRFIDCodeLengthID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeMinRFIDCodeLengthID) params:params]; } - (NSDictionary *)readAttributeCredentialRulesSupportWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeCredentialRulesSupportID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeCredentialRulesSupportID) params:params]; } - (NSDictionary *)readAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID) + params:params]; } - (NSDictionary *)readAttributeLanguageWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeLanguageID) params:params]; } @@ -9037,8 +8998,8 @@ - (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValu NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeLanguageID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -9047,8 +9008,8 @@ - (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeLEDSettingsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeLEDSettingsID) params:params]; } @@ -9064,8 +9025,8 @@ - (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeLEDSettingsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -9074,8 +9035,8 @@ - (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAutoRelockTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeAutoRelockTimeID) params:params]; } @@ -9091,8 +9052,8 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeAutoRelockTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -9101,8 +9062,8 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSoundVolumeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeSoundVolumeID) params:params]; } @@ -9118,8 +9079,8 @@ - (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeSoundVolumeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -9128,8 +9089,8 @@ - (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOperatingModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeOperatingModeID) params:params]; } @@ -9145,8 +9106,8 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeOperatingModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -9155,24 +9116,24 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeSupportedOperatingModesWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSupportedOperatingModesID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeSupportedOperatingModesID) params:params]; } - (NSDictionary *)readAttributeDefaultConfigurationRegisterWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDefaultConfigurationRegisterID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeDefaultConfigurationRegisterID) params:params]; } - (NSDictionary *)readAttributeEnableLocalProgrammingWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableLocalProgrammingID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeEnableLocalProgrammingID) params:params]; } @@ -9190,8 +9151,8 @@ - (void)writeAttributeEnableLocalProgrammingWithValue:(NSDictionary *)readAttributeEnableOneTouchLockingWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableOneTouchLockingID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeEnableOneTouchLockingID) params:params]; } @@ -9219,8 +9180,8 @@ - (void)writeAttributeEnableOneTouchLockingWithValue:(NSDictionary *)readAttributeEnableInsideStatusLEDWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableInsideStatusLEDID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeEnableInsideStatusLEDID) params:params]; } @@ -9248,8 +9209,8 @@ - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSDictionary *)readAttributeEnablePrivacyModeButtonWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnablePrivacyModeButtonID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeEnablePrivacyModeButtonID) params:params]; } @@ -9277,8 +9238,8 @@ - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSDictionary *)readAttributeLocalProgrammingFeaturesWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLocalProgrammingFeaturesID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeLocalProgrammingFeaturesID) params:params]; } @@ -9306,8 +9267,8 @@ - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSDictionary *)readAttributeWrongCodeEntryLimitWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeWrongCodeEntryLimitID) params:params]; } @@ -9333,8 +9294,8 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeWrongCodeEntryLimitID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -9343,8 +9304,8 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSDictionary - (NSDictionary *)readAttributeUserCodeTemporaryDisableTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeUserCodeTemporaryDisableTimeID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeUserCodeTemporaryDisableTimeID) params:params]; } @@ -9362,8 +9323,8 @@ - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSDictionary *)readAttributeSendPINOverTheAirWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeSendPINOverTheAirID) params:params]; } @@ -9389,8 +9350,8 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSDictionary * NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeSendPINOverTheAirID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -9399,8 +9360,8 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSDictionary * - (NSDictionary *)readAttributeRequirePINforRemoteOperationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeRequirePINforRemoteOperationID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeRequirePINforRemoteOperationID) params:params]; } @@ -9418,8 +9379,8 @@ - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSDictionary *)readAttributeExpiringUserTimeoutWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeExpiringUserTimeoutID) params:params]; } @@ -9445,8 +9406,8 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeExpiringUserTimeoutID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -9455,40 +9416,40 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeGeneratedCommandListID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAcceptedCommandListID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAttributeListID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeFeatureMapID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeClusterRevisionID) + clusterID:@(MTRClusterDoorLockID) + attributeID:@(MTRClusterDoorLockAttributeClusterRevisionID) params:params]; } @@ -9496,14 +9457,14 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary @implementation MTRClusterWindowCovering -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -9511,14 +9472,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)upOrOpenWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self upOrOpenWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self upOrOpenWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; } - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -9526,7 +9490,7 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9549,17 +9513,17 @@ new MTRCommandSuccessCallbackBridge( - (void)downOrCloseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self downOrCloseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -9567,7 +9531,7 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9590,17 +9554,17 @@ new MTRCommandSuccessCallbackBridge( - (void)stopMotionWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self stopMotionWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -9608,7 +9572,7 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9632,7 +9596,7 @@ new MTRCommandSuccessCallbackBridge( - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -9640,7 +9604,7 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9665,7 +9629,7 @@ new MTRCommandSuccessCallbackBridge( - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -9673,7 +9637,7 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9698,7 +9662,7 @@ new MTRCommandSuccessCallbackBridge( - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -9706,7 +9670,7 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9731,7 +9695,7 @@ new MTRCommandSuccessCallbackBridge( - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -9739,7 +9703,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9764,174 +9728,168 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTypeID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeTypeID) params:params]; } - (NSDictionary *)readAttributePhysicalClosedLimitLiftWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitLiftID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributePhysicalClosedLimitLiftID) params:params]; } - (NSDictionary *)readAttributePhysicalClosedLimitTiltWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitTiltID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributePhysicalClosedLimitTiltID) params:params]; } - (NSDictionary *)readAttributeCurrentPositionLiftWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeCurrentPositionLiftID) params:params]; } - (NSDictionary *)readAttributeCurrentPositionTiltWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeCurrentPositionTiltID) params:params]; } - (NSDictionary *)readAttributeNumberOfActuationsLiftWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsLiftID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeNumberOfActuationsLiftID) params:params]; } - (NSDictionary *)readAttributeNumberOfActuationsTiltWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsTiltID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeNumberOfActuationsTiltID) params:params]; } - (NSDictionary *)readAttributeConfigStatusWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeConfigStatusID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeConfigStatusID) params:params]; } - (NSDictionary *)readAttributeCurrentPositionLiftPercentageWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercentageID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeCurrentPositionLiftPercentageID) + params:params]; } - (NSDictionary *)readAttributeCurrentPositionTiltPercentageWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercentageID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeCurrentPositionTiltPercentageID) + params:params]; } - (NSDictionary *)readAttributeOperationalStatusWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeOperationalStatusID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeOperationalStatusID) params:params]; } - (NSDictionary *)readAttributeTargetPositionLiftPercent100thsWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionLiftPercent100thsID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeTargetPositionLiftPercent100thsID) + params:params]; } - (NSDictionary *)readAttributeTargetPositionTiltPercent100thsWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionTiltPercent100thsID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeTargetPositionTiltPercent100thsID) + params:params]; } - (NSDictionary *)readAttributeEndProductTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEndProductTypeID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeEndProductTypeID) params:params]; } - (NSDictionary *)readAttributeCurrentPositionLiftPercent100thsWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercent100thsID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeCurrentPositionLiftPercent100thsID) + params:params]; } - (NSDictionary *)readAttributeCurrentPositionTiltPercent100thsWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercent100thsID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeCurrentPositionTiltPercent100thsID) + params:params]; } - (NSDictionary *)readAttributeInstalledOpenLimitLiftWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitLiftID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeInstalledOpenLimitLiftID) params:params]; } - (NSDictionary *)readAttributeInstalledClosedLimitLiftWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitLiftID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeInstalledClosedLimitLiftID) params:params]; } - (NSDictionary *)readAttributeInstalledOpenLimitTiltWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitTiltID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeInstalledOpenLimitTiltID) params:params]; } - (NSDictionary *)readAttributeInstalledClosedLimitTiltWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitTiltID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeInstalledClosedLimitTiltID) params:params]; } - (NSDictionary *)readAttributeModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeModeID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeModeID) params:params]; } @@ -9947,8 +9905,8 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeModeID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -9957,48 +9915,48 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeSafetyStatusWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeSafetyStatusID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeSafetyStatusID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeGeneratedCommandListID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAcceptedCommandListID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAttributeListID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeFeatureMapID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeClusterRevisionID) + clusterID:@(MTRClusterWindowCoveringID) + attributeID:@(MTRClusterWindowCoveringAttributeClusterRevisionID) params:params]; } @@ -10006,14 +9964,14 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic @implementation MTRClusterBarrierControl -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -10022,7 +9980,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -10030,7 +9988,7 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -10054,17 +10012,17 @@ new MTRCommandSuccessCallbackBridge( - (void)barrierControlStopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self barrierControlStopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -10072,7 +10030,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -10096,32 +10054,32 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeBarrierMovingStateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierMovingStateID) params:params]; } - (NSDictionary *)readAttributeBarrierSafetyStatusWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierSafetyStatusID) params:params]; } - (NSDictionary *)readAttributeBarrierCapabilitiesWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierCapabilitiesID) params:params]; } - (NSDictionary *)readAttributeBarrierOpenEventsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierOpenEventsID) params:params]; } @@ -10137,8 +10095,8 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary * NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierOpenEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -10147,8 +10105,8 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary * - (NSDictionary *)readAttributeBarrierCloseEventsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierCloseEventsID) params:params]; } @@ -10164,8 +10122,8 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierCloseEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -10174,8 +10132,8 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary - (NSDictionary *)readAttributeBarrierCommandOpenEventsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierCommandOpenEventsID) params:params]; } @@ -10193,8 +10151,8 @@ - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)readAttributeBarrierCommandCloseEventsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierCommandCloseEventsID) params:params]; } @@ -10222,8 +10180,8 @@ - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)readAttributeBarrierOpenPeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierOpenPeriodID) params:params]; } @@ -10249,8 +10207,8 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary * NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierOpenPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -10259,8 +10217,8 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary * - (NSDictionary *)readAttributeBarrierClosePeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierClosePeriodID) params:params]; } @@ -10276,8 +10234,8 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierClosePeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -10286,48 +10244,48 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeBarrierPositionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeBarrierPositionID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID) + clusterID:@(MTRClusterBarrierControlID) + attributeID:@(MTRClusterBarrierControlAttributeClusterRevisionID) params:params]; } @@ -10335,14 +10293,14 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary @implementation MTRClusterPumpConfigurationAndControl -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -10351,160 +10309,153 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeMaxPressureWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxPressureID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMaxPressureID) params:params]; } - (NSDictionary *)readAttributeMaxSpeedWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxSpeedID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMaxSpeedID) params:params]; } - (NSDictionary *)readAttributeMaxFlowWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxFlowID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMaxFlowID) params:params]; } - (NSDictionary *)readAttributeMinConstPressureWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstPressureID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMinConstPressureID) + params:params]; } - (NSDictionary *)readAttributeMaxConstPressureWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstPressureID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMaxConstPressureID) + params:params]; } - (NSDictionary *)readAttributeMinCompPressureWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinCompPressureID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMinCompPressureID) + params:params]; } - (NSDictionary *)readAttributeMaxCompPressureWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxCompPressureID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMaxCompPressureID) + params:params]; } - (NSDictionary *)readAttributeMinConstSpeedWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstSpeedID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMinConstSpeedID) params:params]; } - (NSDictionary *)readAttributeMaxConstSpeedWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstSpeedID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMaxConstSpeedID) params:params]; } - (NSDictionary *)readAttributeMinConstFlowWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstFlowID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMinConstFlowID) params:params]; } - (NSDictionary *)readAttributeMaxConstFlowWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstFlowID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMaxConstFlowID) params:params]; } - (NSDictionary *)readAttributeMinConstTempWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstTempID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMinConstTempID) params:params]; } - (NSDictionary *)readAttributeMaxConstTempWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstTempID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeMaxConstTempID) params:params]; } - (NSDictionary *)readAttributePumpStatusWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePumpStatusID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributePumpStatusID) params:params]; } - (NSDictionary *)readAttributeEffectiveOperationModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveOperationModeID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeEffectiveOperationModeID) + params:params]; } - (NSDictionary *)readAttributeEffectiveControlModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveControlModeID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeEffectiveControlModeID) + params:params]; } - (NSDictionary *)readAttributeCapacityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeCapacityID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeCapacityID) params:params]; } - (NSDictionary *)readAttributeSpeedWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeSpeedID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeSpeedID) params:params]; } - (NSDictionary *)readAttributeLifetimeRunningHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeRunningHoursID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeLifetimeRunningHoursID) + params:params]; } - (void)writeAttributeLifetimeRunningHoursWithValue:(NSDictionary *)dataValueDictionary @@ -10519,8 +10470,8 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSDictionary *)readAttributePowerWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePowerID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributePowerID) params:params]; } - (NSDictionary *)readAttributeLifetimeEnergyConsumedWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeEnergyConsumedID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeLifetimeEnergyConsumedID) + params:params]; } - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSDictionary *)dataValueDictionary @@ -10556,20 +10506,19 @@ - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSDictionary *)readAttributeOperationModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeOperationModeID) params:params]; } @@ -10585,8 +10534,8 @@ - (void)writeAttributeOperationModeWithValue:(NSDictionary *)dat NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeOperationModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -10595,8 +10544,8 @@ - (void)writeAttributeOperationModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeControlModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeControlModeID) params:params]; } @@ -10612,8 +10561,8 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeControlModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -10621,59 +10570,56 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAcceptedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAttributeListID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeFeatureMapID) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeClusterRevisionID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterPumpConfigurationAndControlID) + attributeID:@(MTRClusterPumpConfigurationAndControlAttributeClusterRevisionID) + params:params]; } @end @implementation MTRClusterThermostat -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -10682,7 +10628,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -10690,7 +10636,7 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -10716,7 +10662,7 @@ new MTRCommandSuccessCallbackBridge( - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -10724,7 +10670,7 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -10787,13 +10733,13 @@ new MTRCommandSuccessCallbackBridge( - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -10819,17 +10765,17 @@ new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQue - (void)clearWeeklyScheduleWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self clearWeeklyScheduleWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -10837,7 +10783,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -10861,80 +10807,80 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeLocalTemperatureID) params:params]; } - (NSDictionary *)readAttributeOutdoorTemperatureWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOutdoorTemperatureID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeOutdoorTemperatureID) params:params]; } - (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupancyID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeOccupancyID) params:params]; } - (NSDictionary *)readAttributeAbsMinHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMinHeatSetpointLimitID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeAbsMinHeatSetpointLimitID) params:params]; } - (NSDictionary *)readAttributeAbsMaxHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMaxHeatSetpointLimitID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeAbsMaxHeatSetpointLimitID) params:params]; } - (NSDictionary *)readAttributeAbsMinCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMinCoolSetpointLimitID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeAbsMinCoolSetpointLimitID) params:params]; } - (NSDictionary *)readAttributeAbsMaxCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMaxCoolSetpointLimitID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeAbsMaxCoolSetpointLimitID) params:params]; } - (NSDictionary *)readAttributePICoolingDemandWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePICoolingDemandID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributePICoolingDemandID) params:params]; } - (NSDictionary *)readAttributePIHeatingDemandWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributePIHeatingDemandID) params:params]; } - (NSDictionary *)readAttributeHVACSystemTypeConfigurationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeHVACSystemTypeConfigurationID) params:params]; } @@ -10952,8 +10898,8 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)readAttributeLocalTemperatureCalibrationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeLocalTemperatureCalibrationID) params:params]; } @@ -10981,8 +10927,8 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSDictionary *)readAttributeOccupiedCoolingSetpointWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedCoolingSetpointID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeOccupiedCoolingSetpointID) params:params]; } @@ -11010,8 +10956,8 @@ - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSDictionary *)readAttributeOccupiedHeatingSetpointWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedHeatingSetpointID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeOccupiedHeatingSetpointID) params:params]; } @@ -11039,8 +10985,8 @@ - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSDictionary *)readAttributeUnoccupiedCoolingSetpointWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedCoolingSetpointID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeUnoccupiedCoolingSetpointID) params:params]; } @@ -11068,8 +11014,8 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSDictionary *)readAttributeUnoccupiedHeatingSetpointWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedHeatingSetpointID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeUnoccupiedHeatingSetpointID) params:params]; } @@ -11097,8 +11043,8 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSDictionary *)readAttributeMinHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinHeatSetpointLimitID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeMinHeatSetpointLimitID) params:params]; } @@ -11124,8 +11070,8 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSDictionary *)readAttributeMaxHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMaxHeatSetpointLimitID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeMaxHeatSetpointLimitID) params:params]; } @@ -11151,8 +11097,8 @@ - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSDictionary *)readAttributeMinCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinCoolSetpointLimitID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeMinCoolSetpointLimitID) params:params]; } @@ -11178,8 +11124,8 @@ - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSDictionary *)readAttributeMaxCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMaxCoolSetpointLimitID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeMaxCoolSetpointLimitID) params:params]; } @@ -11205,8 +11151,8 @@ - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSDictionary *)readAttributeMinSetpointDeadBandWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeMinSetpointDeadBandID) params:params]; } @@ -11232,8 +11178,8 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeMinSetpointDeadBandID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11242,8 +11188,8 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSDictionary - (NSDictionary *)readAttributeRemoteSensingWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeRemoteSensingID) params:params]; } @@ -11259,8 +11205,8 @@ - (void)writeAttributeRemoteSensingWithValue:(NSDictionary *)dat NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeRemoteSensingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11269,8 +11215,8 @@ - (void)writeAttributeRemoteSensingWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeControlSequenceOfOperationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeControlSequenceOfOperationID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeControlSequenceOfOperationID) params:params]; } @@ -11288,8 +11234,8 @@ - (void)writeAttributeControlSequenceOfOperationWithValue:(NSDictionary *)readAttributeSystemModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSystemModeID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeSystemModeID) params:params]; } @@ -11315,8 +11261,8 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSystemModeID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeSystemModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11325,40 +11271,40 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeThermostatRunningModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningModeID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeThermostatRunningModeID) params:params]; } - (NSDictionary *)readAttributeStartOfWeekWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeStartOfWeekID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeStartOfWeekID) params:params]; } - (NSDictionary *)readAttributeNumberOfWeeklyTransitionsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfWeeklyTransitionsID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeNumberOfWeeklyTransitionsID) params:params]; } - (NSDictionary *)readAttributeNumberOfDailyTransitionsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfDailyTransitionsID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeNumberOfDailyTransitionsID) params:params]; } - (NSDictionary *)readAttributeTemperatureSetpointHoldWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeTemperatureSetpointHoldID) params:params]; } @@ -11376,8 +11322,8 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSDictionary *)readAttributeTemperatureSetpointHoldDurationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldDurationID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeTemperatureSetpointHoldDurationID) params:params]; } @@ -11405,8 +11351,8 @@ - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSDictionary *)readAttributeThermostatProgrammingOperationModeWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeThermostatProgrammingOperationModeID) + params:params]; } - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary *)dataValueDictionary @@ -11435,8 +11380,8 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeThermostatProgrammingOperationModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11445,40 +11390,40 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeThermostatRunningStateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningStateID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeThermostatRunningStateID) params:params]; } - (NSDictionary *)readAttributeSetpointChangeSourceWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeSetpointChangeSourceID) params:params]; } - (NSDictionary *)readAttributeSetpointChangeAmountWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeAmountID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeSetpointChangeAmountID) params:params]; } - (NSDictionary *)readAttributeSetpointChangeSourceTimestampWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceTimestampID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeSetpointChangeSourceTimestampID) params:params]; } - (NSDictionary *)readAttributeOccupiedSetbackWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeOccupiedSetbackID) params:params]; } @@ -11494,8 +11439,8 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeOccupiedSetbackID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11504,24 +11449,24 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeOccupiedSetbackMinWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMinID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeOccupiedSetbackMinID) params:params]; } - (NSDictionary *)readAttributeOccupiedSetbackMaxWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMaxID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeOccupiedSetbackMaxID) params:params]; } - (NSDictionary *)readAttributeUnoccupiedSetbackWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeUnoccupiedSetbackID) params:params]; } @@ -11537,8 +11482,8 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeUnoccupiedSetbackID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11547,24 +11492,24 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * - (NSDictionary *)readAttributeUnoccupiedSetbackMinWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMinID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeUnoccupiedSetbackMinID) params:params]; } - (NSDictionary *)readAttributeUnoccupiedSetbackMaxWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMaxID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeUnoccupiedSetbackMaxID) params:params]; } - (NSDictionary *)readAttributeEmergencyHeatDeltaWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeEmergencyHeatDeltaID) params:params]; } @@ -11580,8 +11525,8 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeEmergencyHeatDeltaID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11590,8 +11535,8 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSDictionary - (NSDictionary *)readAttributeACTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACTypeID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACTypeID) params:params]; } @@ -11607,8 +11552,8 @@ - (void)writeAttributeACTypeWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACTypeID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11617,8 +11562,8 @@ - (void)writeAttributeACTypeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeACCapacityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACCapacityID) params:params]; } @@ -11634,8 +11579,8 @@ - (void)writeAttributeACCapacityWithValue:(NSDictionary *)dataVa NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACCapacityID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11644,8 +11589,8 @@ - (void)writeAttributeACCapacityWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeACRefrigerantTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACRefrigerantTypeID) params:params]; } @@ -11661,8 +11606,8 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSDictionary * NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACRefrigerantTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11671,8 +11616,8 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSDictionary * - (NSDictionary *)readAttributeACCompressorTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACCompressorTypeID) params:params]; } @@ -11688,8 +11633,8 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSDictionary *) NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACCompressorTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11698,8 +11643,8 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSDictionary *) - (NSDictionary *)readAttributeACErrorCodeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACErrorCodeID) params:params]; } @@ -11715,8 +11660,8 @@ - (void)writeAttributeACErrorCodeWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACErrorCodeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11725,8 +11670,8 @@ - (void)writeAttributeACErrorCodeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeACLouverPositionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACLouverPositionID) params:params]; } @@ -11742,8 +11687,8 @@ - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *) NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACLouverPositionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11752,16 +11697,16 @@ - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeACCoilTemperatureWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCoilTemperatureID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACCoilTemperatureID) params:params]; } - (NSDictionary *)readAttributeACCapacityformatWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACCapacityformatID) params:params]; } @@ -11777,8 +11722,8 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeACCapacityformatID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11787,40 +11732,40 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAttributeListID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeFeatureMapID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeClusterRevisionID) + clusterID:@(MTRClusterThermostatID) + attributeID:@(MTRClusterThermostatAttributeClusterRevisionID) params:params]; } @@ -11828,14 +11773,14 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) @implementation MTRClusterFanControl -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -11844,8 +11789,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeFanModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeFanModeID) params:params]; } @@ -11861,8 +11806,8 @@ - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValue NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeFanModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11871,8 +11816,8 @@ - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeFanModeSequenceWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeFanModeSequenceID) params:params]; } @@ -11888,8 +11833,8 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSDictionary *)d NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeFanModeSequenceID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11898,8 +11843,8 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSDictionary *)d - (NSDictionary *)readAttributePercentSettingWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentSettingID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributePercentSettingID) params:params]; } @@ -11915,8 +11860,8 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentSettingID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributePercentSettingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11925,24 +11870,24 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da - (NSDictionary *)readAttributePercentCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentCurrentID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributePercentCurrentID) params:params]; } - (NSDictionary *)readAttributeSpeedMaxWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedMaxID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeSpeedMaxID) params:params]; } - (NSDictionary *)readAttributeSpeedSettingWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeSpeedSettingID) params:params]; } @@ -11958,8 +11903,8 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeSpeedSettingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -11968,24 +11913,24 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeSpeedCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedCurrentID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeSpeedCurrentID) params:params]; } - (NSDictionary *)readAttributeRockSupportWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSupportID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeRockSupportID) params:params]; } - (NSDictionary *)readAttributeRockSettingWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSettingID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeRockSettingID) params:params]; } @@ -12001,8 +11946,8 @@ - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSettingID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeRockSettingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -12011,16 +11956,16 @@ - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeWindSupportWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSupportID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeWindSupportID) params:params]; } - (NSDictionary *)readAttributeWindSettingWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSettingID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeWindSettingID) params:params]; } @@ -12036,8 +11981,8 @@ - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSettingID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeWindSettingID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -12046,40 +11991,40 @@ - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeGeneratedCommandListID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAcceptedCommandListID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAttributeListID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFeatureMapID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeClusterRevisionID) + clusterID:@(MTRClusterFanControlID) + attributeID:@(MTRClusterFanControlAttributeClusterRevisionID) params:params]; } @@ -12087,14 +12032,14 @@ - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataV @implementation MTRClusterThermostatUserInterfaceConfiguration -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -12102,12 +12047,11 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeTemperatureDisplayModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) - attributeID: - @(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeTemperatureDisplayModeID) - params:params]; + return + [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThermostatUserInterfaceConfigurationID) + attributeID:@(MTRClusterThermostatUserInterfaceConfigurationAttributeTemperatureDisplayModeID) + params:params]; } - (void)writeAttributeTemperatureDisplayModeWithValue:(NSDictionary *)dataValueDictionary @@ -12123,23 +12067,20 @@ - (void)writeAttributeTemperatureDisplayModeWithValue:(NSDictionary *)readAttributeKeypadLockoutWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThermostatUserInterfaceConfigurationID) + attributeID:@(MTRClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) + params:params]; } - (void)writeAttributeKeypadLockoutWithValue:(NSDictionary *)dataValueDictionary @@ -12153,22 +12094,20 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThermostatUserInterfaceConfigurationID) + attributeID:@(MTRClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary *)readAttributeScheduleProgrammingVisibilityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) - attributeID: - @(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeScheduleProgrammingVisibilityID) + clusterID:@(MTRClusterThermostatUserInterfaceConfigurationID) + attributeID:@(MTRClusterThermostatUserInterfaceConfigurationAttributeScheduleProgrammingVisibilityID) params:params]; } @@ -12187,9 +12126,8 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThermostatUserInterfaceConfigurationID) + attributeID:@(MTRClusterThermostatUserInterfaceConfigurationAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAcceptedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThermostatUserInterfaceConfigurationID) + attributeID:@(MTRClusterThermostatUserInterfaceConfigurationAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAttributeListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThermostatUserInterfaceConfigurationID) + attributeID:@(MTRClusterThermostatUserInterfaceConfigurationAttributeAttributeListID) + params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeFeatureMapID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThermostatUserInterfaceConfigurationID) + attributeID:@(MTRClusterThermostatUserInterfaceConfigurationAttributeFeatureMapID) + params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeClusterRevisionID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterThermostatUserInterfaceConfigurationID) + attributeID:@(MTRClusterThermostatUserInterfaceConfigurationAttributeClusterRevisionID) + params:params]; } @end @implementation MTRClusterColorControl -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -12260,7 +12193,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12268,7 +12201,7 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12298,7 +12231,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12306,7 +12239,7 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12334,7 +12267,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12342,7 +12275,7 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12371,7 +12304,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12379,7 +12312,7 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12407,7 +12340,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12415,7 +12348,7 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12443,7 +12376,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12451,7 +12384,7 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12480,7 +12413,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12488,7 +12421,7 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12517,7 +12450,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12525,7 +12458,7 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12554,7 +12487,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12562,7 +12495,7 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12590,7 +12523,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12598,7 +12531,7 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12627,7 +12560,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12635,7 +12568,7 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12663,7 +12596,7 @@ new MTRCommandSuccessCallbackBridge( - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12671,7 +12604,7 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12701,7 +12634,7 @@ new MTRCommandSuccessCallbackBridge( - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12709,7 +12642,7 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12737,7 +12670,7 @@ new MTRCommandSuccessCallbackBridge( - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12745,7 +12678,7 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12774,7 +12707,7 @@ new MTRCommandSuccessCallbackBridge( - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12782,7 +12715,7 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12811,7 +12744,7 @@ new MTRCommandSuccessCallbackBridge( - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12819,7 +12752,7 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12852,7 +12785,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12860,7 +12793,7 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12886,7 +12819,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12894,7 +12827,7 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12924,7 +12857,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -12932,7 +12865,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -12963,80 +12896,80 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeCurrentHueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentHueID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeCurrentHueID) params:params]; } - (NSDictionary *)readAttributeCurrentSaturationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentSaturationID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeCurrentSaturationID) params:params]; } - (NSDictionary *)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeRemainingTimeID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeRemainingTimeID) params:params]; } - (NSDictionary *)readAttributeCurrentXWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentXID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeCurrentXID) params:params]; } - (NSDictionary *)readAttributeCurrentYWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentYID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeCurrentYID) params:params]; } - (NSDictionary *)readAttributeDriftCompensationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeDriftCompensationID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeDriftCompensationID) params:params]; } - (NSDictionary *)readAttributeCompensationTextWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCompensationTextID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeCompensationTextID) params:params]; } - (NSDictionary *)readAttributeColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTemperatureMiredsID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorTemperatureMiredsID) params:params]; } - (NSDictionary *)readAttributeColorModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorModeID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorModeID) params:params]; } - (NSDictionary *)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeOptionsID) params:params]; } @@ -13052,8 +12985,8 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeOptionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13062,160 +12995,160 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeNumberOfPrimariesWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeNumberOfPrimariesID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeNumberOfPrimariesID) params:params]; } - (NSDictionary *)readAttributePrimary1XWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1XID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary1XID) params:params]; } - (NSDictionary *)readAttributePrimary1YWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1YID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary1YID) params:params]; } - (NSDictionary *)readAttributePrimary1IntensityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1IntensityID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary1IntensityID) params:params]; } - (NSDictionary *)readAttributePrimary2XWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2XID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary2XID) params:params]; } - (NSDictionary *)readAttributePrimary2YWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2YID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary2YID) params:params]; } - (NSDictionary *)readAttributePrimary2IntensityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2IntensityID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary2IntensityID) params:params]; } - (NSDictionary *)readAttributePrimary3XWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3XID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary3XID) params:params]; } - (NSDictionary *)readAttributePrimary3YWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3YID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary3YID) params:params]; } - (NSDictionary *)readAttributePrimary3IntensityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3IntensityID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary3IntensityID) params:params]; } - (NSDictionary *)readAttributePrimary4XWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4XID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary4XID) params:params]; } - (NSDictionary *)readAttributePrimary4YWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4YID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary4YID) params:params]; } - (NSDictionary *)readAttributePrimary4IntensityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4IntensityID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary4IntensityID) params:params]; } - (NSDictionary *)readAttributePrimary5XWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5XID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary5XID) params:params]; } - (NSDictionary *)readAttributePrimary5YWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5YID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary5YID) params:params]; } - (NSDictionary *)readAttributePrimary5IntensityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5IntensityID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary5IntensityID) params:params]; } - (NSDictionary *)readAttributePrimary6XWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6XID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary6XID) params:params]; } - (NSDictionary *)readAttributePrimary6YWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6YID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary6YID) params:params]; } - (NSDictionary *)readAttributePrimary6IntensityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6IntensityID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributePrimary6IntensityID) params:params]; } - (NSDictionary *)readAttributeWhitePointXWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeWhitePointXID) params:params]; } @@ -13231,8 +13164,8 @@ - (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeWhitePointXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13241,8 +13174,8 @@ - (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeWhitePointYWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeWhitePointYID) params:params]; } @@ -13258,8 +13191,8 @@ - (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeWhitePointYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13268,8 +13201,8 @@ - (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeColorPointRXWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointRXID) params:params]; } @@ -13285,8 +13218,8 @@ - (void)writeAttributeColorPointRXWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointRXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13295,8 +13228,8 @@ - (void)writeAttributeColorPointRXWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointRYWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointRYID) params:params]; } @@ -13312,8 +13245,8 @@ - (void)writeAttributeColorPointRYWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointRYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13322,8 +13255,8 @@ - (void)writeAttributeColorPointRYWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointRIntensityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRIntensityID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointRIntensityID) params:params]; } @@ -13339,8 +13272,8 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSDictionary *)readAttributeColorPointGXWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointGXID) params:params]; } @@ -13366,8 +13299,8 @@ - (void)writeAttributeColorPointGXWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointGXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13376,8 +13309,8 @@ - (void)writeAttributeColorPointGXWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointGYWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointGYID) params:params]; } @@ -13393,8 +13326,8 @@ - (void)writeAttributeColorPointGYWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointGYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13403,8 +13336,8 @@ - (void)writeAttributeColorPointGYWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointGIntensityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGIntensityID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointGIntensityID) params:params]; } @@ -13420,8 +13353,8 @@ - (void)writeAttributeColorPointGIntensityWithValue:(NSDictionary *)readAttributeColorPointBXWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointBXID) params:params]; } @@ -13447,8 +13380,8 @@ - (void)writeAttributeColorPointBXWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointBXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13457,8 +13390,8 @@ - (void)writeAttributeColorPointBXWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointBYWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointBYID) params:params]; } @@ -13474,8 +13407,8 @@ - (void)writeAttributeColorPointBYWithValue:(NSDictionary *)data NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointBYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13484,8 +13417,8 @@ - (void)writeAttributeColorPointBYWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointBIntensityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBIntensityID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorPointBIntensityID) params:params]; } @@ -13501,8 +13434,8 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeEnhancedCurrentHueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedCurrentHueID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeEnhancedCurrentHueID) params:params]; } - (NSDictionary *)readAttributeEnhancedColorModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedColorModeID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeEnhancedColorModeID) params:params]; } - (NSDictionary *)readAttributeColorLoopActiveWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopActiveID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorLoopActiveID) params:params]; } - (NSDictionary *)readAttributeColorLoopDirectionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopDirectionID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorLoopDirectionID) params:params]; } - (NSDictionary *)readAttributeColorLoopTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopTimeID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorLoopTimeID) params:params]; } - (NSDictionary *)readAttributeColorLoopStartEnhancedHueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStartEnhancedHueID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorLoopStartEnhancedHueID) params:params]; } - (NSDictionary *)readAttributeColorLoopStoredEnhancedHueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStoredEnhancedHueID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorLoopStoredEnhancedHueID) params:params]; } - (NSDictionary *)readAttributeColorCapabilitiesWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorCapabilitiesID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorCapabilitiesID) params:params]; } - (NSDictionary *)readAttributeColorTempPhysicalMinMiredsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMinMiredsID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorTempPhysicalMinMiredsID) params:params]; } - (NSDictionary *)readAttributeColorTempPhysicalMaxMiredsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMaxMiredsID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeColorTempPhysicalMaxMiredsID) params:params]; } - (NSDictionary *)readAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCoupleColorTempToLevelMinMiredsID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeCoupleColorTempToLevelMinMiredsID) + params:params]; } - (NSDictionary *)readAttributeStartUpColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeStartUpColorTemperatureMiredsID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeStartUpColorTemperatureMiredsID) params:params]; } @@ -13619,8 +13551,8 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeGeneratedCommandListID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAcceptedCommandListID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAttributeListID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeFeatureMapID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeClusterRevisionID) + clusterID:@(MTRClusterColorControlID) + attributeID:@(MTRClusterColorControlAttributeClusterRevisionID) params:params]; } @@ -13670,14 +13602,14 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributePhysicalMinLevelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMinLevelID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributePhysicalMinLevelID) params:params]; } - (NSDictionary *)readAttributePhysicalMaxLevelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMaxLevelID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributePhysicalMaxLevelID) params:params]; } - (NSDictionary *)readAttributeBallastStatusWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastStatusID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeBallastStatusID) params:params]; } - (NSDictionary *)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeMinLevelID) params:params]; } @@ -13727,8 +13659,8 @@ - (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValu NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeMinLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13737,8 +13669,8 @@ - (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeMaxLevelID) params:params]; } @@ -13754,8 +13686,8 @@ - (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValu NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeMaxLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13763,11 +13695,10 @@ - (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeIntrinsicBalanceFactorWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeIntrinsicBalanceFactorID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeIntrinsicBalanceFactorID) + params:params]; } - (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSDictionary *)dataValueDictionary @@ -13784,8 +13715,8 @@ - (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSDictionary *)readAttributeBallastFactorAdjustmentWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastFactorAdjustmentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeBallastFactorAdjustmentID) + params:params]; } - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)dataValueDictionary @@ -13814,8 +13744,8 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)readAttributeLampQuantityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampQuantityID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeLampQuantityID) params:params]; } - (NSDictionary *)readAttributeLampTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeLampTypeID) params:params]; } @@ -13849,8 +13779,8 @@ - (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValu NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeLampTypeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13859,8 +13789,8 @@ - (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeLampManufacturerWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeLampManufacturerID) params:params]; } @@ -13876,8 +13806,8 @@ - (void)writeAttributeLampManufacturerWithValue:(NSDictionary *) NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeLampManufacturerID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13886,8 +13816,8 @@ - (void)writeAttributeLampManufacturerWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLampRatedHoursWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeLampRatedHoursID) params:params]; } @@ -13903,8 +13833,8 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeLampRatedHoursID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13913,8 +13843,8 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeLampBurnHoursWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeLampBurnHoursID) params:params]; } @@ -13930,8 +13860,8 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dat NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeLampBurnHoursID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13940,8 +13870,8 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeLampAlarmModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeLampAlarmModeID) params:params]; } @@ -13957,8 +13887,8 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dat NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeLampAlarmModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -13966,11 +13896,10 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeLampBurnHoursTripPointWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursTripPointID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeLampBurnHoursTripPointID) + params:params]; } - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)dataValueDictionary @@ -13987,8 +13916,8 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeGeneratedCommandListID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAcceptedCommandListID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeFeatureMapID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeClusterRevisionID) + clusterID:@(MTRClusterBallastConfigurationID) + attributeID:@(MTRClusterBallastConfigurationAttributeClusterRevisionID) params:params]; } @@ -14038,14 +13967,14 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMeasuredValueID) + clusterID:@(MTRClusterIlluminanceMeasurementID) + attributeID:@(MTRClusterIlluminanceMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMinMeasuredValueID) + clusterID:@(MTRClusterIlluminanceMeasurementID) + attributeID:@(MTRClusterIlluminanceMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMaxMeasuredValueID) + clusterID:@(MTRClusterIlluminanceMeasurementID) + attributeID:@(MTRClusterIlluminanceMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeToleranceID) + clusterID:@(MTRClusterIlluminanceMeasurementID) + attributeID:@(MTRClusterIlluminanceMeasurementAttributeToleranceID) params:params]; } - (NSDictionary *)readAttributeLightSensorTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeLightSensorTypeID) + clusterID:@(MTRClusterIlluminanceMeasurementID) + attributeID:@(MTRClusterIlluminanceMeasurementAttributeLightSensorTypeID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIlluminanceMeasurementID) + attributeID:@(MTRClusterIlluminanceMeasurementAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID) + clusterID:@(MTRClusterIlluminanceMeasurementID) + attributeID:@(MTRClusterIlluminanceMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID) + clusterID:@(MTRClusterIlluminanceMeasurementID) + attributeID:@(MTRClusterIlluminanceMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterIlluminanceMeasurementID) + attributeID:@(MTRClusterIlluminanceMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeClusterRevisionID) + clusterID:@(MTRClusterIlluminanceMeasurementID) + attributeID:@(MTRClusterIlluminanceMeasurementAttributeClusterRevisionID) params:params]; } @@ -14136,14 +14064,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint @implementation MTRClusterTemperatureMeasurement -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -14152,73 +14080,72 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMeasuredValueID) + clusterID:@(MTRClusterTemperatureMeasurementID) + attributeID:@(MTRClusterTemperatureMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMinMeasuredValueID) + clusterID:@(MTRClusterTemperatureMeasurementID) + attributeID:@(MTRClusterTemperatureMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMaxMeasuredValueID) + clusterID:@(MTRClusterTemperatureMeasurementID) + attributeID:@(MTRClusterTemperatureMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeToleranceID) + clusterID:@(MTRClusterTemperatureMeasurementID) + attributeID:@(MTRClusterTemperatureMeasurementAttributeToleranceID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterTemperatureMeasurementID) + attributeID:@(MTRClusterTemperatureMeasurementAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID) + clusterID:@(MTRClusterTemperatureMeasurementID) + attributeID:@(MTRClusterTemperatureMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID) + clusterID:@(MTRClusterTemperatureMeasurementID) + attributeID:@(MTRClusterTemperatureMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterTemperatureMeasurementID) + attributeID:@(MTRClusterTemperatureMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeClusterRevisionID) + clusterID:@(MTRClusterTemperatureMeasurementID) + attributeID:@(MTRClusterTemperatureMeasurementAttributeClusterRevisionID) params:params]; } @@ -14226,14 +14153,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint @implementation MTRClusterPressureMeasurement -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -14242,112 +14169,112 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMeasuredValueID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinMeasuredValueID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxMeasuredValueID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeToleranceID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeToleranceID) params:params]; } - (NSDictionary *)readAttributeScaledValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledValueID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeScaledValueID) params:params]; } - (NSDictionary *)readAttributeMinScaledValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinScaledValueID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeMinScaledValueID) params:params]; } - (NSDictionary *)readAttributeMaxScaledValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxScaledValueID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeMaxScaledValueID) params:params]; } - (NSDictionary *)readAttributeScaledToleranceWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledToleranceID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeScaledToleranceID) params:params]; } - (NSDictionary *)readAttributeScaleWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaleID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeScaleID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeGeneratedCommandListID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeClusterRevisionID) + clusterID:@(MTRClusterPressureMeasurementID) + attributeID:@(MTRClusterPressureMeasurementAttributeClusterRevisionID) params:params]; } @@ -14355,14 +14282,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint @implementation MTRClusterFlowMeasurement -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -14371,72 +14298,72 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMeasuredValueID) + clusterID:@(MTRClusterFlowMeasurementID) + attributeID:@(MTRClusterFlowMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMinMeasuredValueID) + clusterID:@(MTRClusterFlowMeasurementID) + attributeID:@(MTRClusterFlowMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMaxMeasuredValueID) + clusterID:@(MTRClusterFlowMeasurementID) + attributeID:@(MTRClusterFlowMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeToleranceID) + clusterID:@(MTRClusterFlowMeasurementID) + attributeID:@(MTRClusterFlowMeasurementAttributeToleranceID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeGeneratedCommandListID) + clusterID:@(MTRClusterFlowMeasurementID) + attributeID:@(MTRClusterFlowMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID) + clusterID:@(MTRClusterFlowMeasurementID) + attributeID:@(MTRClusterFlowMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID) + clusterID:@(MTRClusterFlowMeasurementID) + attributeID:@(MTRClusterFlowMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterFlowMeasurementID) + attributeID:@(MTRClusterFlowMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeClusterRevisionID) + clusterID:@(MTRClusterFlowMeasurementID) + attributeID:@(MTRClusterFlowMeasurementAttributeClusterRevisionID) params:params]; } @@ -14444,14 +14371,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint @implementation MTRClusterRelativeHumidityMeasurement -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -14460,92 +14387,87 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMeasuredValueID) + clusterID:@(MTRClusterRelativeHumidityMeasurementID) + attributeID:@(MTRClusterRelativeHumidityMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMinMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterRelativeHumidityMeasurementID) + attributeID:@(MTRClusterRelativeHumidityMeasurementAttributeMinMeasuredValueID) + params:params]; } - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMaxMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterRelativeHumidityMeasurementID) + attributeID:@(MTRClusterRelativeHumidityMeasurementAttributeMaxMeasuredValueID) + params:params]; } - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeToleranceID) + clusterID:@(MTRClusterRelativeHumidityMeasurementID) + attributeID:@(MTRClusterRelativeHumidityMeasurementAttributeToleranceID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterRelativeHumidityMeasurementID) + attributeID:@(MTRClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterRelativeHumidityMeasurementID) + attributeID:@(MTRClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID) + clusterID:@(MTRClusterRelativeHumidityMeasurementID) + attributeID:@(MTRClusterRelativeHumidityMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterRelativeHumidityMeasurementID) + attributeID:@(MTRClusterRelativeHumidityMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeClusterRevisionID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterRelativeHumidityMeasurementID) + attributeID:@(MTRClusterRelativeHumidityMeasurementAttributeClusterRevisionID) + params:params]; } @end @implementation MTRClusterOccupancySensing -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -14554,126 +14476,121 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancyID) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeOccupancyID) params:params]; } - (NSDictionary *)readAttributeOccupancySensorTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeID) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeOccupancySensorTypeID) params:params]; } - (NSDictionary *)readAttributeOccupancySensorTypeBitmapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeOccupancySensorTypeBitmapID) params:params]; } -- (NSDictionary *)readAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePirOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributePirOccupiedToUnoccupiedDelayID) + params:params]; } -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary + [self writeAttributePirOccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributePirOccupiedToUnoccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePirUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributePirUnoccupiedToOccupiedDelayID) + params:params]; } -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary + [self writeAttributePirUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributePirUnoccupiedToOccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePirUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributePirUnoccupiedToOccupiedThresholdID) + params:params]; } -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary + [self writeAttributePirUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributePirUnoccupiedToOccupiedThresholdID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary *)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) - params:params]; -} + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) + params:params]; +} - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -14688,22 +14605,20 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary *)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) + params:params]; } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary @@ -14719,22 +14634,20 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary *)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) + params:params]; } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary @@ -14750,22 +14663,20 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictio { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary *)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) + params:params]; } - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary @@ -14781,22 +14692,20 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDicti { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary *)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) + params:params]; } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary @@ -14812,13 +14721,12 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDicti { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary *)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams: @@ -14826,9 +14734,8 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDicti { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID: - @(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) params:params]; } @@ -14845,68 +14752,66 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID: - @(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeGeneratedCommandListID) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeFeatureMapID) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeClusterRevisionID) + clusterID:@(MTRClusterOccupancySensingID) + attributeID:@(MTRClusterOccupancySensingAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterWakeOnLAN +@implementation MTRClusterWakeOnLan -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -14915,48 +14820,48 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeMACAddressWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWakeOnLANID) - attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeMACAddressID) + clusterID:@(MTRClusterWakeOnLanID) + attributeID:@(MTRClusterWakeOnLanAttributeMACAddressID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWakeOnLANID) - attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeGeneratedCommandListID) + clusterID:@(MTRClusterWakeOnLanID) + attributeID:@(MTRClusterWakeOnLanAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWakeOnLANID) - attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID) + clusterID:@(MTRClusterWakeOnLanID) + attributeID:@(MTRClusterWakeOnLanAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWakeOnLANID) - attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID) + clusterID:@(MTRClusterWakeOnLanID) + attributeID:@(MTRClusterWakeOnLanAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWakeOnLANID) - attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeFeatureMapID) + clusterID:@(MTRClusterWakeOnLanID) + attributeID:@(MTRClusterWakeOnLanAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWakeOnLANID) - attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeClusterRevisionID) + clusterID:@(MTRClusterWakeOnLanID) + attributeID:@(MTRClusterWakeOnLanAttributeClusterRevisionID) params:params]; } @@ -14964,14 +14869,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint @implementation MTRClusterChannel -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -14980,13 +14885,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRChannelClusterChangeChannelResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRChannelClusterChangeChannelResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15010,7 +14915,7 @@ new MTRChannelClusterChangeChannelResponseCallbackBridge(self.callbackQueue, bas - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -15018,7 +14923,7 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -15044,7 +14949,7 @@ new MTRCommandSuccessCallbackBridge( - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -15052,7 +14957,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -15077,64 +14982,64 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeChannelListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeChannelID) - attributeID:@(MTRAttributeIDTypeClusterChannelAttributeChannelListID) + clusterID:@(MTRClusterChannelID) + attributeID:@(MTRClusterChannelAttributeChannelListID) params:params]; } - (NSDictionary *)readAttributeLineupWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeChannelID) - attributeID:@(MTRAttributeIDTypeClusterChannelAttributeLineupID) + clusterID:@(MTRClusterChannelID) + attributeID:@(MTRClusterChannelAttributeLineupID) params:params]; } - (NSDictionary *)readAttributeCurrentChannelWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeChannelID) - attributeID:@(MTRAttributeIDTypeClusterChannelAttributeCurrentChannelID) + clusterID:@(MTRClusterChannelID) + attributeID:@(MTRClusterChannelAttributeCurrentChannelID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeChannelID) - attributeID:@(MTRAttributeIDTypeClusterChannelAttributeGeneratedCommandListID) + clusterID:@(MTRClusterChannelID) + attributeID:@(MTRClusterChannelAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeChannelID) - attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID) + clusterID:@(MTRClusterChannelID) + attributeID:@(MTRClusterChannelAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeChannelID) - attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAttributeListID) + clusterID:@(MTRClusterChannelID) + attributeID:@(MTRClusterChannelAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeChannelID) - attributeID:@(MTRAttributeIDTypeClusterChannelAttributeFeatureMapID) + clusterID:@(MTRClusterChannelID) + attributeID:@(MTRClusterChannelAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeChannelID) - attributeID:@(MTRAttributeIDTypeClusterChannelAttributeClusterRevisionID) + clusterID:@(MTRClusterChannelID) + attributeID:@(MTRClusterChannelAttributeClusterRevisionID) params:params]; } @@ -15142,14 +15047,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterTargetNavigator -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -15158,13 +15063,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15192,56 +15097,56 @@ new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(self.callbackQ - (NSDictionary *)readAttributeTargetListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTargetNavigatorID) - attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeTargetListID) + clusterID:@(MTRClusterTargetNavigatorID) + attributeID:@(MTRClusterTargetNavigatorAttributeTargetListID) params:params]; } - (NSDictionary *)readAttributeCurrentTargetWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTargetNavigatorID) - attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeCurrentTargetID) + clusterID:@(MTRClusterTargetNavigatorID) + attributeID:@(MTRClusterTargetNavigatorAttributeCurrentTargetID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTargetNavigatorID) - attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeGeneratedCommandListID) + clusterID:@(MTRClusterTargetNavigatorID) + attributeID:@(MTRClusterTargetNavigatorAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTargetNavigatorID) - attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID) + clusterID:@(MTRClusterTargetNavigatorID) + attributeID:@(MTRClusterTargetNavigatorAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTargetNavigatorID) - attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID) + clusterID:@(MTRClusterTargetNavigatorID) + attributeID:@(MTRClusterTargetNavigatorAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTargetNavigatorID) - attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeFeatureMapID) + clusterID:@(MTRClusterTargetNavigatorID) + attributeID:@(MTRClusterTargetNavigatorAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTargetNavigatorID) - attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeClusterRevisionID) + clusterID:@(MTRClusterTargetNavigatorID) + attributeID:@(MTRClusterTargetNavigatorAttributeClusterRevisionID) params:params]; } @@ -15249,14 +15154,14 @@ new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(self.callbackQ @implementation MTRClusterMediaPlayback -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -15264,21 +15169,24 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)playWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self playWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self playWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; } - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15300,21 +15208,24 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self pauseWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; } - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15336,24 +15247,24 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)stopPlaybackWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { [self stopPlaybackWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15375,24 +15286,24 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)startOverWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { [self startOverWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15414,21 +15325,24 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)previousWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self previousWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self previousWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; } - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15450,21 +15364,24 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)nextWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self nextWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self nextWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; } - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15486,21 +15403,24 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)rewindWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self rewindWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self rewindWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; } - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15522,24 +15442,24 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)fastForwardWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { [self fastForwardWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15562,13 +15482,13 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15592,13 +15512,13 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15622,13 +15542,13 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -15652,96 +15572,96 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (NSDictionary *)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeCurrentStateID) + clusterID:@(MTRClusterMediaPlaybackID) + attributeID:@(MTRClusterMediaPlaybackAttributeCurrentStateID) params:params]; } - (NSDictionary *)readAttributeStartTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeStartTimeID) + clusterID:@(MTRClusterMediaPlaybackID) + attributeID:@(MTRClusterMediaPlaybackAttributeStartTimeID) params:params]; } - (NSDictionary *)readAttributeDurationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeDurationID) + clusterID:@(MTRClusterMediaPlaybackID) + attributeID:@(MTRClusterMediaPlaybackAttributeDurationID) params:params]; } - (NSDictionary *)readAttributeSampledPositionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSampledPositionID) + clusterID:@(MTRClusterMediaPlaybackID) + attributeID:@(MTRClusterMediaPlaybackAttributeSampledPositionID) params:params]; } - (NSDictionary *)readAttributePlaybackSpeedWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributePlaybackSpeedID) + clusterID:@(MTRClusterMediaPlaybackID) + attributeID:@(MTRClusterMediaPlaybackAttributePlaybackSpeedID) params:params]; } - (NSDictionary *)readAttributeSeekRangeEndWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeEndID) + clusterID:@(MTRClusterMediaPlaybackID) + attributeID:@(MTRClusterMediaPlaybackAttributeSeekRangeEndID) params:params]; } - (NSDictionary *)readAttributeSeekRangeStartWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeStartID) + clusterID:@(MTRClusterMediaPlaybackID) + attributeID:@(MTRClusterMediaPlaybackAttributeSeekRangeStartID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeGeneratedCommandListID) + clusterID:@(MTRClusterMediaPlaybackID) + attributeID:@(MTRClusterMediaPlaybackAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID) + clusterID:@(MTRClusterMediaPlaybackID) + attributeID:@(MTRClusterMediaPlaybackAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID) + clusterID:@(MTRClusterMediaPlaybackID) + attributeID:@(MTRClusterMediaPlaybackAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeFeatureMapID) + clusterID:@(MTRClusterMediaPlaybackID) + attributeID:@(MTRClusterMediaPlaybackAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeClusterRevisionID) + clusterID:@(MTRClusterMediaPlaybackID) + attributeID:@(MTRClusterMediaPlaybackAttributeClusterRevisionID) params:params]; } @@ -15749,14 +15669,14 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba @implementation MTRClusterMediaInput -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -15765,7 +15685,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -15773,7 +15693,7 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -15797,17 +15717,17 @@ new MTRCommandSuccessCallbackBridge( - (void)showInputStatusWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self showInputStatusWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -15815,7 +15735,7 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -15838,17 +15758,17 @@ new MTRCommandSuccessCallbackBridge( - (void)hideInputStatusWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self hideInputStatusWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -15856,7 +15776,7 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -15880,7 +15800,7 @@ new MTRCommandSuccessCallbackBridge( - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -15888,7 +15808,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -15914,56 +15834,56 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeInputListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeInputListID) + clusterID:@(MTRClusterMediaInputID) + attributeID:@(MTRClusterMediaInputAttributeInputListID) params:params]; } - (NSDictionary *)readAttributeCurrentInputWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeCurrentInputID) + clusterID:@(MTRClusterMediaInputID) + attributeID:@(MTRClusterMediaInputAttributeCurrentInputID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeGeneratedCommandListID) + clusterID:@(MTRClusterMediaInputID) + attributeID:@(MTRClusterMediaInputAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID) + clusterID:@(MTRClusterMediaInputID) + attributeID:@(MTRClusterMediaInputAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID) + clusterID:@(MTRClusterMediaInputID) + attributeID:@(MTRClusterMediaInputAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID) + clusterID:@(MTRClusterMediaInputID) + attributeID:@(MTRClusterMediaInputAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeClusterRevisionID) + clusterID:@(MTRClusterMediaInputID) + attributeID:@(MTRClusterMediaInputAttributeClusterRevisionID) params:params]; } @@ -15971,14 +15891,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterLowPower -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -15986,14 +15906,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)sleepWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self sleepWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self sleepWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; } - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -16001,7 +15924,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -16025,40 +15948,40 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLowPowerID) - attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeGeneratedCommandListID) + clusterID:@(MTRClusterLowPowerID) + attributeID:@(MTRClusterLowPowerAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLowPowerID) - attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID) + clusterID:@(MTRClusterLowPowerID) + attributeID:@(MTRClusterLowPowerAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLowPowerID) - attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID) + clusterID:@(MTRClusterLowPowerID) + attributeID:@(MTRClusterLowPowerAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLowPowerID) - attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeFeatureMapID) + clusterID:@(MTRClusterLowPowerID) + attributeID:@(MTRClusterLowPowerAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLowPowerID) - attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeClusterRevisionID) + clusterID:@(MTRClusterLowPowerID) + attributeID:@(MTRClusterLowPowerAttributeClusterRevisionID) params:params]; } @@ -16066,14 +15989,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterKeypadInput -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -16082,13 +16005,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRKeypadInputClusterSendKeyResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRKeypadInputClusterSendKeyResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16112,40 +16035,40 @@ new MTRKeypadInputClusterSendKeyResponseCallbackBridge(self.callbackQueue, baseD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeKeypadInputID) - attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeGeneratedCommandListID) + clusterID:@(MTRClusterKeypadInputID) + attributeID:@(MTRClusterKeypadInputAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeKeypadInputID) - attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID) + clusterID:@(MTRClusterKeypadInputID) + attributeID:@(MTRClusterKeypadInputAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeKeypadInputID) - attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID) + clusterID:@(MTRClusterKeypadInputID) + attributeID:@(MTRClusterKeypadInputAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeKeypadInputID) - attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeFeatureMapID) + clusterID:@(MTRClusterKeypadInputID) + attributeID:@(MTRClusterKeypadInputAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeKeypadInputID) - attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeClusterRevisionID) + clusterID:@(MTRClusterKeypadInputID) + attributeID:@(MTRClusterKeypadInputAttributeClusterRevisionID) params:params]; } @@ -16153,14 +16076,14 @@ new MTRKeypadInputClusterSendKeyResponseCallbackBridge(self.callbackQueue, baseD @implementation MTRClusterContentLauncher -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -16169,13 +16092,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16255,13 +16178,13 @@ new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, ba - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16383,18 +16306,17 @@ new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, ba - (NSDictionary *)readAttributeAcceptHeaderWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeContentLauncherID) - attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptHeaderID) + clusterID:@(MTRClusterContentLauncherID) + attributeID:@(MTRClusterContentLauncherAttributeAcceptHeaderID) params:params]; } - (NSDictionary *)readAttributeSupportedStreamingProtocolsWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeContentLauncherID) - attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeSupportedStreamingProtocolsID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterContentLauncherID) + attributeID:@(MTRClusterContentLauncherAttributeSupportedStreamingProtocolsID) + params:params]; } - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)dataValueDictionary @@ -16411,8 +16333,8 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeContentLauncherID) - attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeGeneratedCommandListID) + clusterID:@(MTRClusterContentLauncherID) + attributeID:@(MTRClusterContentLauncherAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeContentLauncherID) - attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptedCommandListID) + clusterID:@(MTRClusterContentLauncherID) + attributeID:@(MTRClusterContentLauncherAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeContentLauncherID) - attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID) + clusterID:@(MTRClusterContentLauncherID) + attributeID:@(MTRClusterContentLauncherAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeContentLauncherID) - attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeFeatureMapID) + clusterID:@(MTRClusterContentLauncherID) + attributeID:@(MTRClusterContentLauncherAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeContentLauncherID) - attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeClusterRevisionID) + clusterID:@(MTRClusterContentLauncherID) + attributeID:@(MTRClusterContentLauncherAttributeClusterRevisionID) params:params]; } @@ -16462,14 +16384,14 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -16486,7 +16408,7 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -16511,7 +16433,7 @@ new MTRCommandSuccessCallbackBridge( - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -16519,7 +16441,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -16545,56 +16467,56 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeOutputListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAudioOutputID) - attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeOutputListID) + clusterID:@(MTRClusterAudioOutputID) + attributeID:@(MTRClusterAudioOutputAttributeOutputListID) params:params]; } - (NSDictionary *)readAttributeCurrentOutputWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAudioOutputID) - attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeCurrentOutputID) + clusterID:@(MTRClusterAudioOutputID) + attributeID:@(MTRClusterAudioOutputAttributeCurrentOutputID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAudioOutputID) - attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeGeneratedCommandListID) + clusterID:@(MTRClusterAudioOutputID) + attributeID:@(MTRClusterAudioOutputAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAudioOutputID) - attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID) + clusterID:@(MTRClusterAudioOutputID) + attributeID:@(MTRClusterAudioOutputAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAudioOutputID) - attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID) + clusterID:@(MTRClusterAudioOutputID) + attributeID:@(MTRClusterAudioOutputAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAudioOutputID) - attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeFeatureMapID) + clusterID:@(MTRClusterAudioOutputID) + attributeID:@(MTRClusterAudioOutputAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAudioOutputID) - attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeClusterRevisionID) + clusterID:@(MTRClusterAudioOutputID) + attributeID:@(MTRClusterAudioOutputAttributeClusterRevisionID) params:params]; } @@ -16602,14 +16524,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterApplicationLauncher -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -16618,13 +16540,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16653,13 +16575,13 @@ new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQue - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16684,13 +16606,13 @@ new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQue - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16715,16 +16637,16 @@ new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQue - (NSDictionary *)readAttributeCatalogListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationLauncherID) - attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCatalogListID) + clusterID:@(MTRClusterApplicationLauncherID) + attributeID:@(MTRClusterApplicationLauncherAttributeCatalogListID) params:params]; } - (NSDictionary *)readAttributeCurrentAppWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationLauncherID) - attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) + clusterID:@(MTRClusterApplicationLauncherID) + attributeID:@(MTRClusterApplicationLauncherAttributeCurrentAppID) params:params]; } @@ -16740,8 +16662,8 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationLauncherID) - attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) + clusterID:@(MTRClusterApplicationLauncherID) + attributeID:@(MTRClusterApplicationLauncherAttributeCurrentAppID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -16750,40 +16672,40 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationLauncherID) - attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeGeneratedCommandListID) + clusterID:@(MTRClusterApplicationLauncherID) + attributeID:@(MTRClusterApplicationLauncherAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationLauncherID) - attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID) + clusterID:@(MTRClusterApplicationLauncherID) + attributeID:@(MTRClusterApplicationLauncherAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationLauncherID) - attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID) + clusterID:@(MTRClusterApplicationLauncherID) + attributeID:@(MTRClusterApplicationLauncherAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationLauncherID) - attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeFeatureMapID) + clusterID:@(MTRClusterApplicationLauncherID) + attributeID:@(MTRClusterApplicationLauncherAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationLauncherID) - attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeClusterRevisionID) + clusterID:@(MTRClusterApplicationLauncherID) + attributeID:@(MTRClusterApplicationLauncherAttributeClusterRevisionID) params:params]; } @@ -16791,14 +16713,14 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa @implementation MTRClusterApplicationBasic -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -16807,104 +16729,104 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorNameID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeVendorNameID) params:params]; } - (NSDictionary *)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorIDID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeVendorIDID) params:params]; } - (NSDictionary *)readAttributeApplicationNameWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationNameID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeApplicationNameID) params:params]; } - (NSDictionary *)readAttributeProductIDWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeProductIDID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeProductIDID) params:params]; } - (NSDictionary *)readAttributeApplicationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeApplicationID) params:params]; } - (NSDictionary *)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeStatusID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeStatusID) params:params]; } - (NSDictionary *)readAttributeApplicationVersionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationVersionID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeApplicationVersionID) params:params]; } - (NSDictionary *)readAttributeAllowedVendorListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAllowedVendorListID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeAllowedVendorListID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeGeneratedCommandListID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeFeatureMapID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeClusterRevisionID) + clusterID:@(MTRClusterApplicationBasicID) + attributeID:@(MTRClusterApplicationBasicAttributeClusterRevisionID) params:params]; } @@ -16912,14 +16834,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint @implementation MTRClusterAccountLogin -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -16928,13 +16850,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16961,7 +16883,7 @@ new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(self.callbackQueue, - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -16969,7 +16891,7 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -16997,14 +16919,17 @@ new MTRCommandSuccessCallbackBridge( - (void)logoutWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self logoutWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self logoutWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; } - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -17012,7 +16937,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -17039,40 +16964,40 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccountLoginID) - attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeGeneratedCommandListID) + clusterID:@(MTRClusterAccountLoginID) + attributeID:@(MTRClusterAccountLoginAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccountLoginID) - attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID) + clusterID:@(MTRClusterAccountLoginID) + attributeID:@(MTRClusterAccountLoginAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccountLoginID) - attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID) + clusterID:@(MTRClusterAccountLoginID) + attributeID:@(MTRClusterAccountLoginAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccountLoginID) - attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID) + clusterID:@(MTRClusterAccountLoginID) + attributeID:@(MTRClusterAccountLoginAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccountLoginID) - attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeClusterRevisionID) + clusterID:@(MTRClusterAccountLoginID) + attributeID:@(MTRClusterAccountLoginAttributeClusterRevisionID) params:params]; } @@ -17080,14 +17005,14 @@ new MTRCommandSuccessCallbackBridge( @implementation MTRClusterElectricalMeasurement -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { if (self = [super initWithQueue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpoint unsignedShortValue]; + _endpoint = endpoint; _device = device; } return self; @@ -17095,17 +17020,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(NSNumber *)endpoint - (void)getProfileInfoCommandWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self getProfileInfoCommandWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -17113,7 +17038,7 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -17137,7 +17062,7 @@ new MTRCommandSuccessCallbackBridge( - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -17145,7 +17070,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -17172,492 +17097,473 @@ new MTRCommandSuccessCallbackBridge( - (NSDictionary *)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasurementTypeID) params:params]; } - (NSDictionary *)readAttributeDcVoltageWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcVoltageID) params:params]; } - (NSDictionary *)readAttributeDcVoltageMinWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcVoltageMinID) params:params]; } - (NSDictionary *)readAttributeDcVoltageMaxWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcVoltageMaxID) params:params]; } - (NSDictionary *)readAttributeDcCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcCurrentID) params:params]; } - (NSDictionary *)readAttributeDcCurrentMinWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcCurrentMinID) params:params]; } - (NSDictionary *)readAttributeDcCurrentMaxWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcCurrentMaxID) params:params]; } - (NSDictionary *)readAttributeDcPowerWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcPowerID) params:params]; } - (NSDictionary *)readAttributeDcPowerMinWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcPowerMinID) params:params]; } - (NSDictionary *)readAttributeDcPowerMaxWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcPowerMaxID) params:params]; } - (NSDictionary *)readAttributeDcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcVoltageMultiplierID) params:params]; } - (NSDictionary *)readAttributeDcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcVoltageDivisorID) params:params]; } - (NSDictionary *)readAttributeDcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcCurrentMultiplierID) params:params]; } - (NSDictionary *)readAttributeDcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcCurrentDivisorID) params:params]; } - (NSDictionary *)readAttributeDcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcPowerMultiplierID) params:params]; } - (NSDictionary *)readAttributeDcPowerDivisorWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeDcPowerDivisorID) params:params]; } - (NSDictionary *)readAttributeAcFrequencyWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcFrequencyID) params:params]; } - (NSDictionary *)readAttributeAcFrequencyMinWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcFrequencyMinID) params:params]; } - (NSDictionary *)readAttributeAcFrequencyMaxWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcFrequencyMaxID) params:params]; } - (NSDictionary *)readAttributeNeutralCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeNeutralCurrentID) params:params]; } - (NSDictionary *)readAttributeTotalActivePowerWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeTotalActivePowerID) params:params]; } - (NSDictionary *)readAttributeTotalReactivePowerWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeTotalReactivePowerID) params:params]; } - (NSDictionary *)readAttributeTotalApparentPowerWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeTotalApparentPowerID) params:params]; } - (NSDictionary *)readAttributeMeasured1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID) + params:params]; } - (NSDictionary *)readAttributeMeasured3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID) + params:params]; } - (NSDictionary *)readAttributeMeasured5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID) + params:params]; } - (NSDictionary *)readAttributeMeasured7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID) + params:params]; } - (NSDictionary *)readAttributeMeasured9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID) + params:params]; } - (NSDictionary *)readAttributeMeasured11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID) + params:params]; } - (NSDictionary *)readAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID) + params:params]; } - (NSDictionary *)readAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID) + params:params]; } - (NSDictionary *)readAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID) + params:params]; } - (NSDictionary *)readAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID) + params:params]; } - (NSDictionary *)readAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID) + params:params]; } - (NSDictionary *)readAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID) + params:params]; } - (NSDictionary *)readAttributeAcFrequencyMultiplierWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcFrequencyMultiplierID) + params:params]; } - (NSDictionary *)readAttributeAcFrequencyDivisorWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcFrequencyDivisorID) params:params]; } - (NSDictionary *)readAttributePowerMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributePowerMultiplierID) params:params]; } - (NSDictionary *)readAttributePowerDivisorWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributePowerDivisorID) params:params]; } - (NSDictionary *)readAttributeHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID) + params:params]; } - (NSDictionary *)readAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID) + params:params]; } - (NSDictionary *)readAttributeInstantaneousVoltageWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeInstantaneousVoltageID) params:params]; } - (NSDictionary *)readAttributeInstantaneousLineCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeInstantaneousLineCurrentID) + params:params]; } - (NSDictionary *)readAttributeInstantaneousActiveCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID) + params:params]; } - (NSDictionary *)readAttributeInstantaneousReactiveCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID) + params:params]; } - (NSDictionary *)readAttributeInstantaneousPowerWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeInstantaneousPowerID) params:params]; } - (NSDictionary *)readAttributeRmsVoltageWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageID) params:params]; } - (NSDictionary *)readAttributeRmsVoltageMinWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageMinID) params:params]; } - (NSDictionary *)readAttributeRmsVoltageMaxWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageMaxID) params:params]; } - (NSDictionary *)readAttributeRmsCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsCurrentID) params:params]; } - (NSDictionary *)readAttributeRmsCurrentMinWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsCurrentMinID) params:params]; } - (NSDictionary *)readAttributeRmsCurrentMaxWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsCurrentMaxID) params:params]; } - (NSDictionary *)readAttributeActivePowerWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeActivePowerID) params:params]; } - (NSDictionary *)readAttributeActivePowerMinWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeActivePowerMinID) params:params]; } - (NSDictionary *)readAttributeActivePowerMaxWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeActivePowerMaxID) params:params]; } - (NSDictionary *)readAttributeReactivePowerWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeReactivePowerID) params:params]; } - (NSDictionary *)readAttributeApparentPowerWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeApparentPowerID) params:params]; } - (NSDictionary *)readAttributePowerFactorWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributePowerFactorID) params:params]; } - (NSDictionary *)readAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) + params:params]; } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary *)dataValueDictionary @@ -17673,22 +17579,20 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary< { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary *)readAttributeAverageRmsUnderVoltageCounterWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID) + params:params]; } - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)dataValueDictionary @@ -17704,22 +17608,20 @@ - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID) + params:params]; } - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary @@ -17735,22 +17637,20 @@ - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID) + params:params]; } - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary @@ -17766,20 +17666,19 @@ - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)readAttributeRmsVoltageSagPeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) params:params]; } @@ -17795,8 +17694,8 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -17804,11 +17703,10 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeRmsVoltageSwellPeriodWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID) + params:params]; } - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)dataValueDictionary @@ -17825,8 +17723,8 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcVoltageMultiplierID) params:params]; } - (NSDictionary *)readAttributeAcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcVoltageDivisorID) params:params]; } - (NSDictionary *)readAttributeAcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcCurrentMultiplierID) params:params]; } - (NSDictionary *)readAttributeAcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcCurrentDivisorID) params:params]; } - (NSDictionary *)readAttributeAcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcPowerMultiplierID) params:params]; } - (NSDictionary *)readAttributeAcPowerDivisorWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcPowerDivisorID) params:params]; } - (NSDictionary *)readAttributeOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) params:params]; } @@ -17900,8 +17798,8 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -17910,24 +17808,24 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary - (NSDictionary *)readAttributeVoltageOverloadWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeVoltageOverloadID) params:params]; } - (NSDictionary *)readAttributeCurrentOverloadWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeCurrentOverloadID) params:params]; } - (NSDictionary *)readAttributeAcOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID) params:params]; } @@ -17943,8 +17841,8 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcVoltageOverloadWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcVoltageOverloadID) params:params]; } - (NSDictionary *)readAttributeAcCurrentOverloadWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcCurrentOverloadID) params:params]; } - (NSDictionary *)readAttributeAcActivePowerOverloadWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcActivePowerOverloadID) + params:params]; } - (NSDictionary *)readAttributeAcReactivePowerOverloadWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcReactivePowerOverloadID) + params:params]; } - (NSDictionary *)readAttributeAverageRmsOverVoltageWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageID) + params:params]; } - (NSDictionary *)readAttributeAverageRmsUnderVoltageWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID) + params:params]; } - (NSDictionary *)readAttributeRmsExtremeOverVoltageWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID) + params:params]; } - (NSDictionary *)readAttributeRmsExtremeUnderVoltageWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID) + params:params]; } - (NSDictionary *)readAttributeRmsVoltageSagWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageSagID) params:params]; } - (NSDictionary *)readAttributeRmsVoltageSwellWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageSwellID) params:params]; } - (NSDictionary *)readAttributeLineCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeLineCurrentPhaseBID) params:params]; } - (NSDictionary *)readAttributeActiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeActiveCurrentPhaseBID) params:params]; } - (NSDictionary *)readAttributeReactiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID) + params:params]; } - (NSDictionary *)readAttributeRmsVoltagePhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltagePhaseBID) params:params]; } - (NSDictionary *)readAttributeRmsVoltageMinPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID) params:params]; } - (NSDictionary *)readAttributeRmsVoltageMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID) params:params]; } - (NSDictionary *)readAttributeRmsCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsCurrentPhaseBID) params:params]; } - (NSDictionary *)readAttributeRmsCurrentMinPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID) params:params]; } - (NSDictionary *)readAttributeRmsCurrentMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID) params:params]; } - (NSDictionary *)readAttributeActivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeActivePowerPhaseBID) params:params]; } - (NSDictionary *)readAttributeActivePowerMinPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeActivePowerMinPhaseBID) params:params]; } - (NSDictionary *)readAttributeActivePowerMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID) params:params]; } - (NSDictionary *)readAttributeReactivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeReactivePowerPhaseBID) params:params]; } - (NSDictionary *)readAttributeApparentPowerPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeApparentPowerPhaseBID) params:params]; } - (NSDictionary *)readAttributePowerFactorPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributePowerFactorPhaseBID) params:params]; } @@ -18161,184 +18052,176 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID) + params:params]; } - (NSDictionary *)readAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID) + params:params]; } - (NSDictionary *)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID) + params:params]; } - (NSDictionary *)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID) + params:params]; } - (NSDictionary *)readAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID) + params:params]; } - (NSDictionary *)readAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID) + params:params]; } - (NSDictionary *)readAttributeLineCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeLineCurrentPhaseCID) params:params]; } - (NSDictionary *)readAttributeActiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeActiveCurrentPhaseCID) params:params]; } - (NSDictionary *)readAttributeReactiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID) + params:params]; } - (NSDictionary *)readAttributeRmsVoltagePhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltagePhaseCID) params:params]; } - (NSDictionary *)readAttributeRmsVoltageMinPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID) params:params]; } - (NSDictionary *)readAttributeRmsVoltageMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID) params:params]; } - (NSDictionary *)readAttributeRmsCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsCurrentPhaseCID) params:params]; } - (NSDictionary *)readAttributeRmsCurrentMinPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID) params:params]; } - (NSDictionary *)readAttributeRmsCurrentMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID) params:params]; } - (NSDictionary *)readAttributeActivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeActivePowerPhaseCID) params:params]; } - (NSDictionary *)readAttributeActivePowerMinPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeActivePowerMinPhaseCID) params:params]; } - (NSDictionary *)readAttributeActivePowerMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID) params:params]; } - (NSDictionary *)readAttributeReactivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeReactivePowerPhaseCID) params:params]; } - (NSDictionary *)readAttributeApparentPowerPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeApparentPowerPhaseCID) params:params]; } - (NSDictionary *)readAttributePowerFactorPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributePowerFactorPhaseCID) params:params]; } @@ -18346,103 +18229,96 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID) + params:params]; } - (NSDictionary *)readAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID) + params:params]; } - (NSDictionary *)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID) + params:params]; } - (NSDictionary *)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID) + params:params]; } - (NSDictionary *)readAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID) + params:params]; } - (NSDictionary *)readAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID) + params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID) + clusterID:@(MTRClusterElectricalMeasurementID) + attributeID:@(MTRClusterElectricalMeasurementAttributeClusterRevisionID) params:params]; } @@ -18450,14 +18326,14 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { - [self testWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self testWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; } - (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -18480,7 +18359,7 @@ - (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -18503,17 +18382,17 @@ new MTRCommandSuccessCallbackBridge( - (void)testNotHandledWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self testNotHandledWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -18521,7 +18400,7 @@ - (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _N new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -18544,24 +18423,24 @@ new MTRCommandSuccessCallbackBridge( - (void)testSpecificWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { [self testSpecificWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18583,17 +18462,17 @@ new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, - (void)testUnknownCommandWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self testUnknownCommandWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -18601,7 +18480,7 @@ - (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandPar new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -18625,13 +18504,13 @@ new MTRCommandSuccessCallbackBridge( - (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18656,13 +18535,13 @@ new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQue - (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18686,14 +18565,14 @@ new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQ - (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18926,13 +18805,13 @@ new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.call - (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18963,13 +18842,13 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseD - (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19002,13 +18881,13 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseD - (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19062,13 +18941,13 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseD - (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19113,13 +18992,13 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseD - (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19250,13 +19129,13 @@ - (void)testListNestedStructListArgumentRequestWithParams: (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19411,13 +19290,13 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseD - (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19462,13 +19341,13 @@ new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbac - (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19493,13 +19372,13 @@ new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, bas - (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19533,15 +19412,14 @@ new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbac - (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)( - MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler: + (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19733,13 +19611,13 @@ new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self. - (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19769,17 +19647,17 @@ new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, - (void)timedInvokeRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { [self timedInvokeRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completion:completion]; + completionHandler:completionHandler]; } - (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -19787,7 +19665,7 @@ - (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestPar new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -19814,7 +19692,7 @@ new MTRCommandSuccessCallbackBridge( - (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion + completionHandler:(StatusCompletion)completionHandler { // Make a copy of params before we go async. params = [params copy]; @@ -19822,7 +19700,7 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSi new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completion(error); + completionHandler(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -19852,13 +19730,13 @@ new MTRCommandSuccessCallbackBridge( - (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, - NSError * _Nullable error))completion + completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19881,19 +19759,18 @@ new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQu [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; } -- (void) - testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion: - (void (^)( - MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler: + (void (^)( + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { // Make a copy of params before we go async. params = [params copy]; MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(self.callbackQueue, baseDevice, completion, + new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19917,8 +19794,8 @@ new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(sel - (NSDictionary *)readAttributeBooleanWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeBooleanID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeBooleanID) params:params]; } @@ -19934,8 +19811,8 @@ - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValue NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeBooleanID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -19944,8 +19821,8 @@ - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeBitmap8WithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeBitmap8ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeBitmap8ID) params:params]; } @@ -19961,8 +19838,8 @@ - (void)writeAttributeBitmap8WithValue:(NSDictionary *)dataValue NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeBitmap8ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeBitmap8ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -19971,8 +19848,8 @@ - (void)writeAttributeBitmap8WithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeBitmap16WithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeBitmap16ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeBitmap16ID) params:params]; } @@ -19988,8 +19865,8 @@ - (void)writeAttributeBitmap16WithValue:(NSDictionary *)dataValu NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeBitmap16ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeBitmap16ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -19998,8 +19875,8 @@ - (void)writeAttributeBitmap16WithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeBitmap32WithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeBitmap32ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeBitmap32ID) params:params]; } @@ -20015,8 +19892,8 @@ - (void)writeAttributeBitmap32WithValue:(NSDictionary *)dataValu NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeBitmap32ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeBitmap32ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20025,8 +19902,8 @@ - (void)writeAttributeBitmap32WithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeBitmap64WithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeBitmap64ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeBitmap64ID) params:params]; } @@ -20042,8 +19919,8 @@ - (void)writeAttributeBitmap64WithValue:(NSDictionary *)dataValu NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeBitmap64ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeBitmap64ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20052,8 +19929,8 @@ - (void)writeAttributeBitmap64WithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeInt8uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt8uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt8uID) params:params]; } @@ -20069,8 +19946,8 @@ - (void)writeAttributeInt8uWithValue:(NSDictionary *)dataValueDi NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt8uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20079,8 +19956,8 @@ - (void)writeAttributeInt8uWithValue:(NSDictionary *)dataValueDi - (NSDictionary *)readAttributeInt16uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt16uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt16uID) params:params]; } @@ -20096,8 +19973,8 @@ - (void)writeAttributeInt16uWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt16uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt16uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20106,8 +19983,8 @@ - (void)writeAttributeInt16uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt24uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt24uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt24uID) params:params]; } @@ -20123,8 +20000,8 @@ - (void)writeAttributeInt24uWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt24uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt24uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20133,8 +20010,8 @@ - (void)writeAttributeInt24uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt32uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt32uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt32uID) params:params]; } @@ -20150,8 +20027,8 @@ - (void)writeAttributeInt32uWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt32uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt32uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20160,8 +20037,8 @@ - (void)writeAttributeInt32uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt40uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt40uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt40uID) params:params]; } @@ -20177,8 +20054,8 @@ - (void)writeAttributeInt40uWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt40uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt40uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20187,8 +20064,8 @@ - (void)writeAttributeInt40uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt48uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt48uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt48uID) params:params]; } @@ -20204,8 +20081,8 @@ - (void)writeAttributeInt48uWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt48uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt48uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20214,8 +20091,8 @@ - (void)writeAttributeInt48uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt56uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt56uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt56uID) params:params]; } @@ -20231,8 +20108,8 @@ - (void)writeAttributeInt56uWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt56uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt56uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20241,8 +20118,8 @@ - (void)writeAttributeInt56uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt64uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt64uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt64uID) params:params]; } @@ -20258,8 +20135,8 @@ - (void)writeAttributeInt64uWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt64uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt64uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20268,8 +20145,8 @@ - (void)writeAttributeInt64uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt8sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt8sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt8sID) params:params]; } @@ -20285,8 +20162,8 @@ - (void)writeAttributeInt8sWithValue:(NSDictionary *)dataValueDi NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt8sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt8sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20295,8 +20172,8 @@ - (void)writeAttributeInt8sWithValue:(NSDictionary *)dataValueDi - (NSDictionary *)readAttributeInt16sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt16sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt16sID) params:params]; } @@ -20312,8 +20189,8 @@ - (void)writeAttributeInt16sWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt16sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt16sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20322,8 +20199,8 @@ - (void)writeAttributeInt16sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt24sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt24sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt24sID) params:params]; } @@ -20339,8 +20216,8 @@ - (void)writeAttributeInt24sWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt24sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt24sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20349,8 +20226,8 @@ - (void)writeAttributeInt24sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt32sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt32sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt32sID) params:params]; } @@ -20366,8 +20243,8 @@ - (void)writeAttributeInt32sWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt32sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt32sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20376,8 +20253,8 @@ - (void)writeAttributeInt32sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt40sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt40sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt40sID) params:params]; } @@ -20393,8 +20270,8 @@ - (void)writeAttributeInt40sWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt40sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt40sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20403,8 +20280,8 @@ - (void)writeAttributeInt40sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt48sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt48sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt48sID) params:params]; } @@ -20420,8 +20297,8 @@ - (void)writeAttributeInt48sWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt48sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt48sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20430,8 +20307,8 @@ - (void)writeAttributeInt48sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt56sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt56sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt56sID) params:params]; } @@ -20447,8 +20324,8 @@ - (void)writeAttributeInt56sWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt56sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt56sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20457,8 +20334,8 @@ - (void)writeAttributeInt56sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt64sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt64sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt64sID) params:params]; } @@ -20474,8 +20351,8 @@ - (void)writeAttributeInt64sWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeInt64sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeInt64sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20484,8 +20361,8 @@ - (void)writeAttributeInt64sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEnum8WithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeEnum8ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeEnum8ID) params:params]; } @@ -20501,8 +20378,8 @@ - (void)writeAttributeEnum8WithValue:(NSDictionary *)dataValueDi NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeEnum8ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeEnum8ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20511,8 +20388,8 @@ - (void)writeAttributeEnum8WithValue:(NSDictionary *)dataValueDi - (NSDictionary *)readAttributeEnum16WithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeEnum16ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeEnum16ID) params:params]; } @@ -20528,8 +20405,8 @@ - (void)writeAttributeEnum16WithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeEnum16ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeEnum16ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20538,8 +20415,8 @@ - (void)writeAttributeEnum16WithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFloatSingleWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeFloatSingleID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeFloatSingleID) params:params]; } @@ -20555,8 +20432,8 @@ - (void)writeAttributeFloatSingleWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeFloatSingleID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeFloatSingleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20565,8 +20442,8 @@ - (void)writeAttributeFloatSingleWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFloatDoubleWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeFloatDoubleID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeFloatDoubleID) params:params]; } @@ -20582,8 +20459,8 @@ - (void)writeAttributeFloatDoubleWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeFloatDoubleID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeFloatDoubleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20592,8 +20469,8 @@ - (void)writeAttributeFloatDoubleWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOctetStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeOctetStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeOctetStringID) params:params]; } @@ -20609,8 +20486,8 @@ - (void)writeAttributeOctetStringWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeOctetStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20619,8 +20496,8 @@ - (void)writeAttributeOctetStringWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeListInt8uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeListInt8uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeListInt8uID) params:params]; } @@ -20636,8 +20513,8 @@ - (void)writeAttributeListInt8uWithValue:(NSDictionary *)dataVal NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeListInt8uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeListInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20646,8 +20523,8 @@ - (void)writeAttributeListInt8uWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeListOctetStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeListOctetStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeListOctetStringID) params:params]; } @@ -20663,8 +20540,8 @@ - (void)writeAttributeListOctetStringWithValue:(NSDictionary *)d NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeListOctetStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeListOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20673,8 +20550,8 @@ - (void)writeAttributeListOctetStringWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeListStructOctetStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeListStructOctetStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeListStructOctetStringID) params:params]; } @@ -20692,8 +20569,8 @@ - (void)writeAttributeListStructOctetStringWithValue:(NSDictionary *)readAttributeLongOctetStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeLongOctetStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeLongOctetStringID) params:params]; } @@ -20719,8 +20596,8 @@ - (void)writeAttributeLongOctetStringWithValue:(NSDictionary *)d NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeLongOctetStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeLongOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20729,8 +20606,8 @@ - (void)writeAttributeLongOctetStringWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeCharStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeCharStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeCharStringID) params:params]; } @@ -20746,8 +20623,8 @@ - (void)writeAttributeCharStringWithValue:(NSDictionary *)dataVa NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeCharStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeCharStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20756,8 +20633,8 @@ - (void)writeAttributeCharStringWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeLongCharStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeLongCharStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeLongCharStringID) params:params]; } @@ -20773,8 +20650,8 @@ - (void)writeAttributeLongCharStringWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeLongCharStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeLongCharStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20783,8 +20660,8 @@ - (void)writeAttributeLongCharStringWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeEpochUsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeEpochUsID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeEpochUsID) params:params]; } @@ -20800,8 +20677,8 @@ - (void)writeAttributeEpochUsWithValue:(NSDictionary *)dataValue NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeEpochUsID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeEpochUsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20810,8 +20687,8 @@ - (void)writeAttributeEpochUsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeEpochSWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeEpochSID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeEpochSID) params:params]; } @@ -20827,8 +20704,8 @@ - (void)writeAttributeEpochSWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeEpochSID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeEpochSID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20837,8 +20714,8 @@ - (void)writeAttributeEpochSWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeVendorIdWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeVendorIdID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeVendorIdID) params:params]; } @@ -20854,8 +20731,8 @@ - (void)writeAttributeVendorIdWithValue:(NSDictionary *)dataValu NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeVendorIdID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeVendorIdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20863,11 +20740,10 @@ - (void)writeAttributeVendorIdWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeListNullablesAndOptionalsStructWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeListNullablesAndOptionalsStructID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeListNullablesAndOptionalsStructID) + params:params]; } - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSDictionary *)dataValueDictionary @@ -20884,8 +20760,8 @@ - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSDictionary *)readAttributeEnumAttrWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeEnumAttrID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeEnumAttrID) params:params]; } @@ -20911,8 +20787,8 @@ - (void)writeAttributeEnumAttrWithValue:(NSDictionary *)dataValu NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeEnumAttrID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeEnumAttrID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20921,8 +20797,8 @@ - (void)writeAttributeEnumAttrWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeStructAttrWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeStructAttrID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeStructAttrID) params:params]; } @@ -20938,8 +20814,8 @@ - (void)writeAttributeStructAttrWithValue:(NSDictionary *)dataVa NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeStructAttrID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeStructAttrID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -20948,8 +20824,8 @@ - (void)writeAttributeStructAttrWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeRangeRestrictedInt8uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeRangeRestrictedInt8uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeRangeRestrictedInt8uID) params:params]; } @@ -20965,8 +20841,8 @@ - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSDictionary *)readAttributeRangeRestrictedInt8sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeRangeRestrictedInt8sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeRangeRestrictedInt8sID) params:params]; } @@ -20992,8 +20868,8 @@ - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSDictionary *)readAttributeRangeRestrictedInt16uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeRangeRestrictedInt16uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeRangeRestrictedInt16uID) params:params]; } @@ -21021,8 +20897,8 @@ - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSDictionary *)readAttributeRangeRestrictedInt16sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeRangeRestrictedInt16sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeRangeRestrictedInt16sID) params:params]; } @@ -21050,8 +20926,8 @@ - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSDictionary *)readAttributeListLongOctetStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeListLongOctetStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeListLongOctetStringID) params:params]; } @@ -21077,8 +20953,8 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeListLongOctetStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeListLongOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21087,8 +20963,8 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSDictionary - (NSDictionary *)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeListFabricScopedID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeListFabricScopedID) params:params]; } @@ -21104,8 +20980,8 @@ - (void)writeAttributeListFabricScopedWithValue:(NSDictionary *) NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeListFabricScopedID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeListFabricScopedID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21114,8 +20990,8 @@ - (void)writeAttributeListFabricScopedWithValue:(NSDictionary *) - (NSDictionary *)readAttributeTimedWriteBooleanWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeTimedWriteBooleanID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeTimedWriteBooleanID) params:params]; } @@ -21131,8 +21007,8 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSDictionary * NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeTimedWriteBooleanID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeTimedWriteBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21141,8 +21017,8 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSDictionary * - (NSDictionary *)readAttributeGeneralErrorBooleanWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeGeneralErrorBooleanID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeGeneralErrorBooleanID) params:params]; } @@ -21158,8 +21034,8 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeGeneralErrorBooleanID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeGeneralErrorBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21168,8 +21044,8 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterErrorBooleanWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeClusterErrorBooleanID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeClusterErrorBooleanID) params:params]; } @@ -21185,8 +21061,8 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeClusterErrorBooleanID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeClusterErrorBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21195,8 +21071,8 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSDictionary - (NSDictionary *)readAttributeUnsupportedWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeUnsupportedID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeUnsupportedID) params:params]; } @@ -21212,8 +21088,8 @@ - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeUnsupportedID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeUnsupportedID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21222,8 +21098,8 @@ - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeNullableBooleanWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableBooleanID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableBooleanID) params:params]; } @@ -21239,8 +21115,8 @@ - (void)writeAttributeNullableBooleanWithValue:(NSDictionary *)d NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableBooleanID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableBooleanID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21249,8 +21125,8 @@ - (void)writeAttributeNullableBooleanWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeNullableBitmap8WithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableBitmap8ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableBitmap8ID) params:params]; } @@ -21266,8 +21142,8 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSDictionary *)d NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableBitmap8ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableBitmap8ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21276,8 +21152,8 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSDictionary *)d - (NSDictionary *)readAttributeNullableBitmap16WithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableBitmap16ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableBitmap16ID) params:params]; } @@ -21293,8 +21169,8 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSDictionary *) NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableBitmap16ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableBitmap16ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21303,8 +21179,8 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableBitmap32WithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableBitmap32ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableBitmap32ID) params:params]; } @@ -21320,8 +21196,8 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSDictionary *) NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableBitmap32ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableBitmap32ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21330,8 +21206,8 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableBitmap64WithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableBitmap64ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableBitmap64ID) params:params]; } @@ -21347,8 +21223,8 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSDictionary *) NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableBitmap64ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableBitmap64ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21357,8 +21233,8 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableInt8uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt8uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt8uID) params:params]; } @@ -21374,8 +21250,8 @@ - (void)writeAttributeNullableInt8uWithValue:(NSDictionary *)dat NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt8uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21384,8 +21260,8 @@ - (void)writeAttributeNullableInt8uWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeNullableInt16uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt16uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt16uID) params:params]; } @@ -21401,8 +21277,8 @@ - (void)writeAttributeNullableInt16uWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt16uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt16uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21411,8 +21287,8 @@ - (void)writeAttributeNullableInt16uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt24uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt24uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt24uID) params:params]; } @@ -21428,8 +21304,8 @@ - (void)writeAttributeNullableInt24uWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt24uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt24uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21438,8 +21314,8 @@ - (void)writeAttributeNullableInt24uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt32uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt32uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt32uID) params:params]; } @@ -21455,8 +21331,8 @@ - (void)writeAttributeNullableInt32uWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt32uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt32uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21465,8 +21341,8 @@ - (void)writeAttributeNullableInt32uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt40uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt40uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt40uID) params:params]; } @@ -21482,8 +21358,8 @@ - (void)writeAttributeNullableInt40uWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt40uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt40uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21492,8 +21368,8 @@ - (void)writeAttributeNullableInt40uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt48uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt48uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt48uID) params:params]; } @@ -21509,8 +21385,8 @@ - (void)writeAttributeNullableInt48uWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt48uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt48uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21519,8 +21395,8 @@ - (void)writeAttributeNullableInt48uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt56uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt56uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt56uID) params:params]; } @@ -21536,8 +21412,8 @@ - (void)writeAttributeNullableInt56uWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt56uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt56uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21546,8 +21422,8 @@ - (void)writeAttributeNullableInt56uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt64uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt64uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt64uID) params:params]; } @@ -21563,8 +21439,8 @@ - (void)writeAttributeNullableInt64uWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt64uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt64uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21573,8 +21449,8 @@ - (void)writeAttributeNullableInt64uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt8sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt8sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt8sID) params:params]; } @@ -21590,8 +21466,8 @@ - (void)writeAttributeNullableInt8sWithValue:(NSDictionary *)dat NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt8sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt8sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21600,8 +21476,8 @@ - (void)writeAttributeNullableInt8sWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeNullableInt16sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt16sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt16sID) params:params]; } @@ -21617,8 +21493,8 @@ - (void)writeAttributeNullableInt16sWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt16sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt16sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21627,8 +21503,8 @@ - (void)writeAttributeNullableInt16sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt24sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt24sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt24sID) params:params]; } @@ -21644,8 +21520,8 @@ - (void)writeAttributeNullableInt24sWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt24sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt24sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21654,8 +21530,8 @@ - (void)writeAttributeNullableInt24sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt32sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt32sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt32sID) params:params]; } @@ -21671,8 +21547,8 @@ - (void)writeAttributeNullableInt32sWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt32sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt32sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21681,8 +21557,8 @@ - (void)writeAttributeNullableInt32sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt40sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt40sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt40sID) params:params]; } @@ -21698,8 +21574,8 @@ - (void)writeAttributeNullableInt40sWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt40sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt40sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21708,8 +21584,8 @@ - (void)writeAttributeNullableInt40sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt48sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt48sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt48sID) params:params]; } @@ -21725,8 +21601,8 @@ - (void)writeAttributeNullableInt48sWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt48sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt48sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21735,8 +21611,8 @@ - (void)writeAttributeNullableInt48sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt56sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt56sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt56sID) params:params]; } @@ -21752,8 +21628,8 @@ - (void)writeAttributeNullableInt56sWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt56sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt56sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21762,8 +21638,8 @@ - (void)writeAttributeNullableInt56sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt64sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt64sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt64sID) params:params]; } @@ -21779,8 +21655,8 @@ - (void)writeAttributeNullableInt64sWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableInt64sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableInt64sID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21789,8 +21665,8 @@ - (void)writeAttributeNullableInt64sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableEnum8WithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableEnum8ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableEnum8ID) params:params]; } @@ -21806,8 +21682,8 @@ - (void)writeAttributeNullableEnum8WithValue:(NSDictionary *)dat NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableEnum8ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableEnum8ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21816,8 +21692,8 @@ - (void)writeAttributeNullableEnum8WithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeNullableEnum16WithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableEnum16ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableEnum16ID) params:params]; } @@ -21833,8 +21709,8 @@ - (void)writeAttributeNullableEnum16WithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableEnum16ID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableEnum16ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21843,8 +21719,8 @@ - (void)writeAttributeNullableEnum16WithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableFloatSingleWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableFloatSingleID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableFloatSingleID) params:params]; } @@ -21860,8 +21736,8 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableFloatSingleID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableFloatSingleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21870,8 +21746,8 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableFloatDoubleWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableFloatDoubleID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableFloatDoubleID) params:params]; } @@ -21887,8 +21763,8 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableFloatDoubleID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableFloatDoubleID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21897,8 +21773,8 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableOctetStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableOctetStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableOctetStringID) params:params]; } @@ -21914,8 +21790,8 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableOctetStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableOctetStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21924,8 +21800,8 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableCharStringWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableCharStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableCharStringID) params:params]; } @@ -21941,8 +21817,8 @@ - (void)writeAttributeNullableCharStringWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableCharStringID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableCharStringID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21951,8 +21827,8 @@ - (void)writeAttributeNullableCharStringWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableEnumAttrWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableEnumAttrID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableEnumAttrID) params:params]; } @@ -21968,8 +21844,8 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSDictionary *) NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableEnumAttrID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableEnumAttrID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -21978,8 +21854,8 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableStructWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableStructID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableStructID) params:params]; } @@ -21995,8 +21871,8 @@ - (void)writeAttributeNullableStructWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableStructID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableStructID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -22005,8 +21881,8 @@ - (void)writeAttributeNullableStructWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableRangeRestrictedInt8uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableRangeRestrictedInt8uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableRangeRestrictedInt8uID) params:params]; } @@ -22024,8 +21900,8 @@ - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSDictionary *)readAttributeNullableRangeRestrictedInt8sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableRangeRestrictedInt8sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableRangeRestrictedInt8sID) params:params]; } @@ -22053,8 +21929,8 @@ - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSDictionary *)readAttributeNullableRangeRestrictedInt16uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableRangeRestrictedInt16uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableRangeRestrictedInt16uID) params:params]; } @@ -22082,8 +21958,8 @@ - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSDictionary *)readAttributeNullableRangeRestrictedInt16sWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeNullableRangeRestrictedInt16sID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeNullableRangeRestrictedInt16sID) params:params]; } @@ -22111,8 +21987,8 @@ - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSDictionary *)readAttributeWriteOnlyInt8uWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeWriteOnlyInt8uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeWriteOnlyInt8uID) params:params]; } @@ -22138,8 +22014,8 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeWriteOnlyInt8uID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeWriteOnlyInt8uID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; @@ -22148,40 +22024,40 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeGeneratedCommandListID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeAcceptedCommandListID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeAttributeListID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeFeatureMapID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTestClusterID) - attributeID:@(MTRAttributeIDTypeClusterTestClusterAttributeClusterRevisionID) + clusterID:@(MTRClusterTestClusterID) + attributeID:@(MTRClusterTestClusterAttributeClusterRevisionID) params:params]; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc_internal.h new file mode 100644 index 00000000000000..8cc50fd91dcb27 --- /dev/null +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc_internal.h @@ -0,0 +1,406 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#import + +#import "MTRDevice.h" + +@interface MTRIdentify () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::IdentifyCluster * cppCluster; +- (chip::Controller::IdentifyCluster **)cppClusterSlot; +@end + +@interface MTRGroups () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::GroupsCluster * cppCluster; +- (chip::Controller::GroupsCluster **)cppClusterSlot; +@end + +@interface MTRScenes () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ScenesCluster * cppCluster; +- (chip::Controller::ScenesCluster **)cppClusterSlot; +@end + +@interface MTROnOff () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OnOffCluster * cppCluster; +- (chip::Controller::OnOffCluster **)cppClusterSlot; +@end + +@interface MTROnOffSwitchConfiguration () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OnOffSwitchConfigurationCluster * cppCluster; +- (chip::Controller::OnOffSwitchConfigurationCluster **)cppClusterSlot; +@end + +@interface MTRLevelControl () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::LevelControlCluster * cppCluster; +- (chip::Controller::LevelControlCluster **)cppClusterSlot; +@end + +@interface MTRBinaryInputBasic () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BinaryInputBasicCluster * cppCluster; +- (chip::Controller::BinaryInputBasicCluster **)cppClusterSlot; +@end + +@interface MTRDescriptor () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::DescriptorCluster * cppCluster; +- (chip::Controller::DescriptorCluster **)cppClusterSlot; +@end + +@interface MTRBinding () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BindingCluster * cppCluster; +- (chip::Controller::BindingCluster **)cppClusterSlot; +@end + +@interface MTRAccessControl () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::AccessControlCluster * cppCluster; +- (chip::Controller::AccessControlCluster **)cppClusterSlot; +@end + +@interface MTRActions () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ActionsCluster * cppCluster; +- (chip::Controller::ActionsCluster **)cppClusterSlot; +@end + +@interface MTRBasic () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BasicCluster * cppCluster; +- (chip::Controller::BasicCluster **)cppClusterSlot; +@end + +@interface MTROtaSoftwareUpdateProvider () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OtaSoftwareUpdateProviderCluster * cppCluster; +- (chip::Controller::OtaSoftwareUpdateProviderCluster **)cppClusterSlot; +@end + +@interface MTROtaSoftwareUpdateRequestor () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OtaSoftwareUpdateRequestorCluster * cppCluster; +- (chip::Controller::OtaSoftwareUpdateRequestorCluster **)cppClusterSlot; +@end + +@interface MTRLocalizationConfiguration () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::LocalizationConfigurationCluster * cppCluster; +- (chip::Controller::LocalizationConfigurationCluster **)cppClusterSlot; +@end + +@interface MTRTimeFormatLocalization () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::TimeFormatLocalizationCluster * cppCluster; +- (chip::Controller::TimeFormatLocalizationCluster **)cppClusterSlot; +@end + +@interface MTRUnitLocalization () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::UnitLocalizationCluster * cppCluster; +- (chip::Controller::UnitLocalizationCluster **)cppClusterSlot; +@end + +@interface MTRPowerSourceConfiguration () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::PowerSourceConfigurationCluster * cppCluster; +- (chip::Controller::PowerSourceConfigurationCluster **)cppClusterSlot; +@end + +@interface MTRPowerSource () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::PowerSourceCluster * cppCluster; +- (chip::Controller::PowerSourceCluster **)cppClusterSlot; +@end + +@interface MTRGeneralCommissioning () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::GeneralCommissioningCluster * cppCluster; +- (chip::Controller::GeneralCommissioningCluster **)cppClusterSlot; +@end + +@interface MTRNetworkCommissioning () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::NetworkCommissioningCluster * cppCluster; +- (chip::Controller::NetworkCommissioningCluster **)cppClusterSlot; +@end + +@interface MTRDiagnosticLogs () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::DiagnosticLogsCluster * cppCluster; +- (chip::Controller::DiagnosticLogsCluster **)cppClusterSlot; +@end + +@interface MTRGeneralDiagnostics () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::GeneralDiagnosticsCluster * cppCluster; +- (chip::Controller::GeneralDiagnosticsCluster **)cppClusterSlot; +@end + +@interface MTRSoftwareDiagnostics () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::SoftwareDiagnosticsCluster * cppCluster; +- (chip::Controller::SoftwareDiagnosticsCluster **)cppClusterSlot; +@end + +@interface MTRThreadNetworkDiagnostics () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ThreadNetworkDiagnosticsCluster * cppCluster; +- (chip::Controller::ThreadNetworkDiagnosticsCluster **)cppClusterSlot; +@end + +@interface MTRWiFiNetworkDiagnostics () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::WiFiNetworkDiagnosticsCluster * cppCluster; +- (chip::Controller::WiFiNetworkDiagnosticsCluster **)cppClusterSlot; +@end + +@interface MTREthernetNetworkDiagnostics () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::EthernetNetworkDiagnosticsCluster * cppCluster; +- (chip::Controller::EthernetNetworkDiagnosticsCluster **)cppClusterSlot; +@end + +@interface MTRBridgedDeviceBasic () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BridgedDeviceBasicCluster * cppCluster; +- (chip::Controller::BridgedDeviceBasicCluster **)cppClusterSlot; +@end + +@interface MTRSwitch () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::SwitchCluster * cppCluster; +- (chip::Controller::SwitchCluster **)cppClusterSlot; +@end + +@interface MTRAdministratorCommissioning () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::AdministratorCommissioningCluster * cppCluster; +- (chip::Controller::AdministratorCommissioningCluster **)cppClusterSlot; +@end + +@interface MTROperationalCredentials () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OperationalCredentialsCluster * cppCluster; +- (chip::Controller::OperationalCredentialsCluster **)cppClusterSlot; +@end + +@interface MTRGroupKeyManagement () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::GroupKeyManagementCluster * cppCluster; +- (chip::Controller::GroupKeyManagementCluster **)cppClusterSlot; +@end + +@interface MTRFixedLabel () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::FixedLabelCluster * cppCluster; +- (chip::Controller::FixedLabelCluster **)cppClusterSlot; +@end + +@interface MTRUserLabel () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::UserLabelCluster * cppCluster; +- (chip::Controller::UserLabelCluster **)cppClusterSlot; +@end + +@interface MTRBooleanState () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BooleanStateCluster * cppCluster; +- (chip::Controller::BooleanStateCluster **)cppClusterSlot; +@end + +@interface MTRModeSelect () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ModeSelectCluster * cppCluster; +- (chip::Controller::ModeSelectCluster **)cppClusterSlot; +@end + +@interface MTRDoorLock () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::DoorLockCluster * cppCluster; +- (chip::Controller::DoorLockCluster **)cppClusterSlot; +@end + +@interface MTRWindowCovering () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::WindowCoveringCluster * cppCluster; +- (chip::Controller::WindowCoveringCluster **)cppClusterSlot; +@end + +@interface MTRBarrierControl () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BarrierControlCluster * cppCluster; +- (chip::Controller::BarrierControlCluster **)cppClusterSlot; +@end + +@interface MTRPumpConfigurationAndControl () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::PumpConfigurationAndControlCluster * cppCluster; +- (chip::Controller::PumpConfigurationAndControlCluster **)cppClusterSlot; +@end + +@interface MTRThermostat () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ThermostatCluster * cppCluster; +- (chip::Controller::ThermostatCluster **)cppClusterSlot; +@end + +@interface MTRFanControl () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::FanControlCluster * cppCluster; +- (chip::Controller::FanControlCluster **)cppClusterSlot; +@end + +@interface MTRThermostatUserInterfaceConfiguration () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ThermostatUserInterfaceConfigurationCluster * cppCluster; +- (chip::Controller::ThermostatUserInterfaceConfigurationCluster **)cppClusterSlot; +@end + +@interface MTRColorControl () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ColorControlCluster * cppCluster; +- (chip::Controller::ColorControlCluster **)cppClusterSlot; +@end + +@interface MTRIlluminanceMeasurement () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::IlluminanceMeasurementCluster * cppCluster; +- (chip::Controller::IlluminanceMeasurementCluster **)cppClusterSlot; +@end + +@interface MTRTemperatureMeasurement () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::TemperatureMeasurementCluster * cppCluster; +- (chip::Controller::TemperatureMeasurementCluster **)cppClusterSlot; +@end + +@interface MTRPressureMeasurement () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::PressureMeasurementCluster * cppCluster; +- (chip::Controller::PressureMeasurementCluster **)cppClusterSlot; +@end + +@interface MTRFlowMeasurement () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::FlowMeasurementCluster * cppCluster; +- (chip::Controller::FlowMeasurementCluster **)cppClusterSlot; +@end + +@interface MTRRelativeHumidityMeasurement () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::RelativeHumidityMeasurementCluster * cppCluster; +- (chip::Controller::RelativeHumidityMeasurementCluster **)cppClusterSlot; +@end + +@interface MTROccupancySensing () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OccupancySensingCluster * cppCluster; +- (chip::Controller::OccupancySensingCluster **)cppClusterSlot; +@end + +@interface MTRWakeOnLan () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::WakeOnLanCluster * cppCluster; +- (chip::Controller::WakeOnLanCluster **)cppClusterSlot; +@end + +@interface MTRChannel () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ChannelCluster * cppCluster; +- (chip::Controller::ChannelCluster **)cppClusterSlot; +@end + +@interface MTRTargetNavigator () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::TargetNavigatorCluster * cppCluster; +- (chip::Controller::TargetNavigatorCluster **)cppClusterSlot; +@end + +@interface MTRMediaPlayback () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::MediaPlaybackCluster * cppCluster; +- (chip::Controller::MediaPlaybackCluster **)cppClusterSlot; +@end + +@interface MTRMediaInput () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::MediaInputCluster * cppCluster; +- (chip::Controller::MediaInputCluster **)cppClusterSlot; +@end + +@interface MTRLowPower () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::LowPowerCluster * cppCluster; +- (chip::Controller::LowPowerCluster **)cppClusterSlot; +@end + +@interface MTRKeypadInput () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::KeypadInputCluster * cppCluster; +- (chip::Controller::KeypadInputCluster **)cppClusterSlot; +@end + +@interface MTRContentLauncher () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ContentLauncherCluster * cppCluster; +- (chip::Controller::ContentLauncherCluster **)cppClusterSlot; +@end + +@interface MTRAudioOutput () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::AudioOutputCluster * cppCluster; +- (chip::Controller::AudioOutputCluster **)cppClusterSlot; +@end + +@interface MTRApplicationLauncher () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ApplicationLauncherCluster * cppCluster; +- (chip::Controller::ApplicationLauncherCluster **)cppClusterSlot; +@end + +@interface MTRApplicationBasic () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ApplicationBasicCluster * cppCluster; +- (chip::Controller::ApplicationBasicCluster **)cppClusterSlot; +@end + +@interface MTRAccountLogin () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::AccountLoginCluster * cppCluster; +- (chip::Controller::AccountLoginCluster **)cppClusterSlot; +@end + +@interface MTRElectricalMeasurement () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ElectricalMeasurementCluster * cppCluster; +- (chip::Controller::ElectricalMeasurementCluster **)cppClusterSlot; +@end + +@interface MTRTestCluster () +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::TestClusterCluster * cppCluster; +- (chip::Controller::TestClusterCluster **)cppClusterSlot; +@end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_internal.h index e12298084a5983..3bc39dea076933 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_internal.h @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import #import "MTRClusters.h" @@ -83,12 +85,12 @@ @property (nonatomic, readonly) MTRDevice * device; @end -@interface MTRClusterOTASoftwareUpdateProvider () +@interface MTRClusterOtaSoftwareUpdateProvider () @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end -@interface MTRClusterOTASoftwareUpdateRequestor () +@interface MTRClusterOtaSoftwareUpdateRequestor () @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @@ -278,7 +280,7 @@ @property (nonatomic, readonly) MTRDevice * device; @end -@interface MTRClusterWakeOnLAN () +@interface MTRClusterWakeOnLan () @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index ef4127f49cf49c..bdd49c7c83214c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import #import @@ -40,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRIdentifyClusterTriggerEffectParams : NSObject @@ -64,7 +66,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupsClusterAddGroupParams : NSObject @@ -88,7 +90,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupsClusterAddGroupResponseParams : NSObject @@ -112,7 +114,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupsClusterViewGroupParams : NSObject @@ -134,7 +136,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupsClusterViewGroupResponseParams : NSObject @@ -160,7 +162,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupsClusterGetGroupMembershipParams : NSObject @@ -182,7 +184,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupsClusterGetGroupMembershipResponseParams : NSObject @@ -206,7 +208,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupsClusterRemoveGroupParams : NSObject @@ -228,7 +230,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupsClusterRemoveGroupResponseParams : NSObject @@ -252,7 +254,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupsClusterRemoveAllGroupsParams : NSObject /** @@ -272,7 +274,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupsClusterAddGroupIfIdentifyingParams : NSObject @@ -296,7 +298,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterAddSceneParams : NSObject @@ -326,7 +328,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterAddSceneResponseParams : NSObject @@ -352,7 +354,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterViewSceneParams : NSObject @@ -376,7 +378,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterViewSceneResponseParams : NSObject @@ -408,7 +410,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterRemoveSceneParams : NSObject @@ -432,7 +434,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterRemoveSceneResponseParams : NSObject @@ -458,7 +460,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterRemoveAllScenesParams : NSObject @@ -480,7 +482,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterRemoveAllScenesResponseParams : NSObject @@ -504,7 +506,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterStoreSceneParams : NSObject @@ -528,7 +530,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterStoreSceneResponseParams : NSObject @@ -554,7 +556,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterRecallSceneParams : NSObject @@ -580,7 +582,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterGetSceneMembershipParams : NSObject @@ -602,7 +604,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterGetSceneMembershipResponseParams : NSObject @@ -630,7 +632,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterEnhancedAddSceneParams : NSObject @@ -660,7 +662,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterEnhancedAddSceneResponseParams : NSObject @@ -686,7 +688,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterEnhancedViewSceneParams : NSObject @@ -710,7 +712,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterEnhancedViewSceneResponseParams : NSObject @@ -742,7 +744,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterCopySceneParams : NSObject @@ -772,7 +774,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterCopySceneResponseParams : NSObject @@ -798,7 +800,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROnOffClusterOffParams : NSObject /** @@ -818,7 +820,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROnOffClusterOnParams : NSObject /** @@ -838,7 +840,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROnOffClusterToggleParams : NSObject /** @@ -858,7 +860,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROnOffClusterOffWithEffectParams : NSObject @@ -882,7 +884,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROnOffClusterOnWithRecallGlobalSceneParams : NSObject /** @@ -902,7 +904,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROnOffClusterOnWithTimedOffParams : NSObject @@ -928,7 +930,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRLevelControlClusterMoveToLevelParams : NSObject @@ -956,7 +958,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRLevelControlClusterMoveParams : NSObject @@ -984,7 +986,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRLevelControlClusterStepParams : NSObject @@ -1014,7 +1016,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRLevelControlClusterStopParams : NSObject @@ -1038,7 +1040,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRLevelControlClusterMoveToLevelWithOnOffParams : NSObject @@ -1066,7 +1068,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRLevelControlClusterMoveWithOnOffParams : NSObject @@ -1094,7 +1096,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRLevelControlClusterStepWithOnOffParams : NSObject @@ -1124,7 +1126,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRLevelControlClusterStopWithOnOffParams : NSObject @@ -1148,7 +1150,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRLevelControlClusterMoveToClosestFrequencyParams : NSObject @@ -1170,7 +1172,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterInstantActionParams : NSObject @@ -1194,7 +1196,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterInstantActionWithTransitionParams : NSObject @@ -1220,7 +1222,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterStartActionParams : NSObject @@ -1244,7 +1246,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterStartActionWithDurationParams : NSObject @@ -1270,7 +1272,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterStopActionParams : NSObject @@ -1294,7 +1296,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterPauseActionParams : NSObject @@ -1318,7 +1320,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterPauseActionWithDurationParams : NSObject @@ -1344,7 +1346,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterResumeActionParams : NSObject @@ -1368,7 +1370,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterEnableActionParams : NSObject @@ -1392,7 +1394,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterEnableActionWithDurationParams : NSObject @@ -1418,7 +1420,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterDisableActionParams : NSObject @@ -1442,7 +1444,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterDisableActionWithDurationParams : NSObject @@ -1468,7 +1470,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBasicClusterMfgSpecificPingParams : NSObject /** @@ -1488,9 +1490,9 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROTASoftwareUpdateProviderClusterQueryImageParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterQueryImageParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull vendorId; @@ -1524,9 +1526,9 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROTASoftwareUpdateProviderClusterQueryImageResponseParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status; @@ -1560,9 +1562,9 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams : NSObject @property (nonatomic, copy) NSData * _Nonnull updateToken; @@ -1584,9 +1586,9 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull action; @@ -1608,9 +1610,9 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams : NSObject @property (nonatomic, copy) NSData * _Nonnull updateToken; @@ -1632,9 +1634,9 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams : NSObject +@interface MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull providerNodeId; @@ -1662,7 +1664,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralCommissioningClusterArmFailSafeParams : NSObject @@ -1686,7 +1688,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralCommissioningClusterArmFailSafeResponseParams : NSObject @@ -1710,7 +1712,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralCommissioningClusterSetRegulatoryConfigParams : NSObject @@ -1736,7 +1738,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams : NSObject @@ -1760,7 +1762,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralCommissioningClusterCommissioningCompleteParams : NSObject /** @@ -1780,7 +1782,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralCommissioningClusterCommissioningCompleteResponseParams : NSObject @@ -1804,7 +1806,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRNetworkCommissioningClusterScanNetworksParams : NSObject @@ -1828,7 +1830,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRNetworkCommissioningClusterScanNetworksResponseParams : NSObject @@ -1856,7 +1858,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams : NSObject @@ -1882,7 +1884,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams : NSObject @@ -1906,7 +1908,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRNetworkCommissioningClusterRemoveNetworkParams : NSObject @@ -1930,7 +1932,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRNetworkCommissioningClusterNetworkConfigResponseParams : NSObject @@ -1956,7 +1958,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRNetworkCommissioningClusterConnectNetworkParams : NSObject @@ -1980,7 +1982,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRNetworkCommissioningClusterConnectNetworkResponseParams : NSObject @@ -2006,7 +2008,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRNetworkCommissioningClusterReorderNetworkParams : NSObject @@ -2032,7 +2034,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDiagnosticLogsClusterRetrieveLogsRequestParams : NSObject @@ -2058,7 +2060,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDiagnosticLogsClusterRetrieveLogsResponseParams : NSObject @@ -2086,7 +2088,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralDiagnosticsClusterTestEventTriggerParams : NSObject @@ -2110,7 +2112,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRSoftwareDiagnosticsClusterResetWatermarksParams : NSObject /** @@ -2130,7 +2132,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThreadNetworkDiagnosticsClusterResetCountsParams : NSObject /** @@ -2150,7 +2152,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRWiFiNetworkDiagnosticsClusterResetCountsParams : NSObject /** @@ -2170,7 +2172,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTREthernetNetworkDiagnosticsClusterResetCountsParams : NSObject /** @@ -2190,7 +2192,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTimeSynchronizationClusterSetUtcTimeParams : NSObject @@ -2216,7 +2218,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams : NSObject @@ -2246,7 +2248,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams : NSObject @@ -2268,7 +2270,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAdministratorCommissioningClusterRevokeCommissioningParams : NSObject /** @@ -2288,7 +2290,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterAttestationRequestParams : NSObject @@ -2310,7 +2312,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterAttestationResponseParams : NSObject @@ -2334,7 +2336,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterCertificateChainRequestParams : NSObject @@ -2356,7 +2358,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterCertificateChainResponseParams : NSObject @@ -2378,7 +2380,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterCSRRequestParams : NSObject @@ -2402,7 +2404,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterCSRResponseParams : NSObject @@ -2426,7 +2428,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterAddNOCParams : NSObject @@ -2456,7 +2458,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterUpdateNOCParams : NSObject @@ -2480,7 +2482,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterNOCResponseParams : NSObject @@ -2506,7 +2508,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterUpdateFabricLabelParams : NSObject @@ -2528,7 +2530,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterRemoveFabricParams : NSObject @@ -2550,7 +2552,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams : NSObject @@ -2572,7 +2574,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupKeyManagementClusterKeySetWriteParams : NSObject @@ -2594,7 +2596,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupKeyManagementClusterKeySetReadParams : NSObject @@ -2616,7 +2618,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupKeyManagementClusterKeySetReadResponseParams : NSObject @@ -2638,7 +2640,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupKeyManagementClusterKeySetRemoveParams : NSObject @@ -2660,7 +2662,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupKeyManagementClusterKeySetReadAllIndicesParams : NSObject @@ -2682,7 +2684,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams : NSObject @@ -2704,7 +2706,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRModeSelectClusterChangeToModeParams : NSObject @@ -2726,7 +2728,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterLockDoorParams : NSObject @@ -2748,7 +2750,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterUnlockDoorParams : NSObject @@ -2770,7 +2772,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterUnlockWithTimeoutParams : NSObject @@ -2794,7 +2796,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterSetWeekDayScheduleParams : NSObject @@ -2828,7 +2830,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterGetWeekDayScheduleParams : NSObject @@ -2852,7 +2854,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterGetWeekDayScheduleResponseParams : NSObject @@ -2888,7 +2890,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterClearWeekDayScheduleParams : NSObject @@ -2912,7 +2914,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterSetYearDayScheduleParams : NSObject @@ -2940,7 +2942,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterGetYearDayScheduleParams : NSObject @@ -2964,7 +2966,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterGetYearDayScheduleResponseParams : NSObject @@ -2994,7 +2996,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterClearYearDayScheduleParams : NSObject @@ -3018,7 +3020,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterSetHolidayScheduleParams : NSObject @@ -3046,7 +3048,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterGetHolidayScheduleParams : NSObject @@ -3068,7 +3070,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterGetHolidayScheduleResponseParams : NSObject @@ -3098,7 +3100,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterClearHolidayScheduleParams : NSObject @@ -3120,7 +3122,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterSetUserParams : NSObject @@ -3154,7 +3156,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterGetUserParams : NSObject @@ -3176,7 +3178,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterGetUserResponseParams : NSObject @@ -3216,7 +3218,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterClearUserParams : NSObject @@ -3238,7 +3240,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterSetCredentialParams : NSObject @@ -3270,7 +3272,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterSetCredentialResponseParams : NSObject @@ -3296,7 +3298,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterGetCredentialStatusParams : NSObject @@ -3318,7 +3320,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterGetCredentialStatusResponseParams : NSObject @@ -3348,7 +3350,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterClearCredentialParams : NSObject @@ -3370,7 +3372,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRWindowCoveringClusterUpOrOpenParams : NSObject /** @@ -3390,7 +3392,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRWindowCoveringClusterDownOrCloseParams : NSObject /** @@ -3410,7 +3412,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRWindowCoveringClusterStopMotionParams : NSObject /** @@ -3430,7 +3432,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRWindowCoveringClusterGoToLiftValueParams : NSObject @@ -3452,7 +3454,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRWindowCoveringClusterGoToLiftPercentageParams : NSObject @@ -3474,7 +3476,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRWindowCoveringClusterGoToTiltValueParams : NSObject @@ -3496,7 +3498,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRWindowCoveringClusterGoToTiltPercentageParams : NSObject @@ -3518,7 +3520,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBarrierControlClusterBarrierControlGoToPercentParams : NSObject @@ -3540,7 +3542,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBarrierControlClusterBarrierControlStopParams : NSObject /** @@ -3560,7 +3562,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThermostatClusterSetpointRaiseLowerParams : NSObject @@ -3584,7 +3586,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThermostatClusterGetWeeklyScheduleResponseParams : NSObject @@ -3612,7 +3614,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThermostatClusterSetWeeklyScheduleParams : NSObject @@ -3640,7 +3642,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThermostatClusterGetWeeklyScheduleParams : NSObject @@ -3664,7 +3666,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThermostatClusterClearWeeklyScheduleParams : NSObject /** @@ -3684,7 +3686,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterMoveToHueParams : NSObject @@ -3714,7 +3716,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterMoveHueParams : NSObject @@ -3742,7 +3744,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterStepHueParams : NSObject @@ -3772,7 +3774,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterMoveToSaturationParams : NSObject @@ -3800,7 +3802,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterMoveSaturationParams : NSObject @@ -3828,7 +3830,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterStepSaturationParams : NSObject @@ -3858,7 +3860,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterMoveToHueAndSaturationParams : NSObject @@ -3888,7 +3890,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterMoveToColorParams : NSObject @@ -3918,7 +3920,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterMoveColorParams : NSObject @@ -3946,7 +3948,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterStepColorParams : NSObject @@ -3976,7 +3978,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterMoveToColorTemperatureParams : NSObject @@ -4004,7 +4006,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterEnhancedMoveToHueParams : NSObject @@ -4034,7 +4036,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterEnhancedMoveHueParams : NSObject @@ -4062,7 +4064,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterEnhancedStepHueParams : NSObject @@ -4092,7 +4094,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterEnhancedMoveToHueAndSaturationParams : NSObject @@ -4122,7 +4124,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterColorLoopSetParams : NSObject @@ -4156,7 +4158,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterStopMoveStepParams : NSObject @@ -4180,7 +4182,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterMoveColorTemperatureParams : NSObject @@ -4212,7 +4214,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRColorControlClusterStepColorTemperatureParams : NSObject @@ -4246,7 +4248,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRChannelClusterChangeChannelParams : NSObject @@ -4268,7 +4270,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRChannelClusterChangeChannelResponseParams : NSObject @@ -4292,7 +4294,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRChannelClusterChangeChannelByNumberParams : NSObject @@ -4316,7 +4318,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRChannelClusterSkipChannelParams : NSObject @@ -4338,7 +4340,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTargetNavigatorClusterNavigateTargetParams : NSObject @@ -4362,7 +4364,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTargetNavigatorClusterNavigateTargetResponseParams : NSObject @@ -4386,7 +4388,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterPlayParams : NSObject /** @@ -4406,7 +4408,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterPauseParams : NSObject /** @@ -4426,7 +4428,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterStopPlaybackParams : NSObject /** @@ -4446,7 +4448,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterStartOverParams : NSObject /** @@ -4466,7 +4468,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterPreviousParams : NSObject /** @@ -4486,7 +4488,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterNextParams : NSObject /** @@ -4506,7 +4508,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterRewindParams : NSObject /** @@ -4526,7 +4528,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterFastForwardParams : NSObject /** @@ -4546,7 +4548,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterSkipForwardParams : NSObject @@ -4568,7 +4570,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterSkipBackwardParams : NSObject @@ -4590,7 +4592,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterPlaybackResponseParams : NSObject @@ -4614,7 +4616,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterSeekParams : NSObject @@ -4636,7 +4638,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaInputClusterSelectInputParams : NSObject @@ -4658,7 +4660,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaInputClusterShowInputStatusParams : NSObject /** @@ -4678,7 +4680,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaInputClusterHideInputStatusParams : NSObject /** @@ -4698,7 +4700,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaInputClusterRenameInputParams : NSObject @@ -4722,7 +4724,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRLowPowerClusterSleepParams : NSObject /** @@ -4742,7 +4744,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRKeypadInputClusterSendKeyParams : NSObject @@ -4764,7 +4766,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRKeypadInputClusterSendKeyResponseParams : NSObject @@ -4786,7 +4788,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRContentLauncherClusterLaunchContentParams : NSObject @@ -4812,7 +4814,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRContentLauncherClusterLaunchURLParams : NSObject @@ -4838,7 +4840,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRContentLauncherClusterLaunchResponseParams : NSObject @@ -4862,7 +4864,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAudioOutputClusterSelectOutputParams : NSObject @@ -4884,7 +4886,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAudioOutputClusterRenameOutputParams : NSObject @@ -4908,7 +4910,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRApplicationLauncherClusterLaunchAppParams : NSObject @@ -4932,7 +4934,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRApplicationLauncherClusterStopAppParams : NSObject @@ -4954,7 +4956,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRApplicationLauncherClusterHideAppParams : NSObject @@ -4976,7 +4978,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRApplicationLauncherClusterLauncherResponseParams : NSObject @@ -5000,7 +5002,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAccountLoginClusterGetSetupPINParams : NSObject @@ -5022,7 +5024,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAccountLoginClusterGetSetupPINResponseParams : NSObject @@ -5044,7 +5046,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAccountLoginClusterLoginParams : NSObject @@ -5068,7 +5070,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAccountLoginClusterLogoutParams : NSObject /** @@ -5088,7 +5090,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams : NSObject @@ -5116,7 +5118,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRElectricalMeasurementClusterGetProfileInfoCommandParams : NSObject /** @@ -5136,7 +5138,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams : NSObject @@ -5168,7 +5170,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams : NSObject @@ -5194,7 +5196,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestParams : NSObject /** @@ -5214,7 +5216,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestSpecificResponseParams : NSObject @@ -5236,7 +5238,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestNotHandledParams : NSObject /** @@ -5256,7 +5258,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestAddArgumentsResponseParams : NSObject @@ -5278,7 +5280,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestSpecificParams : NSObject /** @@ -5298,7 +5300,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestSimpleArgumentResponseParams : NSObject @@ -5320,7 +5322,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestUnknownCommandParams : NSObject /** @@ -5340,7 +5342,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestStructArrayArgumentResponseParams : NSObject @@ -5372,7 +5374,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestAddArgumentsParams : NSObject @@ -5396,7 +5398,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestListInt8UReverseResponseParams : NSObject @@ -5418,7 +5420,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestSimpleArgumentRequestParams : NSObject @@ -5440,7 +5442,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestEnumsResponseParams : NSObject @@ -5464,7 +5466,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestStructArrayArgumentRequestParams : NSObject @@ -5496,7 +5498,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestNullableOptionalResponseParams : NSObject @@ -5524,7 +5526,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestStructArgumentRequestParams : NSObject @@ -5546,7 +5548,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestComplexNullableOptionalResponseParams : NSObject @@ -5622,7 +5624,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestNestedStructArgumentRequestParams : NSObject @@ -5644,7 +5646,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterBooleanResponseParams : NSObject @@ -5666,7 +5668,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestListStructArgumentRequestParams : NSObject @@ -5688,7 +5690,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterSimpleStructResponseParams : NSObject @@ -5710,7 +5712,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestListInt8UArgumentRequestParams : NSObject @@ -5732,7 +5734,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestEmitTestEventResponseParams : NSObject @@ -5754,7 +5756,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestNestedStructListArgumentRequestParams : NSObject @@ -5776,7 +5778,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams : NSObject @@ -5798,7 +5800,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestListNestedStructListArgumentRequestParams : NSObject @@ -5820,7 +5822,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestListInt8UReverseRequestParams : NSObject @@ -5842,7 +5844,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestEnumsRequestParams : NSObject @@ -5866,7 +5868,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestNullableOptionalRequestParams : NSObject @@ -5888,7 +5890,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestComplexNullableOptionalRequestParams : NSObject @@ -5932,7 +5934,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterSimpleStructEchoRequestParams : NSObject @@ -5954,7 +5956,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTimedInvokeRequestParams : NSObject /** @@ -5974,7 +5976,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams : NSObject @@ -5996,7 +5998,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestEmitTestEventRequestParams : NSObject @@ -6022,7 +6024,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams : NSObject @@ -6044,7 +6046,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRFaultInjectionClusterFailAtFaultParams : NSObject @@ -6074,7 +6076,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRFaultInjectionClusterFailRandomlyAtFaultParams : NSObject @@ -6100,7 +6102,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 4b7f8fb2aef658..9ea1ae5cf02d39 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import "MTRCommandPayloadsObjc.h" NS_ASSUME_NONNULL_BEGIN @@ -30,7 +32,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRIdentifyClusterIdentifyParams alloc] init]; @@ -61,7 +63,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; @@ -93,7 +95,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupsClusterAddGroupParams alloc] init]; @@ -125,7 +127,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupsClusterAddGroupResponseParams alloc] init]; @@ -155,7 +157,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupsClusterViewGroupParams alloc] init]; @@ -187,7 +189,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupsClusterViewGroupResponseParams alloc] init]; @@ -218,7 +220,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupsClusterGetGroupMembershipParams alloc] init]; @@ -248,7 +250,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupsClusterGetGroupMembershipResponseParams alloc] init]; @@ -278,7 +280,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupsClusterRemoveGroupParams alloc] init]; @@ -308,7 +310,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupsClusterRemoveGroupResponseParams alloc] init]; @@ -336,7 +338,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupsClusterRemoveAllGroupsParams alloc] init]; @@ -365,7 +367,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupsClusterAddGroupIfIdentifyingParams alloc] init]; @@ -403,7 +405,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterAddSceneParams alloc] init]; @@ -441,7 +443,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterAddSceneResponseParams alloc] init]; @@ -474,7 +476,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterViewSceneParams alloc] init]; @@ -514,7 +516,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterViewSceneResponseParams alloc] init]; @@ -551,7 +553,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterRemoveSceneParams alloc] init]; @@ -585,7 +587,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterRemoveSceneResponseParams alloc] init]; @@ -616,7 +618,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterRemoveAllScenesParams alloc] init]; @@ -646,7 +648,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterRemoveAllScenesResponseParams alloc] init]; @@ -678,7 +680,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterStoreSceneParams alloc] init]; @@ -712,7 +714,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterStoreSceneResponseParams alloc] init]; @@ -747,7 +749,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterRecallSceneParams alloc] init]; @@ -778,7 +780,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; @@ -812,7 +814,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterGetSceneMembershipResponseParams alloc] init]; @@ -852,7 +854,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterEnhancedAddSceneParams alloc] init]; @@ -890,7 +892,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterEnhancedAddSceneResponseParams alloc] init]; @@ -923,7 +925,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterEnhancedViewSceneParams alloc] init]; @@ -963,7 +965,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterEnhancedViewSceneResponseParams alloc] init]; @@ -1006,7 +1008,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterCopySceneParams alloc] init]; @@ -1044,7 +1046,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRScenesClusterCopySceneResponseParams alloc] init]; @@ -1073,7 +1075,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROnOffClusterOffParams alloc] init]; @@ -1098,7 +1100,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROnOffClusterOnParams alloc] init]; @@ -1123,7 +1125,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROnOffClusterToggleParams alloc] init]; @@ -1152,7 +1154,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROnOffClusterOffWithEffectParams alloc] init]; @@ -1180,7 +1182,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; @@ -1211,7 +1213,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROnOffClusterOnWithTimedOffParams alloc] init]; @@ -1248,7 +1250,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -1287,7 +1289,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRLevelControlClusterMoveParams alloc] init]; @@ -1327,7 +1329,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRLevelControlClusterStepParams alloc] init]; @@ -1363,7 +1365,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRLevelControlClusterStopParams alloc] init]; @@ -1399,7 +1401,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; @@ -1438,7 +1440,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; @@ -1478,7 +1480,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; @@ -1514,7 +1516,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; @@ -1544,7 +1546,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; @@ -1574,7 +1576,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRActionsClusterInstantActionParams alloc] init]; @@ -1608,7 +1610,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRActionsClusterInstantActionWithTransitionParams alloc] init]; @@ -1641,7 +1643,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRActionsClusterStartActionParams alloc] init]; @@ -1675,7 +1677,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRActionsClusterStartActionWithDurationParams alloc] init]; @@ -1708,7 +1710,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRActionsClusterStopActionParams alloc] init]; @@ -1740,7 +1742,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRActionsClusterPauseActionParams alloc] init]; @@ -1774,7 +1776,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRActionsClusterPauseActionWithDurationParams alloc] init]; @@ -1807,7 +1809,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRActionsClusterResumeActionParams alloc] init]; @@ -1839,7 +1841,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRActionsClusterEnableActionParams alloc] init]; @@ -1873,7 +1875,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRActionsClusterEnableActionWithDurationParams alloc] init]; @@ -1906,7 +1908,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRActionsClusterDisableActionParams alloc] init]; @@ -1940,7 +1942,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRActionsClusterDisableActionWithDurationParams alloc] init]; @@ -1969,7 +1971,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRBasicClusterMfgSpecificPingParams alloc] init]; @@ -1985,7 +1987,7 @@ - (NSString *)description } @end -@implementation MTROTASoftwareUpdateProviderClusterQueryImageParams +@implementation MTROtaSoftwareUpdateProviderClusterQueryImageParams - (instancetype)init { if (self = [super init]) { @@ -2010,9 +2012,9 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterQueryImageParams alloc] init]; + auto other = [[MTROtaSoftwareUpdateProviderClusterQueryImageParams alloc] init]; other.vendorId = self.vendorId; other.productId = self.productId; @@ -2038,7 +2040,7 @@ - (NSString *)description } @end -@implementation MTROTASoftwareUpdateProviderClusterQueryImageResponseParams +@implementation MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams - (instancetype)init { if (self = [super init]) { @@ -2063,9 +2065,9 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterQueryImageResponseParams alloc] init]; + auto other = [[MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams alloc] init]; other.status = self.status; other.delayedActionTime = self.delayedActionTime; @@ -2092,7 +2094,7 @@ - (NSString *)description } @end -@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams +@implementation MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams - (instancetype)init { if (self = [super init]) { @@ -2105,9 +2107,9 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; + auto other = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; other.updateToken = self.updateToken; other.newVersion = self.newVersion; @@ -2125,7 +2127,7 @@ - (NSString *)description } @end -@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams +@implementation MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams - (instancetype)init { if (self = [super init]) { @@ -2138,9 +2140,9 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams alloc] init]; + auto other = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams alloc] init]; other.action = self.action; other.delayedActionTime = self.delayedActionTime; @@ -2157,7 +2159,7 @@ - (NSString *)description } @end -@implementation MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams +@implementation MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams - (instancetype)init { if (self = [super init]) { @@ -2170,9 +2172,9 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; + auto other = [[MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; other.updateToken = self.updateToken; other.softwareVersion = self.softwareVersion; @@ -2190,7 +2192,7 @@ - (NSString *)description } @end -@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams +@implementation MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams - (instancetype)init { if (self = [super init]) { @@ -2209,9 +2211,9 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { - auto other = [[MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; + auto other = [[MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; other.providerNodeId = self.providerNodeId; other.vendorId = self.vendorId; @@ -2246,7 +2248,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; @@ -2278,7 +2280,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGeneralCommissioningClusterArmFailSafeResponseParams alloc] init]; @@ -2312,7 +2314,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; @@ -2345,7 +2347,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams alloc] init]; @@ -2373,7 +2375,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; @@ -2402,7 +2404,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteResponseParams alloc] init]; @@ -2434,7 +2436,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; @@ -2470,7 +2472,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRNetworkCommissioningClusterScanNetworksResponseParams alloc] init]; @@ -2507,7 +2509,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; @@ -2541,7 +2543,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; @@ -2574,7 +2576,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; @@ -2609,7 +2611,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRNetworkCommissioningClusterNetworkConfigResponseParams alloc] init]; @@ -2642,7 +2644,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; @@ -2677,7 +2679,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRNetworkCommissioningClusterConnectNetworkResponseParams alloc] init]; @@ -2712,7 +2714,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; @@ -2748,7 +2750,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; @@ -2786,7 +2788,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDiagnosticLogsClusterRetrieveLogsResponseParams alloc] init]; @@ -2821,7 +2823,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; @@ -2850,7 +2852,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; @@ -2875,7 +2877,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; @@ -2900,7 +2902,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; @@ -2925,7 +2927,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; @@ -2956,7 +2958,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTimeSynchronizationClusterSetUtcTimeParams alloc] init]; @@ -2995,7 +2997,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; @@ -3030,7 +3032,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; @@ -3057,7 +3059,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; @@ -3084,7 +3086,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; @@ -3115,7 +3117,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROperationalCredentialsClusterAttestationResponseParams alloc] init]; @@ -3146,7 +3148,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; @@ -3175,7 +3177,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROperationalCredentialsClusterCertificateChainResponseParams alloc] init]; @@ -3206,7 +3208,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; @@ -3239,7 +3241,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROperationalCredentialsClusterCSRResponseParams alloc] init]; @@ -3278,7 +3280,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; @@ -3316,7 +3318,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; @@ -3351,7 +3353,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROperationalCredentialsClusterNOCResponseParams alloc] init]; @@ -3382,7 +3384,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; @@ -3410,7 +3412,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; @@ -3439,7 +3441,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; @@ -3468,7 +3470,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; @@ -3497,7 +3499,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; @@ -3526,7 +3528,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetReadResponseParams alloc] init]; @@ -3555,7 +3557,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; @@ -3584,7 +3586,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; @@ -3613,7 +3615,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams alloc] init]; @@ -3642,7 +3644,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRModeSelectClusterChangeToModeParams alloc] init]; @@ -3670,7 +3672,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterLockDoorParams alloc] init]; @@ -3699,7 +3701,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; @@ -3730,7 +3732,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; @@ -3772,7 +3774,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -3811,7 +3813,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; @@ -3855,7 +3857,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterGetWeekDayScheduleResponseParams alloc] init]; @@ -3895,7 +3897,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; @@ -3931,7 +3933,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -3966,7 +3968,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; @@ -4004,7 +4006,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterGetYearDayScheduleResponseParams alloc] init]; @@ -4040,7 +4042,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; @@ -4076,7 +4078,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; @@ -4109,7 +4111,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; @@ -4146,7 +4148,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterGetHolidayScheduleResponseParams alloc] init]; @@ -4180,7 +4182,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; @@ -4221,7 +4223,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -4259,7 +4261,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterGetUserParams alloc] init]; @@ -4305,7 +4307,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterGetUserResponseParams alloc] init]; @@ -4346,7 +4348,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterClearUserParams alloc] init]; @@ -4384,7 +4386,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -4424,7 +4426,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterSetCredentialResponseParams alloc] init]; @@ -4455,7 +4457,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -4492,7 +4494,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterGetCredentialStatusResponseParams alloc] init]; @@ -4528,7 +4530,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -4555,7 +4557,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; @@ -4580,7 +4582,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; @@ -4605,7 +4607,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; @@ -4632,7 +4634,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; @@ -4660,7 +4662,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; @@ -4689,7 +4691,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; @@ -4717,7 +4719,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; @@ -4746,7 +4748,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; @@ -4773,7 +4775,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; @@ -4802,7 +4804,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; @@ -4838,7 +4840,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRThermostatClusterGetWeeklyScheduleResponseParams alloc] init]; @@ -4877,7 +4879,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; @@ -4912,7 +4914,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; @@ -4940,7 +4942,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; @@ -4975,7 +4977,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterMoveToHueParams alloc] init]; @@ -5015,7 +5017,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterMoveHueParams alloc] init]; @@ -5055,7 +5057,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterStepHueParams alloc] init]; @@ -5095,7 +5097,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; @@ -5134,7 +5136,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterMoveSaturationParams alloc] init]; @@ -5174,7 +5176,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterStepSaturationParams alloc] init]; @@ -5216,7 +5218,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; @@ -5258,7 +5260,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -5298,7 +5300,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterMoveColorParams alloc] init]; @@ -5338,7 +5340,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterStepColorParams alloc] init]; @@ -5378,7 +5380,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; @@ -5419,7 +5421,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; @@ -5459,7 +5461,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; @@ -5499,7 +5501,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; @@ -5541,7 +5543,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; @@ -5587,7 +5589,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterColorLoopSetParams alloc] init]; @@ -5626,7 +5628,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterStopMoveStepParams alloc] init]; @@ -5666,7 +5668,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; @@ -5715,7 +5717,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; @@ -5753,7 +5755,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRChannelClusterChangeChannelParams alloc] init]; @@ -5783,7 +5785,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRChannelClusterChangeChannelResponseParams alloc] init]; @@ -5815,7 +5817,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; @@ -5845,7 +5847,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRChannelClusterSkipChannelParams alloc] init]; @@ -5875,7 +5877,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; @@ -5907,7 +5909,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTargetNavigatorClusterNavigateTargetResponseParams alloc] init]; @@ -5935,7 +5937,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaPlaybackClusterPlayParams alloc] init]; @@ -5960,7 +5962,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaPlaybackClusterPauseParams alloc] init]; @@ -5985,7 +5987,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaPlaybackClusterStopPlaybackParams alloc] init]; @@ -6010,7 +6012,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; @@ -6035,7 +6037,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; @@ -6060,7 +6062,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaPlaybackClusterNextParams alloc] init]; @@ -6085,7 +6087,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaPlaybackClusterRewindParams alloc] init]; @@ -6110,7 +6112,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; @@ -6137,7 +6139,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; @@ -6166,7 +6168,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; @@ -6197,7 +6199,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaPlaybackClusterPlaybackResponseParams alloc] init]; @@ -6227,7 +6229,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaPlaybackClusterSeekParams alloc] init]; @@ -6255,7 +6257,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaInputClusterSelectInputParams alloc] init]; @@ -6281,7 +6283,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; @@ -6306,7 +6308,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; @@ -6335,7 +6337,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRMediaInputClusterRenameInputParams alloc] init]; @@ -6363,7 +6365,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRLowPowerClusterSleepParams alloc] init]; @@ -6390,7 +6392,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRKeypadInputClusterSendKeyParams alloc] init]; @@ -6418,7 +6420,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRKeypadInputClusterSendKeyResponseParams alloc] init]; @@ -6450,7 +6452,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; @@ -6485,7 +6487,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; @@ -6518,7 +6520,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRContentLauncherClusterLaunchResponseParams alloc] init]; @@ -6548,7 +6550,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; @@ -6578,7 +6580,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; @@ -6610,7 +6612,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; @@ -6640,7 +6642,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; @@ -6669,7 +6671,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; @@ -6700,7 +6702,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRApplicationLauncherClusterLauncherResponseParams alloc] init]; @@ -6730,7 +6732,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; @@ -6759,7 +6761,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRAccountLoginClusterGetSetupPINResponseParams alloc] init]; @@ -6789,7 +6791,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRAccountLoginClusterLoginParams alloc] init]; @@ -6817,7 +6819,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRAccountLoginClusterLogoutParams alloc] init]; @@ -6850,7 +6852,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams alloc] init]; @@ -6881,7 +6883,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams alloc] init]; @@ -6918,7 +6920,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams alloc] init]; @@ -6958,7 +6960,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams alloc] init]; @@ -6987,7 +6989,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestParams alloc] init]; @@ -7014,7 +7016,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestSpecificResponseParams alloc] init]; @@ -7041,7 +7043,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestNotHandledParams alloc] init]; @@ -7068,7 +7070,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestAddArgumentsResponseParams alloc] init]; @@ -7095,7 +7097,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestSpecificParams alloc] init]; @@ -7122,7 +7124,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestSimpleArgumentResponseParams alloc] init]; @@ -7149,7 +7151,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestUnknownCommandParams alloc] init]; @@ -7186,7 +7188,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestStructArrayArgumentResponseParams alloc] init]; @@ -7222,7 +7224,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; @@ -7252,7 +7254,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestListInt8UReverseResponseParams alloc] init]; @@ -7280,7 +7282,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestSimpleArgumentRequestParams alloc] init]; @@ -7310,7 +7312,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestEnumsResponseParams alloc] init]; @@ -7350,7 +7352,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestStructArrayArgumentRequestParams alloc] init]; @@ -7390,7 +7392,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestNullableOptionalResponseParams alloc] init]; @@ -7422,7 +7424,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestStructArgumentRequestParams alloc] init]; @@ -7504,7 +7506,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestComplexNullableOptionalResponseParams alloc] init]; @@ -7574,7 +7576,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestNestedStructArgumentRequestParams alloc] init]; @@ -7602,7 +7604,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterBooleanResponseParams alloc] init]; @@ -7630,7 +7632,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestListStructArgumentRequestParams alloc] init]; @@ -7658,7 +7660,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterSimpleStructResponseParams alloc] init]; @@ -7686,7 +7688,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestListInt8UArgumentRequestParams alloc] init]; @@ -7714,7 +7716,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestEmitTestEventResponseParams alloc] init]; @@ -7742,7 +7744,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init]; @@ -7770,7 +7772,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams alloc] init]; @@ -7798,7 +7800,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init]; @@ -7826,7 +7828,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestListInt8UReverseRequestParams alloc] init]; @@ -7856,7 +7858,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestEnumsRequestParams alloc] init]; @@ -7886,7 +7888,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init]; @@ -7936,7 +7938,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestComplexNullableOptionalRequestParams alloc] init]; @@ -7981,7 +7983,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterSimpleStructEchoRequestParams alloc] init]; @@ -8007,7 +8009,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTimedInvokeRequestParams alloc] init]; @@ -8034,7 +8036,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init]; @@ -8066,7 +8068,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestEmitTestEventRequestParams alloc] init]; @@ -8097,7 +8099,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams alloc] init]; @@ -8133,7 +8135,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRFaultInjectionClusterFailAtFaultParams alloc] init]; @@ -8171,7 +8173,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; { auto other = [[MTRFaultInjectionClusterFailRandomlyAtFaultParams alloc] init]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 7f4e6f656e9463..6ee6ada8dabb0f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import "MTREventTLVValueDecoder_Internal.h" #import "MTRStructsObjc.h" @@ -136,7 +138,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRAccessControlClusterAccessControlEntryChangedEvent new]; + MTRAccessControlClusterAccessControlEntryChangedEvent * value = + [MTRAccessControlClusterAccessControlEntryChangedEvent new]; do { NSNumber * _Nullable memberValue; @@ -246,7 +249,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRAccessControlClusterAccessControlExtensionChangedEvent new]; + MTRAccessControlClusterAccessControlExtensionChangedEvent * value = + [MTRAccessControlClusterAccessControlExtensionChangedEvent new]; do { NSNumber * _Nullable memberValue; @@ -309,7 +313,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRActionsClusterStateChangedEvent new]; + MTRActionsClusterStateChangedEvent * value = [MTRActionsClusterStateChangedEvent new]; do { NSNumber * _Nonnull memberValue; @@ -337,7 +341,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRActionsClusterActionFailedEvent new]; + MTRActionsClusterActionFailedEvent * value = [MTRActionsClusterActionFailedEvent new]; do { NSNumber * _Nonnull memberValue; @@ -380,7 +384,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRBasicClusterStartUpEvent new]; + MTRBasicClusterStartUpEvent * value = [MTRBasicClusterStartUpEvent new]; do { NSNumber * _Nonnull memberValue; @@ -398,7 +402,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRBasicClusterShutDownEvent new]; + MTRBasicClusterShutDownEvent * value = [MTRBasicClusterShutDownEvent new]; return value; } @@ -410,7 +414,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRBasicClusterLeaveEvent new]; + MTRBasicClusterLeaveEvent * value = [MTRBasicClusterLeaveEvent new]; do { NSNumber * _Nonnull memberValue; @@ -428,7 +432,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRBasicClusterReachableChangedEvent new]; + MTRBasicClusterReachableChangedEvent * value = [MTRBasicClusterReachableChangedEvent new]; do { NSNumber * _Nonnull memberValue; @@ -466,7 +470,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTROTASoftwareUpdateRequestorClusterStateTransitionEvent new]; + MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent * value = + [MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent new]; do { NSNumber * _Nonnull memberValue; @@ -503,7 +508,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTROTASoftwareUpdateRequestorClusterVersionAppliedEvent new]; + MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent * value = + [MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent new]; do { NSNumber * _Nonnull memberValue; @@ -526,7 +532,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTROTASoftwareUpdateRequestorClusterDownloadErrorEvent new]; + MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent * value = + [MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent new]; do { NSNumber * _Nonnull memberValue; @@ -657,7 +664,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent new]; + MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent * value = + [MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent new]; do { NSArray * _Nonnull memberValue; @@ -710,7 +718,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRGeneralDiagnosticsClusterRadioFaultChangeEvent new]; + MTRGeneralDiagnosticsClusterRadioFaultChangeEvent * value = [MTRGeneralDiagnosticsClusterRadioFaultChangeEvent new]; do { NSArray * _Nonnull memberValue; @@ -763,7 +771,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent new]; + MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent * value = [MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent new]; do { NSArray * _Nonnull memberValue; @@ -816,7 +824,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRGeneralDiagnosticsClusterBootReasonEvent new]; + MTRGeneralDiagnosticsClusterBootReasonEvent * value = [MTRGeneralDiagnosticsClusterBootReasonEvent new]; do { NSNumber * _Nonnull memberValue; @@ -844,7 +852,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRSoftwareDiagnosticsClusterSoftwareFaultEvent new]; + MTRSoftwareDiagnosticsClusterSoftwareFaultEvent * value = [MTRSoftwareDiagnosticsClusterSoftwareFaultEvent new]; do { NSNumber * _Nonnull memberValue; @@ -893,7 +901,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent new]; + MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent * value = + [MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent new]; do { NSNumber * _Nonnull memberValue; @@ -911,7 +920,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent new]; + MTRThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent * value = + [MTRThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent new]; do { NSArray * _Nonnull memberValue; @@ -974,7 +984,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent new]; + MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent * value = [MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent new]; do { NSNumber * _Nonnull memberValue; @@ -992,7 +1002,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent new]; + MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent * value = + [MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1015,7 +1026,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent new]; + MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent * value = + [MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1053,7 +1065,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRBridgedDeviceBasicClusterStartUpEvent new]; + MTRBridgedDeviceBasicClusterStartUpEvent * value = [MTRBridgedDeviceBasicClusterStartUpEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1071,7 +1083,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRBridgedDeviceBasicClusterShutDownEvent new]; + MTRBridgedDeviceBasicClusterShutDownEvent * value = [MTRBridgedDeviceBasicClusterShutDownEvent new]; return value; } @@ -1083,7 +1095,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRBridgedDeviceBasicClusterLeaveEvent new]; + MTRBridgedDeviceBasicClusterLeaveEvent * value = [MTRBridgedDeviceBasicClusterLeaveEvent new]; return value; } @@ -1095,7 +1107,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRBridgedDeviceBasicClusterReachableChangedEvent new]; + MTRBridgedDeviceBasicClusterReachableChangedEvent * value = [MTRBridgedDeviceBasicClusterReachableChangedEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1123,7 +1135,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRSwitchClusterSwitchLatchedEvent new]; + MTRSwitchClusterSwitchLatchedEvent * value = [MTRSwitchClusterSwitchLatchedEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1141,7 +1153,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRSwitchClusterInitialPressEvent new]; + MTRSwitchClusterInitialPressEvent * value = [MTRSwitchClusterInitialPressEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1159,7 +1171,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRSwitchClusterLongPressEvent new]; + MTRSwitchClusterLongPressEvent * value = [MTRSwitchClusterLongPressEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1177,7 +1189,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRSwitchClusterShortReleaseEvent new]; + MTRSwitchClusterShortReleaseEvent * value = [MTRSwitchClusterShortReleaseEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1195,7 +1207,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRSwitchClusterLongReleaseEvent new]; + MTRSwitchClusterLongReleaseEvent * value = [MTRSwitchClusterLongReleaseEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1213,7 +1225,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRSwitchClusterMultiPressOngoingEvent new]; + MTRSwitchClusterMultiPressOngoingEvent * value = [MTRSwitchClusterMultiPressOngoingEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1236,7 +1248,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRSwitchClusterMultiPressCompleteEvent new]; + MTRSwitchClusterMultiPressCompleteEvent * value = [MTRSwitchClusterMultiPressCompleteEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1319,7 +1331,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRBooleanStateClusterStateChangeEvent new]; + MTRBooleanStateClusterStateChangeEvent * value = [MTRBooleanStateClusterStateChangeEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1357,7 +1369,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRDoorLockClusterDoorLockAlarmEvent new]; + MTRDoorLockClusterDoorLockAlarmEvent * value = [MTRDoorLockClusterDoorLockAlarmEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1375,7 +1387,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRDoorLockClusterDoorStateChangeEvent new]; + MTRDoorLockClusterDoorStateChangeEvent * value = [MTRDoorLockClusterDoorStateChangeEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1393,7 +1405,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRDoorLockClusterLockOperationEvent new]; + MTRDoorLockClusterLockOperationEvent * value = [MTRDoorLockClusterLockOperationEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1474,7 +1486,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRDoorLockClusterLockOperationErrorEvent new]; + MTRDoorLockClusterLockOperationErrorEvent * value = [MTRDoorLockClusterLockOperationErrorEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1560,7 +1572,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRDoorLockClusterLockUserChangeEvent new]; + MTRDoorLockClusterLockUserChangeEvent * value = [MTRDoorLockClusterLockUserChangeEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1654,7 +1666,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent new]; + MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent * value = + [MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent new]; return value; } @@ -1666,7 +1679,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent new]; + MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent * value = + [MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent new]; return value; } @@ -1678,7 +1692,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent new]; + MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent * value = + [MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent new]; return value; } @@ -1690,7 +1705,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterSystemPressureLowEvent new]; + MTRPumpConfigurationAndControlClusterSystemPressureLowEvent * value = + [MTRPumpConfigurationAndControlClusterSystemPressureLowEvent new]; return value; } @@ -1702,7 +1718,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterSystemPressureHighEvent new]; + MTRPumpConfigurationAndControlClusterSystemPressureHighEvent * value = + [MTRPumpConfigurationAndControlClusterSystemPressureHighEvent new]; return value; } @@ -1714,7 +1731,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterDryRunningEvent new]; + MTRPumpConfigurationAndControlClusterDryRunningEvent * value = + [MTRPumpConfigurationAndControlClusterDryRunningEvent new]; return value; } @@ -1726,7 +1744,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent new]; + MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent * value = + [MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent new]; return value; } @@ -1738,7 +1757,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent new]; + MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent * value = + [MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent new]; return value; } @@ -1750,7 +1770,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent new]; + MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent * value = + [MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent new]; return value; } @@ -1762,7 +1783,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterPumpBlockedEvent new]; + MTRPumpConfigurationAndControlClusterPumpBlockedEvent * value = + [MTRPumpConfigurationAndControlClusterPumpBlockedEvent new]; return value; } @@ -1774,7 +1796,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterSensorFailureEvent new]; + MTRPumpConfigurationAndControlClusterSensorFailureEvent * value = + [MTRPumpConfigurationAndControlClusterSensorFailureEvent new]; return value; } @@ -1786,7 +1809,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent new]; + MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent * value = + [MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent new]; return value; } @@ -1798,7 +1822,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent new]; + MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent * value = + [MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent new]; return value; } @@ -1810,7 +1835,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterGeneralFaultEvent new]; + MTRPumpConfigurationAndControlClusterGeneralFaultEvent * value = + [MTRPumpConfigurationAndControlClusterGeneralFaultEvent new]; return value; } @@ -1822,7 +1848,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterLeakageEvent new]; + MTRPumpConfigurationAndControlClusterLeakageEvent * value = [MTRPumpConfigurationAndControlClusterLeakageEvent new]; return value; } @@ -1834,7 +1860,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterAirDetectionEvent new]; + MTRPumpConfigurationAndControlClusterAirDetectionEvent * value = + [MTRPumpConfigurationAndControlClusterAirDetectionEvent new]; return value; } @@ -1846,7 +1873,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRPumpConfigurationAndControlClusterTurbineOperationEvent new]; + MTRPumpConfigurationAndControlClusterTurbineOperationEvent * value = + [MTRPumpConfigurationAndControlClusterTurbineOperationEvent new]; return value; } @@ -2108,7 +2136,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRTestClusterClusterTestEventEvent new]; + MTRTestClusterClusterTestEventEvent * value = [MTRTestClusterClusterTestEventEvent new]; do { NSNumber * _Nonnull memberValue; @@ -2201,7 +2229,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead return nil; } - __auto_type * value = [MTRTestClusterClusterTestFabricScopedEventEvent new]; + MTRTestClusterClusterTestFabricScopedEventEvent * value = [MTRTestClusterClusterTestFabricScopedEventEvent new]; do { NSNumber * _Nonnull memberValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index e3e8694c7a0c8e..7e615b7d8f989d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import NS_ASSUME_NONNULL_BEGIN @@ -24,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull attributeValue; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRScenesClusterExtensionFieldSet : NSObject @@ -32,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull attributeValueList; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDescriptorClusterDeviceTypeStruct : NSObject @@ -40,7 +42,10 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull revision; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRDescriptorClusterDeviceType : MTRDescriptorClusterDeviceTypeStruct @end @interface MTRBindingClusterTargetStruct : NSObject @@ -51,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAccessControlClusterTarget : NSObject @@ -60,7 +65,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable deviceType; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAccessControlClusterAccessControlEntry : NSObject @@ -71,7 +76,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAccessControlClusterExtensionEntry : NSObject @@ -79,7 +84,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAccessControlClusterAccessControlEntryChangedEvent : NSObject @@ -90,7 +95,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAccessControlClusterAccessControlExtensionChangedEvent : NSObject @@ -101,7 +106,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterActionStruct : NSObject @@ -113,7 +118,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull state; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterEndpointListStruct : NSObject @@ -123,7 +128,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull endpoints; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterStateChangedEvent : NSObject @@ -132,7 +137,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy, getter=getNewState) NSNumber * _Nonnull newState; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRActionsClusterActionFailedEvent : NSObject @@ -142,7 +147,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull error; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBasicClusterCapabilityMinimaStruct : NSObject @@ -150,71 +155,71 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull subscriptionsPerFabric; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBasicClusterStartUpEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBasicClusterShutDownEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBasicClusterLeaveEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBasicClusterReachableChangedEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull reachableNewValue; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROTASoftwareUpdateRequestorClusterProviderLocation : NSObject +@interface MTROtaSoftwareUpdateRequestorClusterProviderLocation : NSObject @property (nonatomic, copy) NSNumber * _Nonnull providerNodeID; @property (nonatomic, copy) NSNumber * _Nonnull endpoint; @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROTASoftwareUpdateRequestorClusterStateTransitionEvent : NSObject +@interface MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull previousState; @property (nonatomic, copy, getter=getNewState) NSNumber * _Nonnull newState; @property (nonatomic, copy) NSNumber * _Nonnull reason; @property (nonatomic, copy) NSNumber * _Nullable targetSoftwareVersion; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROTASoftwareUpdateRequestorClusterVersionAppliedEvent : NSObject +@interface MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; @property (nonatomic, copy) NSNumber * _Nonnull productID; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROTASoftwareUpdateRequestorClusterDownloadErrorEvent : NSObject +@interface MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; @property (nonatomic, copy) NSNumber * _Nonnull bytesDownloaded; @property (nonatomic, copy) NSNumber * _Nullable progressPercent; @property (nonatomic, copy) NSNumber * _Nullable platformCode; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPowerSourceClusterBatChargeFaultChangeType : NSObject @@ -222,7 +227,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPowerSourceClusterBatFaultChangeType : NSObject @@ -230,7 +235,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPowerSourceClusterWiredFaultChangeType : NSObject @@ -238,7 +243,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralCommissioningClusterBasicCommissioningInfo : NSObject @@ -246,7 +251,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull maxCumulativeFailsafeSeconds; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRNetworkCommissioningClusterNetworkInfo : NSObject @@ -254,7 +259,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull connected; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRNetworkCommissioningClusterThreadInterfaceScanResult : NSObject @@ -268,7 +273,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull lqi; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRNetworkCommissioningClusterWiFiInterfaceScanResult : NSObject @@ -280,7 +285,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull rssi; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralDiagnosticsClusterNetworkInterfaceType : NSObject @@ -294,7 +299,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull type; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent : NSObject @@ -302,7 +307,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralDiagnosticsClusterRadioFaultChangeEvent : NSObject @@ -310,7 +315,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent : NSObject @@ -318,14 +323,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGeneralDiagnosticsClusterBootReasonEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull bootReason; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRSoftwareDiagnosticsClusterThreadMetrics : NSObject @@ -336,7 +341,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable stackSize; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRSoftwareDiagnosticsClusterSoftwareFaultEvent : NSObject @@ -345,7 +350,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSData * _Nullable faultRecording; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThreadNetworkDiagnosticsClusterNeighborTable : NSObject @@ -365,7 +370,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull isChild; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents : NSObject @@ -383,7 +388,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull channelMaskPresent; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThreadNetworkDiagnosticsClusterRouteTable : NSObject @@ -399,7 +404,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull linkEstablished; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThreadNetworkDiagnosticsClusterSecurityPolicy : NSObject @@ -407,14 +412,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull flags; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull connectionStatus; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent : NSObject @@ -422,14 +427,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull previous; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull reasonCode; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent : NSObject @@ -437,14 +442,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull status; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull connectionStatus; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTimeSynchronizationClusterDstOffsetType : NSObject @@ -453,7 +458,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull validUntil; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTimeSynchronizationClusterTimeZoneType : NSObject @@ -462,68 +467,68 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nullable name; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBridgedDeviceBasicClusterStartUpEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBridgedDeviceBasicClusterShutDownEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBridgedDeviceBasicClusterLeaveEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBridgedDeviceBasicClusterReachableChangedEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull reachableNewValue; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRSwitchClusterSwitchLatchedEvent : NSObject @property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRSwitchClusterInitialPressEvent : NSObject @property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRSwitchClusterLongPressEvent : NSObject @property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRSwitchClusterShortReleaseEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull previousPosition; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRSwitchClusterLongReleaseEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull previousPosition; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRSwitchClusterMultiPressOngoingEvent : NSObject @@ -531,7 +536,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull currentNumberOfPressesCounted; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRSwitchClusterMultiPressCompleteEvent : NSObject @@ -539,7 +544,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull totalNumberOfPressesCounted; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterFabricDescriptor : NSObject @@ -551,7 +556,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTROperationalCredentialsClusterNOCStruct : NSObject @@ -560,7 +565,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupKeyManagementClusterGroupInfoMapStruct : NSObject @@ -570,7 +575,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupKeyManagementClusterGroupKeyMapStruct : NSObject @@ -579,7 +584,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRGroupKeyManagementClusterGroupKeySetStruct : NSObject @@ -593,7 +598,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable epochStartTime2; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRFixedLabelClusterLabelStruct : NSObject @@ -601,7 +606,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull value; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRUserLabelClusterLabelStruct : NSObject @@ -609,14 +614,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull value; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRBooleanStateClusterStateChangeEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull stateValue; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRModeSelectClusterSemanticTag : NSObject @@ -624,7 +629,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull value; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRModeSelectClusterModeOptionStruct : NSObject @@ -633,7 +638,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull semanticTags; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterDlCredential : NSObject @@ -641,21 +646,21 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull credentialIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterDoorLockAlarmEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull alarmCode; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterDoorStateChangeEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull doorState; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterLockOperationEvent : NSObject @@ -667,7 +672,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nullable credentials; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterLockOperationErrorEvent : NSObject @@ -680,7 +685,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nullable credentials; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRDoorLockClusterLockUserChangeEvent : NSObject @@ -693,109 +698,109 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable dataIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterSystemPressureLowEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterSystemPressureHighEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterDryRunningEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterPumpBlockedEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterSensorFailureEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterGeneralFaultEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterLeakageEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterAirDetectionEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRPumpConfigurationAndControlClusterTurbineOperationEvent : NSObject - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRThermostatClusterThermostatScheduleTransition : NSObject @@ -804,7 +809,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable coolSetpoint; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRChannelClusterChannelInfo : NSObject @@ -815,7 +820,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nullable affiliateCallSign; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRChannelClusterLineupInfo : NSObject @@ -825,7 +830,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull lineupInfoType; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTargetNavigatorClusterTargetInfo : NSObject @@ -833,7 +838,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull name; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaPlaybackClusterPlaybackPosition : NSObject @@ -841,7 +846,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable position; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRMediaInputClusterInputInfo : NSObject @@ -851,7 +856,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull descriptionString; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRContentLauncherClusterDimension : NSObject @@ -860,7 +865,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull metric; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRContentLauncherClusterAdditionalInfo : NSObject @@ -868,7 +873,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull value; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRContentLauncherClusterParameter : NSObject @@ -877,14 +882,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nullable externalIDList; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRContentLauncherClusterContentSearch : NSObject @property (nonatomic, copy) NSArray * _Nonnull parameterList; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRContentLauncherClusterStyleInformation : NSObject @@ -893,7 +898,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) MTRContentLauncherClusterDimension * _Nullable size; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRContentLauncherClusterBrandingInformation : NSObject @@ -905,7 +910,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) MTRContentLauncherClusterStyleInformation * _Nullable waterMark; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRAudioOutputClusterOutputInfo : NSObject @@ -914,7 +919,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull name; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRApplicationLauncherClusterApplication : NSObject @@ -922,7 +927,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull applicationId; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRApplicationLauncherClusterApplicationEP : NSObject @@ -930,7 +935,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nullable endpoint; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRApplicationBasicClusterApplicationBasicApplication : NSObject @@ -938,7 +943,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull applicationId; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterSimpleStruct : NSObject @@ -952,7 +957,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull h; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestFabricScoped : NSObject @@ -966,7 +971,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterNullablesAndOptionalsStruct : NSObject @@ -984,7 +989,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nullable nullableOptionalList; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterNestedStruct : NSObject @@ -993,7 +998,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull c; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterNestedStructList : NSObject @@ -1006,14 +1011,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull g; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterDoubleNestedStructList : NSObject @property (nonatomic, copy) NSArray * _Nonnull a; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestListStructOctet : NSObject @@ -1021,7 +1026,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSData * _Nonnull member2; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestEventEvent : NSObject @@ -1033,14 +1038,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSArray * _Nonnull arg6; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end @interface MTRTestClusterClusterTestFabricScopedEventEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; +- (id)copyWithZone:(nullable NSZone *)zone; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 68f0f24b08a146..a19e6152b59350 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #import "MTRStructsObjc.h" NS_ASSUME_NONNULL_BEGIN @@ -31,7 +33,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRScenesClusterAttributeValuePair alloc] init]; @@ -62,7 +64,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRScenesClusterExtensionFieldSet alloc] init]; @@ -93,7 +95,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRDescriptorClusterDeviceTypeStruct alloc] init]; @@ -112,6 +114,19 @@ - (NSString *)description @end +@implementation MTRDescriptorClusterDeviceType + +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDescriptorClusterDeviceType alloc] init]; + other.type = self.type; + other.revision = self.revision; + + return other; +} + +@end + @implementation MTRBindingClusterTargetStruct - (instancetype)init { @@ -130,7 +145,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRBindingClusterTargetStruct alloc] init]; @@ -166,7 +181,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRAccessControlClusterTarget alloc] init]; @@ -204,7 +219,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRAccessControlClusterAccessControlEntry alloc] init]; @@ -239,7 +254,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRAccessControlClusterExtensionEntry alloc] init]; @@ -276,7 +291,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRAccessControlClusterAccessControlEntryChangedEvent alloc] init]; @@ -317,7 +332,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRAccessControlClusterAccessControlExtensionChangedEvent alloc] init]; @@ -360,7 +375,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRActionsClusterActionStruct alloc] init]; @@ -400,7 +415,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRActionsClusterEndpointListStruct alloc] init]; @@ -435,7 +450,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRActionsClusterStateChangedEvent alloc] init]; @@ -471,7 +486,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRActionsClusterActionFailedEvent alloc] init]; @@ -504,7 +519,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRBasicClusterCapabilityMinimaStruct alloc] init]; @@ -533,7 +548,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRBasicClusterStartUpEvent alloc] init]; @@ -559,7 +574,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRBasicClusterShutDownEvent alloc] init]; @@ -584,7 +599,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRBasicClusterLeaveEvent alloc] init]; @@ -612,7 +627,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRBasicClusterReachableChangedEvent alloc] init]; @@ -630,7 +645,7 @@ - (NSString *)description @end -@implementation MTROTASoftwareUpdateRequestorClusterProviderLocation +@implementation MTROtaSoftwareUpdateRequestorClusterProviderLocation - (instancetype)init { if (self = [super init]) { @@ -644,9 +659,9 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { - auto other = [[MTROTASoftwareUpdateRequestorClusterProviderLocation alloc] init]; + auto other = [[MTROtaSoftwareUpdateRequestorClusterProviderLocation alloc] init]; other.providerNodeID = self.providerNodeID; other.endpoint = self.endpoint; @@ -664,7 +679,7 @@ - (NSString *)description @end -@implementation MTROTASoftwareUpdateRequestorClusterStateTransitionEvent +@implementation MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent - (instancetype)init { if (self = [super init]) { @@ -680,9 +695,9 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { - auto other = [[MTROTASoftwareUpdateRequestorClusterStateTransitionEvent alloc] init]; + auto other = [[MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent alloc] init]; other.previousState = self.previousState; other.newState = self.newState; @@ -702,7 +717,7 @@ - (NSString *)description @end -@implementation MTROTASoftwareUpdateRequestorClusterVersionAppliedEvent +@implementation MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent - (instancetype)init { if (self = [super init]) { @@ -714,9 +729,9 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { - auto other = [[MTROTASoftwareUpdateRequestorClusterVersionAppliedEvent alloc] init]; + auto other = [[MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent alloc] init]; other.softwareVersion = self.softwareVersion; other.productID = self.productID; @@ -733,7 +748,7 @@ - (NSString *)description @end -@implementation MTROTASoftwareUpdateRequestorClusterDownloadErrorEvent +@implementation MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent - (instancetype)init { if (self = [super init]) { @@ -749,9 +764,9 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { - auto other = [[MTROTASoftwareUpdateRequestorClusterDownloadErrorEvent alloc] init]; + auto other = [[MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent alloc] init]; other.softwareVersion = self.softwareVersion; other.bytesDownloaded = self.bytesDownloaded; @@ -783,7 +798,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPowerSourceClusterBatChargeFaultChangeType alloc] init]; @@ -814,7 +829,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPowerSourceClusterBatFaultChangeType alloc] init]; @@ -845,7 +860,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPowerSourceClusterWiredFaultChangeType alloc] init]; @@ -876,7 +891,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRGeneralCommissioningClusterBasicCommissioningInfo alloc] init]; @@ -908,7 +923,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRNetworkCommissioningClusterNetworkInfo alloc] init]; @@ -952,7 +967,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRNetworkCommissioningClusterThreadInterfaceScanResult alloc] init]; @@ -1000,7 +1015,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRNetworkCommissioningClusterWiFiInterfaceScanResult alloc] init]; @@ -1049,7 +1064,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRGeneralDiagnosticsClusterNetworkInterfaceType alloc] init]; @@ -1089,7 +1104,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent alloc] init]; @@ -1120,7 +1135,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRGeneralDiagnosticsClusterRadioFaultChangeEvent alloc] init]; @@ -1151,7 +1166,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent alloc] init]; @@ -1180,7 +1195,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRGeneralDiagnosticsClusterBootReasonEvent alloc] init]; @@ -1216,7 +1231,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRSoftwareDiagnosticsClusterThreadMetrics alloc] init]; @@ -1253,7 +1268,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRSoftwareDiagnosticsClusterSoftwareFaultEvent alloc] init]; @@ -1310,7 +1325,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRThreadNetworkDiagnosticsClusterNeighborTable alloc] init]; @@ -1377,7 +1392,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents alloc] init]; @@ -1439,7 +1454,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRThreadNetworkDiagnosticsClusterRouteTable alloc] init]; @@ -1481,7 +1496,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRThreadNetworkDiagnosticsClusterSecurityPolicy alloc] init]; @@ -1510,7 +1525,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent alloc] init]; @@ -1540,7 +1555,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent alloc] init]; @@ -1569,7 +1584,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent alloc] init]; @@ -1599,7 +1614,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent alloc] init]; @@ -1628,7 +1643,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent alloc] init]; @@ -1660,7 +1675,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRTimeSynchronizationClusterDstOffsetType alloc] init]; @@ -1694,7 +1709,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRTimeSynchronizationClusterTimeZoneType alloc] init]; @@ -1724,7 +1739,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRBridgedDeviceBasicClusterStartUpEvent alloc] init]; @@ -1750,7 +1765,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRBridgedDeviceBasicClusterShutDownEvent alloc] init]; @@ -1773,7 +1788,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRBridgedDeviceBasicClusterLeaveEvent alloc] init]; @@ -1798,7 +1813,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRBridgedDeviceBasicClusterReachableChangedEvent alloc] init]; @@ -1826,7 +1841,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRSwitchClusterSwitchLatchedEvent alloc] init]; @@ -1854,7 +1869,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRSwitchClusterInitialPressEvent alloc] init]; @@ -1882,7 +1897,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRSwitchClusterLongPressEvent alloc] init]; @@ -1910,7 +1925,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRSwitchClusterShortReleaseEvent alloc] init]; @@ -1938,7 +1953,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRSwitchClusterLongReleaseEvent alloc] init]; @@ -1968,7 +1983,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRSwitchClusterMultiPressOngoingEvent alloc] init]; @@ -1999,7 +2014,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRSwitchClusterMultiPressCompleteEvent alloc] init]; @@ -2038,7 +2053,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTROperationalCredentialsClusterFabricDescriptor alloc] init]; @@ -2077,7 +2092,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTROperationalCredentialsClusterNOCStruct alloc] init]; @@ -2114,7 +2129,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRGroupKeyManagementClusterGroupInfoMapStruct alloc] init]; @@ -2149,7 +2164,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; @@ -2193,7 +2208,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; @@ -2234,7 +2249,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRFixedLabelClusterLabelStruct alloc] init]; @@ -2265,7 +2280,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRUserLabelClusterLabelStruct alloc] init]; @@ -2294,7 +2309,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRBooleanStateClusterStateChangeEvent alloc] init]; @@ -2324,7 +2339,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRModeSelectClusterSemanticTag alloc] init]; @@ -2357,7 +2372,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRModeSelectClusterModeOptionStruct alloc] init]; @@ -2389,7 +2404,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRDoorLockClusterDlCredential alloc] init]; @@ -2418,7 +2433,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRDoorLockClusterDoorLockAlarmEvent alloc] init]; @@ -2445,7 +2460,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRDoorLockClusterDoorStateChangeEvent alloc] init]; @@ -2482,7 +2497,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRDoorLockClusterLockOperationEvent alloc] init]; @@ -2529,7 +2544,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRDoorLockClusterLockOperationErrorEvent alloc] init]; @@ -2577,7 +2592,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRDoorLockClusterLockUserChangeEvent alloc] init]; @@ -2611,7 +2626,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent alloc] init]; @@ -2634,7 +2649,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent alloc] init]; @@ -2657,7 +2672,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent alloc] init]; @@ -2680,7 +2695,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterSystemPressureLowEvent alloc] init]; @@ -2703,7 +2718,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterSystemPressureHighEvent alloc] init]; @@ -2726,7 +2741,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterDryRunningEvent alloc] init]; @@ -2749,7 +2764,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent alloc] init]; @@ -2772,7 +2787,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent alloc] init]; @@ -2795,7 +2810,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent alloc] init]; @@ -2818,7 +2833,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterPumpBlockedEvent alloc] init]; @@ -2841,7 +2856,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterSensorFailureEvent alloc] init]; @@ -2864,7 +2879,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent alloc] init]; @@ -2887,7 +2902,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent alloc] init]; @@ -2910,7 +2925,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterGeneralFaultEvent alloc] init]; @@ -2933,7 +2948,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterLeakageEvent alloc] init]; @@ -2956,7 +2971,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterAirDetectionEvent alloc] init]; @@ -2979,7 +2994,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRPumpConfigurationAndControlClusterTurbineOperationEvent alloc] init]; @@ -3008,7 +3023,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRThermostatClusterThermostatScheduleTransition alloc] init]; @@ -3046,7 +3061,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRChannelClusterChannelInfo alloc] init]; @@ -3085,7 +3100,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRChannelClusterLineupInfo alloc] init]; @@ -3119,7 +3134,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRTargetNavigatorClusterTargetInfo alloc] init]; @@ -3150,7 +3165,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRMediaPlaybackClusterPlaybackPosition alloc] init]; @@ -3185,7 +3200,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRMediaInputClusterInputInfo alloc] init]; @@ -3220,7 +3235,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRContentLauncherClusterDimension alloc] init]; @@ -3252,7 +3267,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRContentLauncherClusterAdditionalInfo alloc] init]; @@ -3285,7 +3300,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRContentLauncherClusterParameter alloc] init]; @@ -3315,7 +3330,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRContentLauncherClusterContentSearch alloc] init]; @@ -3347,7 +3362,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRContentLauncherClusterStyleInformation alloc] init]; @@ -3387,7 +3402,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRContentLauncherClusterBrandingInformation alloc] init]; @@ -3425,7 +3440,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRAudioOutputClusterOutputInfo alloc] init]; @@ -3457,7 +3472,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRApplicationLauncherClusterApplication alloc] init]; @@ -3488,7 +3503,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRApplicationLauncherClusterApplicationEP alloc] init]; @@ -3519,7 +3534,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRApplicationBasicClusterApplicationBasicApplication alloc] init]; @@ -3562,7 +3577,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRTestClusterClusterSimpleStruct alloc] init]; @@ -3612,7 +3627,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRTestClusterClusterTestFabricScoped alloc] init]; @@ -3674,7 +3689,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRTestClusterClusterNullablesAndOptionalsStruct alloc] init]; @@ -3722,7 +3737,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRTestClusterClusterNestedStruct alloc] init]; @@ -3764,7 +3779,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRTestClusterClusterNestedStructList alloc] init]; @@ -3798,7 +3813,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRTestClusterClusterDoubleNestedStructList alloc] init]; @@ -3827,7 +3842,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRTestClusterClusterTestListStructOctet alloc] init]; @@ -3866,7 +3881,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRTestClusterClusterTestEventEvent alloc] init]; @@ -3899,7 +3914,7 @@ - (instancetype)init return self; } -- (id)copyWithZone:(NSZone * _Nullable)zone +- (id)copyWithZone:(nullable NSZone *)zone { auto other = [[MTRTestClusterClusterTestFabricScopedEventEvent alloc] init]; diff --git a/src/darwin/Framework/CHIPTests/MTRCertificateTests.m b/src/darwin/Framework/CHIPTests/MTRCertificateTests.m index e42ea141a1c987..a62d7e4f40fc94 100644 --- a/src/darwin/Framework/CHIPTests/MTRCertificateTests.m +++ b/src/darwin/Framework/CHIPTests/MTRCertificateTests.m @@ -32,7 +32,7 @@ - (void)testGenerateRootCert __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * rootCert = [MTRCertificates createRootCertificate:testKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * rootCert = [MTRCertificates generateRootCertificate:testKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(rootCert); } @@ -41,18 +41,18 @@ - (void)testGenerateIntermediateCert __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * rootCert = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * rootCert = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(rootCert); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediateCert = [MTRCertificates createIntermediateCertificate:rootKeys - rootCertificate:rootCert - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediateCert = [MTRCertificates generateIntermediateCertificate:rootKeys + rootCertificate:rootCert + intermediatePublicKey:intermediateKeys.publicKey + issuerId:nil + fabricId:nil + error:nil]; XCTAssertNotNil(intermediateCert); } @@ -61,7 +61,7 @@ - (void)testGenerateOperationalCertNoIntermediate __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * rootCert = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * rootCert = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(rootCert); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; @@ -73,13 +73,13 @@ - (void)testGenerateOperationalCertNoIntermediate [cats addObject:@0x00020001]; [cats addObject:@0x0003FFFF]; - __auto_type * operationalCert = [MTRCertificates createOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:cats - error:nil]; + __auto_type * operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricId:@1 + nodeId:@1 + caseAuthenticatedTags:cats + error:nil]; XCTAssertNotNil(operationalCert); } @@ -88,30 +88,30 @@ - (void)testGenerateOperationalCertWithIntermediate __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * rootCert = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * rootCert = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(rootCert); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediateCert = [MTRCertificates createIntermediateCertificate:rootKeys - rootCertificate:rootCert - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediateCert = [MTRCertificates generateIntermediateCertificate:rootKeys + rootCertificate:rootCert + intermediatePublicKey:intermediateKeys.publicKey + issuerId:nil + fabricId:nil + error:nil]; XCTAssertNotNil(intermediateCert); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * operationalCert = [MTRCertificates createOperationalCertificate:intermediateKeys - signingCertificate:intermediateCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:nil - error:nil]; + __auto_type * operationalCert = [MTRCertificates generateOperationalCertificate:intermediateKeys + signingCertificate:intermediateCert + operationalPublicKey:operationalKeys.publicKey + fabricId:@1 + nodeId:@1 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNotNil(operationalCert); } @@ -120,7 +120,7 @@ - (void)testGenerateOperationalCertErrorCases __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * rootCert = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * rootCert = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(rootCert); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; @@ -150,93 +150,93 @@ - (void)testGenerateOperationalCertErrorCases [catsWithInvalidVersion addObject:@0x00020000]; // Check basic case works - __auto_type * operationalCert = [MTRCertificates createOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:nil - error:nil]; + __auto_type * operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricId:@1 + nodeId:@1 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNotNil(operationalCert); // CATs too long - operationalCert = [MTRCertificates createOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:longCats - error:nil]; + operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricId:@1 + nodeId:@1 + caseAuthenticatedTags:longCats + error:nil]; XCTAssertNil(operationalCert); // Multiple CATs with the same identifier but different versions - operationalCert = [MTRCertificates createOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:catsWithSameIdentifier - error:nil]; + operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricId:@1 + nodeId:@1 + caseAuthenticatedTags:catsWithSameIdentifier + error:nil]; XCTAssertNil(operationalCert); // Multiple CATs with the same identifier and same version - operationalCert = [MTRCertificates createOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:catsWithDuplicatedCAT - error:nil]; + operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricId:@1 + nodeId:@1 + caseAuthenticatedTags:catsWithDuplicatedCAT + error:nil]; XCTAssertNil(operationalCert); // CAT with invalid version - operationalCert = [MTRCertificates createOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:catsWithInvalidVersion - error:nil]; + operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricId:@1 + nodeId:@1 + caseAuthenticatedTags:catsWithInvalidVersion + error:nil]; XCTAssertNil(operationalCert); // Signing key mismatch - operationalCert = [MTRCertificates createOperationalCertificate:operationalKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@1 - caseAuthenticatedTags:nil - error:nil]; + operationalCert = [MTRCertificates generateOperationalCertificate:operationalKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricId:@1 + nodeId:@1 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNil(operationalCert); // Invalid fabric id - operationalCert = [MTRCertificates createOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@0 - nodeID:@1 - caseAuthenticatedTags:nil - error:nil]; + operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricId:@0 + nodeId:@1 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNil(operationalCert); // Undefined node id - operationalCert = [MTRCertificates createOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@0 - caseAuthenticatedTags:nil - error:nil]; + operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricId:@1 + nodeId:@0 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNil(operationalCert); // Non-operational node id - operationalCert = [MTRCertificates createOperationalCertificate:rootKeys - signingCertificate:rootCert - operationalPublicKey:operationalKeys.publicKey - fabricID:@1 - nodeID:@(0xFFFFFFFFFFFFFFFFLLU) - caseAuthenticatedTags:nil - error:nil]; + operationalCert = [MTRCertificates generateOperationalCertificate:rootKeys + signingCertificate:rootCert + operationalPublicKey:operationalKeys.publicKey + fabricId:@1 + nodeId:@(0xFFFFFFFFFFFFFFFFLLU) + caseAuthenticatedTags:nil + error:nil]; XCTAssertNil(operationalCert); } @@ -245,7 +245,7 @@ - (void)testGenerateCSR __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * csr = [MTRCertificates createCertificateSigningRequest:testKeys error:nil]; + __auto_type * csr = [MTRCertificates generateCertificateSigningRequest:testKeys error:nil]; XCTAssertNotNil(csr); // Wish there was something we could test here about the CSR. diff --git a/src/darwin/Framework/CHIPTests/MTRControllerTests.m b/src/darwin/Framework/CHIPTests/MTRControllerTests.m index f118d429ca8ac2..de998162500dce 100644 --- a/src/darwin/Framework/CHIPTests/MTRControllerTests.m +++ b/src/darwin/Framework/CHIPTests/MTRControllerTests.m @@ -37,45 +37,45 @@ @implementation MTRControllerTests - (void)testFactoryLifecycle { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); XCTAssertFalse([factory isRunning]); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); // Now try to restart the factory. - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerLifecycle { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -83,7 +83,7 @@ - (void)testControllerLifecycle XCTAssertFalse([controller isRunning]); // now try to restart the controller - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -91,177 +91,182 @@ - (void)testControllerLifecycle XCTAssertFalse([controller isRunning]); // now try to restart the controller without providing a vendor id. - params.vendorID = nil; - controller = [factory createControllerOnExistingFabric:params error:nil]; + params.vendorId = nil; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testFactoryShutdownShutsDownController { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); XCTAssertFalse([controller isRunning]); } - (void)testControllerMultipleShutdown { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertTrue([controller isRunning]); for (int i = 0; i < 5; i++) { [controller shutdown]; XCTAssertFalse([controller isRunning]); } - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerWithOTAProviderDelegate { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * otaProvider = [[MTRTestOTAProvider alloc] init]; __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; factoryParams.otaProviderDelegate = otaProvider; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + params.vendorId = @(kTestVendorId); + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertTrue([controller isRunning]); [controller shutdown]; // OTA Provider depends on the system state maintained by CHIPDeviceControllerFactory that is destroyed when // the controller count goes down to 0. Make sure that a new controller can still be started successfully onto the // same fabric. - MTRDeviceController * controller2 = [factory createControllerOnExistingFabric:params error:nil]; + MTRDeviceController * controller2 = [factory startControllerOnExistingFabric:params]; XCTAssertTrue([controller2 isRunning]); [controller2 shutdown]; // Check that a new controller can be started on a different fabric too. - __auto_type * params2 = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(2) nocSigner:testKeys]; + __auto_type * params2 = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:2 ipk:testKeys.ipk]; XCTAssertNotNil(params2); - params2.vendorID = @(kTestVendorId); + params2.vendorId = @(kTestVendorId); - MTRDeviceController * controller3 = [factory createControllerOnNewFabric:params2 error:nil]; + MTRDeviceController * controller3 = [factory startControllerOnNewFabric:params2]; XCTAssertTrue([controller3 isRunning]); [controller3 shutdown]; // Stop the factory, start it up again and create a controller to ensure that no dead state from the previous // ota provider delegate is staying around. - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); - MTRDeviceController * controller4 = [factory createControllerOnExistingFabric:params2 error:nil]; + MTRDeviceController * controller4 = [factory startControllerOnExistingFabric:params2]; XCTAssertTrue([controller4 isRunning]); [controller4 shutdown]; - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerInvalidAccess { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertTrue([controller isRunning]); [controller shutdown]; XCTAssertFalse([controller isRunning]); + XCTAssertFalse([controller getBaseDevice:1234 + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable chipDevice, NSError * _Nullable error) { + XCTAssertEqual(error.code, MTRErrorCodeInvalidState); + }]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerNewFabricMatchesOldFabric { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -270,82 +275,82 @@ - (void)testControllerNewFabricMatchesOldFabric // now try to start a new controller on a new fabric but using the // same params; this should fail. - XCTAssertNil([factory createControllerOnNewFabric:params error:nil]); + XCTAssertNil([factory startControllerOnNewFabric:params]); XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerExistingFabricMatchesRunningController { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); // Now try to start a new controller on the same fabric. This should fail. - XCTAssertNil([factory createControllerOnExistingFabric:params error:nil]); + XCTAssertNil([factory startControllerOnExistingFabric:params]); XCTAssertTrue([controller isRunning]); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartControllersOnTwoFabricIds { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params1 = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; + __auto_type * params1 = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; XCTAssertNotNil(params1); - params1.vendorID = @(kTestVendorId); + params1.vendorId = @(kTestVendorId); - MTRDeviceController * controller1 = [factory createControllerOnNewFabric:params1 error:nil]; + MTRDeviceController * controller1 = [factory startControllerOnNewFabric:params1]; XCTAssertNotNil(controller1); XCTAssertTrue([controller1 isRunning]); // Now try to start a new controller with the same root but a // different fabric id. - __auto_type * params2 = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(2) nocSigner:testKeys]; + __auto_type * params2 = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:2 ipk:testKeys.ipk]; XCTAssertNotNil(params2); - params2.vendorID = @(kTestVendorId); + params2.vendorId = @(kTestVendorId); - MTRDeviceController * controller2 = [factory createControllerOnNewFabric:params2 error:nil]; + MTRDeviceController * controller2 = [factory startControllerOnNewFabric:params2]; XCTAssertNotNil(controller2); XCTAssertTrue([controller2 isRunning]); - XCTAssertNil([factory createControllerOnExistingFabric:params2 error:nil]); + XCTAssertNil([factory startControllerOnExistingFabric:params2]); [controller1 shutdown]; XCTAssertFalse([controller1 isRunning]); @@ -353,39 +358,39 @@ - (void)testControllerStartControllersOnTwoFabricIds [controller2 shutdown]; XCTAssertFalse([controller2 isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartControllerSameFabricWrongSubject { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * root1 = [MTRCertificates createRootCertificate:testKeys issuerID:@1 fabricID:@1 error:nil]; + __auto_type * root1 = [MTRCertificates generateRootCertificate:testKeys issuerId:@1 fabricId:@1 error:nil]; XCTAssertNotNil(root1); - __auto_type * root2 = [MTRCertificates createRootCertificate:testKeys issuerID:@1 fabricID:@1 error:nil]; + __auto_type * root2 = [MTRCertificates generateRootCertificate:testKeys issuerId:@1 fabricId:@1 error:nil]; XCTAssertNotNil(root2); - __auto_type * root3 = [MTRCertificates createRootCertificate:testKeys issuerID:@2 fabricID:@1 error:nil]; + __auto_type * root3 = [MTRCertificates generateRootCertificate:testKeys issuerId:@2 fabricId:@1 error:nil]; XCTAssertNotNil(root3); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); params.rootCertificate = root1; - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -395,11 +400,11 @@ - (void)testControllerStartControllerSameFabricWrongSubject // Now try to start a new controller on the same fabric with what should be // a compatible root certificate. params.rootCertificate = root2; - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - NSNumber * nodeId = [controller controllerNodeID]; + NSNumber * nodeId = [controller controllerNodeId]; [controller shutdown]; XCTAssertFalse([controller isRunning]); @@ -409,7 +414,7 @@ - (void)testControllerStartControllerSameFabricWrongSubject // reasons, including our existing operational certificate not matching this // root. params.rootCertificate = root3; - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNil(controller); // Now try to start a new controller on the same fabric but with a root @@ -417,46 +422,46 @@ - (void)testControllerStartControllerSameFabricWrongSubject // operational certificate. This should fail because our root of trust for // the fabric would change if we allowed this. params.rootCertificate = root3; - params.nodeID = nodeId; - controller = [factory createControllerOnExistingFabric:params error:nil]; + params.nodeId = nodeId; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNil(controller); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerFabricIdRootCertMismatch { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * root1 = [MTRCertificates createRootCertificate:testKeys issuerID:@1 fabricID:@1 error:nil]; + __auto_type * root1 = [MTRCertificates generateRootCertificate:testKeys issuerId:@1 fabricId:@1 error:nil]; XCTAssertNotNil(root1); - __auto_type * root2 = [MTRCertificates createRootCertificate:testKeys issuerID:@1 fabricID:@2 error:nil]; + __auto_type * root2 = [MTRCertificates generateRootCertificate:testKeys issuerId:@1 fabricId:@2 error:nil]; XCTAssertNotNil(root2); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); // Try to start controller when fabric id in root cert subject does not match provided fabric id. params.rootCertificate = root2; - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNil(controller); // Start controller when the fabric ids do match. params.rootCertificate = root1; - controller = [factory createControllerOnNewFabric:params error:nil]; + controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -464,7 +469,7 @@ - (void)testControllerFabricIdRootCertMismatch XCTAssertFalse([controller isRunning]); // Re-start controller on the new fabric. - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -474,21 +479,21 @@ - (void)testControllerFabricIdRootCertMismatch // Now try to restart controller on the fabric, but with the wrong fabric id // in the root cert. params.rootCertificate = root2; - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNil(controller); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerSignerDoesNotMatchRoot { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; @@ -497,740 +502,740 @@ - (void)testControllerSignerDoesNotMatchRoot __auto_type * signerKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(signerKeys); - __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(root); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:signerKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:signerKeys fabricId:1 ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); params.rootCertificate = root; // Try to start controller when there is no ICA and root cert does not match signing key. params.rootCertificate = root; - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNil(controller); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerSignerKeyWithIntermediate { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediate = [MTRCertificates createIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate = [MTRCertificates generateIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys.publicKey + issuerId:nil + fabricId:nil + error:nil]; XCTAssertNotNil(intermediate); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys fabricId:1 ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); // Try to start controller when there is an ICA and the ICA cert does not match signing key. params.rootCertificate = root; params.intermediateCertificate = intermediate; - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNil(controller); // Now start controller with the signing key matching the intermediate cert. - params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:intermediateKeys]; - params.vendorID = @(kTestVendorId); + params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:intermediateKeys fabricId:1 ipk:rootKeys.ipk]; + params.vendorId = @(kTestVendorId); params.rootCertificate = root; params.intermediateCertificate = intermediate; - controller = [factory createControllerOnNewFabric:params error:nil]; + controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartupParamsInvalidFabric { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); // Invalid fabric ID. - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(0) nocSigner:rootKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys fabricId:0 ipk:rootKeys.ipk]; XCTAssertNil(params); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartupParamsInvalidVendor { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys fabricId:1 ipk:rootKeys.ipk]; XCTAssertNotNil(params); // Invalid vendor ID ("standard"). - params.vendorID = @(0); + params.vendorId = @(0); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNil(controller); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartupNodeIdPreserved { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys fabricId:1 ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - NSNumber * nodeId = [controller controllerNodeID]; + NSNumber * nodeId = [controller controllerNodeId]; [controller shutdown]; XCTAssertFalse([controller isRunning]); - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], nodeId); + XCTAssertEqualObjects([controller controllerNodeId], nodeId); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartupNodeIdUsed { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys fabricId:1 ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); // Bring up with node id 17. - params.nodeID = @17; - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + params.nodeId = @17; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], @17); + XCTAssertEqualObjects([controller controllerNodeId], @17); [controller shutdown]; XCTAssertFalse([controller isRunning]); // Bring up with a different node id (18). - params.nodeID = @18; - controller = [factory createControllerOnExistingFabric:params error:nil]; + params.nodeId = @18; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], @18); + XCTAssertEqualObjects([controller controllerNodeId], @18); [controller shutdown]; XCTAssertFalse([controller isRunning]); // Verify the new node id has been stored. - params.nodeID = nil; - controller = [factory createControllerOnExistingFabric:params error:nil]; + params.nodeId = nil; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], @18); + XCTAssertEqualObjects([controller controllerNodeId], @18); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerStartupNodeIdValidation { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys fabricId:1 ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); // Try to bring up with node id 0. - params.nodeID = @0; - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + params.nodeId = @0; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNil(controller); // Try to bring up with node id that is outside of the operational range. - params.nodeID = @(0xFFFFFFFF00000000ULL); - controller = [factory createControllerOnNewFabric:params error:nil]; + params.nodeId = @(0xFFFFFFFF00000000ULL); + controller = [factory startControllerOnNewFabric:params]; XCTAssertNil(controller); // Verify that we can indeed bring up a controller for this fabric, with a valid node id. - params.nodeID = @17; - controller = [factory createControllerOnNewFabric:params error:nil]; + params.nodeId = @17; + controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], @17); + XCTAssertEqualObjects([controller controllerNodeId], @17); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerRotateToICA { // Tests that we can switch a fabric from not using an ICA to using an ICA. - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediate = [MTRCertificates createIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate = [MTRCertificates generateIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys.publicKey + issuerId:nil + fabricId:nil + error:nil]; XCTAssertNotNil(intermediate); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys fabricId:1 ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); // Create a new fabric without the ICA. params.rootCertificate = root; - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - NSNumber * nodeId = [controller controllerNodeID]; + NSNumber * nodeId = [controller controllerNodeId]; [controller shutdown]; XCTAssertFalse([controller isRunning]); // Now start controller on the same fabric but using the ICA. - params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:intermediateKeys]; - params.vendorID = @(kTestVendorId); + params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:intermediateKeys fabricId:1 ipk:rootKeys.ipk]; + params.vendorId = @(kTestVendorId); params.rootCertificate = root; params.intermediateCertificate = intermediate; - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], nodeId); + XCTAssertEqualObjects([controller controllerNodeId], nodeId); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerRotateFromICA { // Tests that we can switch a fabric from using an ICA to not using an ICA. - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediate = [MTRCertificates createIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate = [MTRCertificates generateIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys.publicKey + issuerId:nil + fabricId:nil + error:nil]; XCTAssertNotNil(intermediate); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk - fabricID:@(1) - nocSigner:intermediateKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:intermediateKeys + fabricId:1 + ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); // Create a new fabric without the ICA. params.rootCertificate = root; params.intermediateCertificate = intermediate; - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - NSNumber * nodeId = [controller controllerNodeID]; + NSNumber * nodeId = [controller controllerNodeId]; [controller shutdown]; XCTAssertFalse([controller isRunning]); // Now start controller on the same fabric but without using the ICA. - params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; - params.vendorID = @(kTestVendorId); + params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys fabricId:1 ipk:rootKeys.ipk]; + params.vendorId = @(kTestVendorId); params.rootCertificate = root; - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], nodeId); + XCTAssertEqualObjects([controller controllerNodeId], nodeId); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerRotateICA { // Tests that we can change the ICA being used for a fabric. - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys1 = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys1); - __auto_type * intermediate1 = [MTRCertificates createIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys1.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate1 = [MTRCertificates generateIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys1.publicKey + issuerId:nil + fabricId:nil + error:nil]; XCTAssertNotNil(intermediate1); __auto_type * intermediateKeys2 = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys2); - __auto_type * intermediate2 = [MTRCertificates createIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys2.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate2 = [MTRCertificates generateIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys2.publicKey + issuerId:nil + fabricId:nil + error:nil]; XCTAssertNotNil(intermediate2); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk - fabricID:@(1) - nocSigner:intermediateKeys1]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:intermediateKeys1 + fabricId:1 + ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); // Create a new fabric without the first ICA. params.rootCertificate = root; params.intermediateCertificate = intermediate1; - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - NSNumber * nodeId = [controller controllerNodeID]; + NSNumber * nodeId = [controller controllerNodeId]; [controller shutdown]; XCTAssertFalse([controller isRunning]); // Now start controller on the same fabric but using the second ICA. - params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:intermediateKeys2]; - params.vendorID = @(kTestVendorId); + params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:intermediateKeys2 fabricId:1 ipk:rootKeys.ipk]; + params.vendorId = @(kTestVendorId); params.rootCertificate = root; params.intermediateCertificate = intermediate2; - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], nodeId); + XCTAssertEqualObjects([controller controllerNodeId], nodeId); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerICAWithoutRoot { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediate = [MTRCertificates createIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate = [MTRCertificates generateIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys.publicKey + issuerId:nil + fabricId:nil + error:nil]; XCTAssertNotNil(intermediate); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk - fabricID:@(1) - nocSigner:intermediateKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:intermediateKeys + fabricId:1 + ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); // Pass in an intermediate but no root. Should fail. params.intermediateCertificate = intermediate; - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNil(controller); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerProvideFullCertChain { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediate = [MTRCertificates createIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:nil - error:nil]; + __auto_type * intermediate = [MTRCertificates generateIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys.publicKey + issuerId:nil + fabricId:nil + error:nil]; XCTAssertNotNil(intermediate); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * operational = [MTRCertificates createOperationalCertificate:intermediateKeys - signingCertificate:intermediate - operationalPublicKey:operationalKeys.publicKey - fabricID:@123 - nodeID:@456 - caseAuthenticatedTags:nil - error:nil]; + __auto_type * operational = [MTRCertificates generateOperationalCertificate:intermediateKeys + signingCertificate:intermediate + operationalPublicKey:operationalKeys.publicKey + fabricId:@123 + nodeId:@456 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNotNil(operational); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk - operationalKeypair:operationalKeys - operationalCertificate:operational - intermediateCertificate:intermediate - rootCertificate:root]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithOperationalKeypair:operationalKeys + operationalCertificate:operational + intermediateCertificate:intermediate + rootCertificate:root + ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], @456); + XCTAssertEqualObjects([controller controllerNodeId], @456); [controller shutdown]; XCTAssertFalse([controller isRunning]); // Trying to bring up another new fabric with the same root and NOC should fail. - controller = [factory createControllerOnNewFabric:params error:nil]; + controller = [factory startControllerOnNewFabric:params]; XCTAssertNil(controller); // Trying to bring up the same fabric should succeed. - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], @456); + XCTAssertEqualObjects([controller controllerNodeId], @456); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerProvideCertChainNoICA { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:nil error:nil]; + __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:nil error:nil]; XCTAssertNotNil(root); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * operational = [MTRCertificates createOperationalCertificate:rootKeys - signingCertificate:root - operationalPublicKey:operationalKeys.publicKey - fabricID:@123 - nodeID:@456 - caseAuthenticatedTags:nil - error:nil]; + __auto_type * operational = [MTRCertificates generateOperationalCertificate:rootKeys + signingCertificate:root + operationalPublicKey:operationalKeys.publicKey + fabricId:@123 + nodeId:@456 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNotNil(operational); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk - operationalKeypair:operationalKeys - operationalCertificate:operational - intermediateCertificate:nil - rootCertificate:root]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithOperationalKeypair:operationalKeys + operationalCertificate:operational + intermediateCertificate:nil + rootCertificate:root + ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], @456); + XCTAssertEqualObjects([controller controllerNodeId], @456); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerCertChainFabricMismatchRoot { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:@111 error:nil]; + __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:@111 error:nil]; XCTAssertNotNil(root); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * operational = [MTRCertificates createOperationalCertificate:rootKeys - signingCertificate:root - operationalPublicKey:operationalKeys.publicKey - fabricID:@123 - nodeID:@456 - caseAuthenticatedTags:nil - error:nil]; + __auto_type * operational = [MTRCertificates generateOperationalCertificate:rootKeys + signingCertificate:root + operationalPublicKey:operationalKeys.publicKey + fabricId:@123 + nodeId:@456 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNotNil(operational); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk - operationalKeypair:operationalKeys - operationalCertificate:operational - intermediateCertificate:nil - rootCertificate:root]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithOperationalKeypair:operationalKeys + operationalCertificate:operational + intermediateCertificate:nil + rootCertificate:root + ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNil(controller); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerCertChainFabricMismatchIntermediate { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(rootKeys); - __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:nil fabricID:@123 error:nil]; + __auto_type * root = [MTRCertificates generateRootCertificate:rootKeys issuerId:nil fabricId:@123 error:nil]; XCTAssertNotNil(root); __auto_type * intermediateKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(intermediateKeys); - __auto_type * intermediate = [MTRCertificates createIntermediateCertificate:rootKeys - rootCertificate:root - intermediatePublicKey:intermediateKeys.publicKey - issuerID:nil - fabricID:@111 - error:nil]; + __auto_type * intermediate = [MTRCertificates generateIntermediateCertificate:rootKeys + rootCertificate:root + intermediatePublicKey:intermediateKeys.publicKey + issuerId:nil + fabricId:@111 + error:nil]; XCTAssertNotNil(intermediate); __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * operational = [MTRCertificates createOperationalCertificate:intermediateKeys - signingCertificate:intermediate - operationalPublicKey:operationalKeys.publicKey - fabricID:@123 - nodeID:@456 - caseAuthenticatedTags:nil - error:nil]; + __auto_type * operational = [MTRCertificates generateOperationalCertificate:intermediateKeys + signingCertificate:intermediate + operationalPublicKey:operationalKeys.publicKey + fabricId:@123 + nodeId:@456 + caseAuthenticatedTags:nil + error:nil]; XCTAssertNotNil(operational); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk - operationalKeypair:operationalKeys - operationalCertificate:operational - intermediateCertificate:intermediate - rootCertificate:root]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithOperationalKeypair:operationalKeys + operationalCertificate:operational + intermediateCertificate:intermediate + rootCertificate:root + ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNil(controller); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } - (void)testControllerExternallyProvidedOperationalKey { - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startControllerFactory:factoryParams error:nil]); + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); __auto_type * rootKeys = [[MTRTestKeys alloc] init]; @@ -1239,17 +1244,17 @@ - (void)testControllerExternallyProvidedOperationalKey __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:rootKeys.ipk fabricID:@(1) nocSigner:rootKeys]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:rootKeys fabricId:1 ipk:rootKeys.ipk]; XCTAssertNotNil(params); - params.vendorID = @(kTestVendorId); + params.vendorId = @(kTestVendorId); params.operationalKeypair = operationalKeys; - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - __auto_type nodeId = [controller controllerNodeID]; + __auto_type nodeId = [controller controllerNodeId]; [controller shutdown]; XCTAssertFalse([controller isRunning]); @@ -1258,17 +1263,17 @@ - (void)testControllerExternallyProvidedOperationalKey // keypair should now fail, because we won't know what operational keys to // use. params.operationalKeypair = nil; - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNil(controller); // But bringing up the controller with provided operational keys should // work, and have the same node id. params.operationalKeypair = operationalKeys; - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], nodeId); + XCTAssertEqualObjects([controller controllerNodeId], nodeId); [controller shutdown]; XCTAssertFalse([controller isRunning]); @@ -1279,16 +1284,16 @@ - (void)testControllerExternallyProvidedOperationalKey XCTAssertNotNil(newOperationalKeys); params.operationalKeypair = newOperationalKeys; - controller = [factory createControllerOnExistingFabric:params error:nil]; + controller = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); - XCTAssertEqualObjects([controller controllerNodeID], nodeId); + XCTAssertEqualObjects([controller controllerNodeId], nodeId); [controller shutdown]; XCTAssertFalse([controller isRunning]); - [factory stopControllerFactory]; + [factory shutdown]; XCTAssertFalse([factory isRunning]); } diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 71baaee0308a8f..e2480742783907 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -19,9 +19,9 @@ */ // module headers +#import #import #import -#import #import #import "MTRErrorTestUtils.h" @@ -39,11 +39,14 @@ #define MANUAL_INDIVIDUAL_TEST 0 static const uint16_t kPairingTimeoutInSeconds = 10; +static const uint16_t kCASESetupTimeoutInSeconds = 30; static const uint16_t kTimeoutInSeconds = 3; static const uint64_t kDeviceId = 0x12344321; -static NSString * kOnboardingPayload = @"MT:-24J0AFN00KA0648G00"; +static const uint32_t kSetupPINCode = 20202021; +static const uint16_t kRemotePort = 5540; static const uint16_t kLocalPort = 5541; -static const uint16_t kTestVendorId = 0xFFF1u; +static NSString * kAddress = @"::1"; +static uint16_t kTestVendorId = 0xFFF1u; // This test suite reuses a device object to speed up the test process for CI. // The following global variable holds the reference to the device object. @@ -60,12 +63,13 @@ static void WaitForCommissionee(XCTestExpectation * expectation) MTRDeviceController * controller = sController; XCTAssertNotNil(controller); - // For now keep the async dispatch, but could we just - // synchronously fulfill the expectation here? - dispatch_async(dispatch_get_main_queue(), ^{ - [expectation fulfill]; - mConnectedDevice = [MTRBaseDevice deviceWithNodeID:@(kDeviceId) controller:controller]; - }); + [controller getBaseDevice:kDeviceId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertEqual(error.code, 0); + [expectation fulfill]; + mConnectedDevice = device; + }]; } static MTRBaseDevice * GetConnectedDevice(void) @@ -76,15 +80,15 @@ static void WaitForCommissionee(XCTestExpectation * expectation) #ifdef DEBUG @interface MTRBaseDevice (Test) -- (void)failSubscribers:(dispatch_queue_t)queue completion:(void (^)(void))completion; +- (void)failSubscribers:(dispatch_queue_t)clientQueue completion:(void (^)(void))completion; @end #endif -@interface MTRDeviceTestDeviceControllerDelegate : NSObject +@interface MTRDeviceTestPairingDelegate : NSObject @property (nonatomic, strong) XCTestExpectation * expectation; @end -@implementation MTRDeviceTestDeviceControllerDelegate +@implementation MTRDeviceTestPairingDelegate - (id)initWithExpectation:(XCTestExpectation *)expectation { self = [super init]; @@ -94,20 +98,18 @@ - (id)initWithExpectation:(XCTestExpectation *)expectation return self; } -- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError *)error +- (void)onPairingComplete:(NSError *)error { XCTAssertEqual(error.code, 0); NSError * commissionError = nil; - [sController commissionNodeWithID:@(kDeviceId) - commissioningParams:[[MTRCommissioningParameters alloc] init] - error:&commissionError]; + [sController commissionDevice:kDeviceId commissioningParams:[[MTRCommissioningParameters alloc] init] error:&commissionError]; XCTAssertNil(commissionError); - // Keep waiting for controller:MTRXPCListenerSampleTests.mcommissioningComplete + // Keep waiting for onCommissioningComplete } -- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError *)error +- (void)onCommissioningComplete:(NSError *)error { XCTAssertEqual(error.code, 0); [_expectation fulfill]; @@ -145,14 +147,14 @@ - (void)initStack { XCTestExpectation * expectation = [self expectationWithDescription:@"Pairing Complete"]; - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; factoryParams.port = @(kLocalPort); - BOOL ok = [factory startControllerFactory:factoryParams error:nil]; + BOOL ok = [factory startup:factoryParams]; XCTAssertTrue(ok); __auto_type * testKeys = [[MTRTestKeys alloc] init]; @@ -160,31 +162,36 @@ - (void)initStack sTestKeys = testKeys; - // Needs to match what createControllerOnExistingFabric calls elsewhere in + // Needs to match what startControllerOnExistingFabric calls elsewhere in // this file do. - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; - params.vendorID = @(kTestVendorId); + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); sController = controller; - MTRDeviceTestDeviceControllerDelegate * deviceControllerDelegate = - [[MTRDeviceTestDeviceControllerDelegate alloc] initWithExpectation:expectation]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.device_controller_delegate", DISPATCH_QUEUE_SERIAL); + MTRDeviceTestPairingDelegate * pairing = [[MTRDeviceTestPairingDelegate alloc] initWithExpectation:expectation]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.pairing", DISPATCH_QUEUE_SERIAL); - [controller setDeviceControllerDelegate:deviceControllerDelegate queue:callbackQueue]; + [controller setPairingDelegate:pairing queue:callbackQueue]; NSError * error; - __auto_type * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:kOnboardingPayload error:&error]; - XCTAssertNotNil(payload); - XCTAssertNil(error); - - [controller setupCommissioningSessionWithPayload:payload newNodeID:@(kDeviceId) error:&error]; - XCTAssertNil(error); + [controller pairDevice:kDeviceId address:kAddress port:kRemotePort setupPINCode:kSetupPINCode error:&error]; + XCTAssertEqual(error.code, 0); [self waitForExpectationsWithTimeout:kPairingTimeoutInSeconds handler:nil]; + + __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; + }]; + [self waitForExpectationsWithTimeout:kCASESetupTimeoutInSeconds handler:nil]; } - (void)shutdownStack @@ -195,7 +202,7 @@ - (void)shutdownStack [controller shutdown]; XCTAssertFalse([controller isRunning]); - [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; + [[MTRControllerFactory sharedInstance] shutdown]; } - (void)waitForCommissionee @@ -226,31 +233,31 @@ - (void)test001_ReadAttribute MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - [device readAttributePathWithEndpointID:nil - clusterID:@29 - attributeID:@0 - params:nil - queue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); - - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - - { - XCTAssertTrue([values isKindOfClass:[NSArray class]]); - NSArray * resultArray = values; - for (NSDictionary * result in resultArray) { - MTRAttributePath * path = result[@"attributePath"]; - XCTAssertEqual([path.cluster unsignedIntegerValue], 29); - XCTAssertEqual([path.attribute unsignedIntegerValue], 0); - XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); - XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Array"]); - } - XCTAssertTrue([resultArray count] > 0); + [device readAttributeWithEndpointId:nil + clusterId:@29 + attributeId:@0 + params:nil + clientQueue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); + + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + + { + XCTAssertTrue([values isKindOfClass:[NSArray class]]); + NSArray * resultArray = values; + for (NSDictionary * result in resultArray) { + MTRAttributePath * path = result[@"attributePath"]; + XCTAssertEqual([path.cluster unsignedIntegerValue], 29); + XCTAssertEqual([path.attribute unsignedIntegerValue], 0); + XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); + XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Array"]); } + XCTAssertTrue([resultArray count] > 0); + } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -268,12 +275,12 @@ - (void)test002_WriteAttribute NSDictionary * writeValue = [NSDictionary dictionaryWithObjectsAndKeys:@"UnsignedInteger", @"type", [NSNumber numberWithUnsignedInteger:200], @"value", nil]; - [device writeAttributeWithEndpointID:@1 - clusterID:@8 - attributeID:@17 + [device writeAttributeWithEndpointId:@1 + clusterId:@8 + attributeId:@17 value:writeValue timedWriteTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"write attribute: Brightness values: %@, error: %@", values, error); @@ -316,12 +323,12 @@ - (void)test003_InvokeCommand @{ @"contextTag" : @1, @"data" : @ { @"type" : @"UnsignedInteger", @"value" : @10 } } ] }; - [device invokeCommandWithEndpointID:@1 - clusterID:@8 - commandID:@4 + [device invokeCommandWithEndpointId:@1 + clusterId:@8 + commandId:@4 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); @@ -361,12 +368,12 @@ - (void)test004_InvokeTimedCommand @"type" : @"Structure", @"value" : @[], }; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@0 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@0 commandFields:fields timedInvokeTimeout:@10000 - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: Off values: %@, error: %@", values, error); @@ -404,12 +411,13 @@ - (void)test005_Subscribe // Subscribe XCTestExpectation * expectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(10)]; - [device subscribeAttributePathWithEndpointID:@1 - clusterID:@6 - attributeID:@0 - params:params - queue:queue + [device subscribeAttributeWithEndpointId:@1 + clusterId:@6 + attributeId:@0 + minInterval:@1 + maxInterval:@10 + params:nil + clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -447,12 +455,12 @@ - (void)test005_Subscribe // Send commands to trigger attribute change XCTestExpectation * commandExpectation = [self expectationWithDescription:@"command responded"]; NSDictionary * fields = @{ @"type" : @"Structure", @"value" : [NSArray array] }; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@1 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@1 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -497,12 +505,12 @@ - (void)test005_Subscribe // Send command to trigger attribute change fields = [NSDictionary dictionaryWithObjectsAndKeys:@"Structure", @"type", [NSArray array], @"value", nil]; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@0 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@0 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -526,10 +534,10 @@ - (void)test005_Subscribe [self waitForExpectations:[NSArray arrayWithObject:reportExpectation] timeout:kTimeoutInSeconds]; expectation = [self expectationWithDescription:@"Report handler deregistered"]; - [device deregisterReportHandlersWithQueue:queue - completion:^{ - [expectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + [expectation fulfill]; + }]; [self waitForExpectations:@[ expectation ] timeout:kTimeoutInSeconds]; } @@ -544,20 +552,20 @@ - (void)test006_ReadAttributeFailure MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - [device readAttributePathWithEndpointID:@0 - clusterID:@10000 - attributeID:@0 - params:nil - queue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); + [device + readAttributeWithEndpointId:@0 + clusterId:@10000 + attributeId:@0 + params:nil + clientQueue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); - XCTAssertNil(values); - XCTAssertEqual( - [MTRErrorTestUtils errorToZCLErrorCode:error], EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER); + XCTAssertNil(values); + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObject:expectation] timeout:kTimeoutInSeconds]; } @@ -576,12 +584,12 @@ - (void)test007_WriteAttributeFailure NSDictionary * writeValue = [NSDictionary dictionaryWithObjectsAndKeys:@"UnsignedInteger", @"type", [NSNumber numberWithUnsignedInteger:200], @"value", nil]; [device - writeAttributeWithEndpointID:@1 - clusterID:@8 - attributeID:@10000 + writeAttributeWithEndpointId:@1 + clusterId:@8 + attributeId:@10000 value:writeValue timedWriteTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"write attribute: Brightness values: %@, error: %@", values, error); @@ -613,12 +621,12 @@ - (void)test008_InvokeCommandFailure ] }; [device - invokeCommandWithEndpointID:@1 - clusterID:@8 - commandID:@40000 + invokeCommandWithEndpointId:@1 + clusterId:@8 + commandId:@40000 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); @@ -655,20 +663,22 @@ - (void)test009_SubscribeFailure XCTestExpectation * cleanSubscriptionExpectation = [self expectationWithDescription:@"Previous subscriptions cleaned"]; NSLog(@"Deregistering report handlers..."); - [device deregisterReportHandlersWithQueue:queue - completion:^{ - NSLog(@"Report handlers deregistered"); - [cleanSubscriptionExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + NSLog(@"Report handlers deregistered"); + [cleanSubscriptionExpectation fulfill]; + }]; [self waitForExpectations:@[ cleanSubscriptionExpectation ] timeout:kTimeoutInSeconds]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; - params.autoResubscribe = NO; - [device subscribeAttributePathWithEndpointID:@10000 - clusterID:@6 - attributeID:@0 + __auto_type * params = [[MTRSubscribeParams alloc] init]; + params.autoResubscribe = @(NO); + [device subscribeAttributeWithEndpointId:@10000 + clusterId:@6 + attributeId:@0 + minInterval:@2 + maxInterval:@10 params:params - queue:queue + clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -699,30 +709,30 @@ - (void)test010_ReadAllAttribute MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - [device readAttributePathWithEndpointID:@1 - clusterID:@29 - attributeID:nil - params:nil - queue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); - - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - - { - XCTAssertTrue([values isKindOfClass:[NSArray class]]); - NSArray * resultArray = values; - for (NSDictionary * result in resultArray) { - MTRAttributePath * path = result[@"attributePath"]; - XCTAssertEqual([path.cluster unsignedIntegerValue], 29); - XCTAssertEqual([path.endpoint unsignedIntegerValue], 1); - XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); - } - XCTAssertTrue([resultArray count] > 0); + [device readAttributeWithEndpointId:@1 + clusterId:@29 + attributeId:nil + params:nil + clientQueue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); + + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + + { + XCTAssertTrue([values isKindOfClass:[NSArray class]]); + NSArray * resultArray = values; + for (NSDictionary * result in resultArray) { + MTRAttributePath * path = result[@"attributePath"]; + XCTAssertEqual([path.cluster unsignedIntegerValue], 29); + XCTAssertEqual([path.endpoint unsignedIntegerValue], 1); + XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); } + XCTAssertTrue([resultArray count] > 0); + } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObject:expectation] timeout:kTimeoutInSeconds]; } @@ -738,30 +748,36 @@ - (void)test011_ReadCachedAttribute dispatch_queue_t queue = dispatch_get_main_queue(); XCTestExpectation * cleanSubscriptionExpectation = [self expectationWithDescription:@"Previous subscriptions cleaned"]; NSLog(@"Deregistering report handlers..."); - [device deregisterReportHandlersWithQueue:queue - completion:^{ - NSLog(@"Report handlers deregistered"); - [cleanSubscriptionExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + NSLog(@"Report handlers deregistered"); + [cleanSubscriptionExpectation fulfill]; + }]; [self waitForExpectations:@[ cleanSubscriptionExpectation ] timeout:kTimeoutInSeconds]; - __auto_type clusterStateCacheContainer = [[MTRClusterStateCacheContainer alloc] init]; + __auto_type attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; MTRDeviceController * controller = sController; XCTAssertNotNil(controller); XCTestExpectation * subscribeExpectation = [self expectationWithDescription:@"Subscription complete"]; NSLog(@"Subscribing..."); - __block void (^reportHandler)(NSArray * _Nullable value, NSError * _Nullable error); - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(60)]; + // reportHandler returns TRUE if it got the things it was looking for or if there's an error. + __block BOOL (^reportHandler)(NSArray * _Nullable value, NSError * _Nullable error); [device subscribeWithQueue:queue - params:params - clusterStateCacheContainer:clusterStateCacheContainer + minInterval:2 + maxInterval:60 + params:nil + cacheContainer:attributeCacheContainer attributeReportHandler:^(NSArray * value) { NSLog(@"Received report: %@", value); if (reportHandler) { __auto_type handler = reportHandler; reportHandler = nil; - handler(value, nil); + BOOL done = handler(value, nil); + if (done == NO) { + // Keep waiting. + reportHandler = handler; + } } } eventReportHandler:nil @@ -781,11 +797,11 @@ - (void)test011_ReadCachedAttribute // Invoke command to set the attribute to a known state XCTestExpectation * commandExpectation = [self expectationWithDescription:@"Command invoked"]; - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:queue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); NSLog(@"Invoking command..."); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Invoked command with error: %@", err); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:err], 0); [commandExpectation fulfill]; @@ -799,23 +815,25 @@ - (void)test011_ReadCachedAttribute // Read cache NSLog(@"Reading from cache..."); XCTestExpectation * cacheExpectation = [self expectationWithDescription:@"Attribute cache read"]; - [MTRBaseClusterOnOff readAttributeOnOffWithClusterStateCache:clusterStateCacheContainer - endpoint:@1 - queue:queue - 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]; - }]; + [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]; + }]; [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. NSLog(@"New subscription..."); XCTestExpectation * newSubscriptionEstablished = [self expectationWithDescription:@"New subscription established"]; - MTRSubscribeParams * newParams = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(60)]; - newParams.keepPreviousSubscriptions = YES; - [cluster subscribeAttributeOnOffWithParams:newParams + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions = [NSNumber numberWithBool:YES]; + [cluster subscribeAttributeOnOffWithMinInterval:[NSNumber numberWithUnsignedShort:2] + maxInterval:[NSNumber numberWithUnsignedShort:60] + params:params subscriptionEstablished:^{ NSLog(@"New subscription was established"); [newSubscriptionEstablished fulfill]; @@ -827,6 +845,9 @@ - (void)test011_ReadCachedAttribute __auto_type reportExpectation = [self expectationWithDescription:@"Report handler called"]; reportHandler = ^(NSArray * _Nullable value, NSError * _Nullable error) { + if (error != nil) { + return YES; + } NSLog(@"Report received: %@, error: %@", value, error); for (MTRAttributeReport * report in value) { if ([report.path.endpoint isEqualToNumber:@1] && [report.path.cluster isEqualToNumber:@6] && @@ -836,14 +857,16 @@ - (void)test011_ReadCachedAttribute XCTAssertTrue([report.value isKindOfClass:[NSNumber class]]); XCTAssertEqual([report.value boolValue], NO); [reportExpectation fulfill]; - break; + return YES; } } + + return NO; }; NSLog(@"Invoking another command..."); commandExpectation = [self expectationWithDescription:@"Command invoked"]; - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Invoked command with error: %@", err); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:err], 0); [commandExpectation fulfill]; @@ -862,118 +885,118 @@ - (void)test011_ReadCachedAttribute // Read cache NSLog(@"Reading from cache..."); cacheExpectation = [self expectationWithDescription:@"Attribute cache read"]; - [MTRBaseClusterOnOff readAttributeOnOffWithClusterStateCache:clusterStateCacheContainer - endpoint:@1 - queue:queue - 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]; - }]; + [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]; + }]; [self waitForExpectations:[NSArray arrayWithObject:cacheExpectation] timeout:kTimeoutInSeconds]; // Read from cache using generic path NSLog(@"Reading from cache using generic path..."); cacheExpectation = [self expectationWithDescription:@"Attribute cache read"]; - [clusterStateCacheContainer - readAttributePathWithEndpointID:@1 - clusterID:@6 - attributeID:@0 - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Read attribute cache value: %@, error %@", values, error); - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - XCTAssertEqual([values count], 1); - MTRAttributePath * path = values[0][@"attributePath"]; - XCTAssertEqual([path.endpoint unsignedShortValue], 1); - XCTAssertEqual([path.cluster unsignedLongValue], 6); - XCTAssertEqual([path.attribute unsignedLongValue], 0); - XCTAssertNil(values[0][@"error"]); - XCTAssertTrue([values[0][@"data"][@"type"] isEqualToString:@"Boolean"]); - XCTAssertEqual([values[0][@"data"][@"value"] boolValue], NO); - [cacheExpectation fulfill]; - }]; + [attributeCacheContainer + readAttributeWithEndpointId:@1 + clusterId:@6 + attributeId:@0 + clientQueue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Read attribute cache value: %@, error %@", values, error); + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + XCTAssertEqual([values count], 1); + MTRAttributePath * path = values[0][@"attributePath"]; + XCTAssertEqual([path.endpoint unsignedShortValue], 1); + XCTAssertEqual([path.cluster unsignedLongValue], 6); + XCTAssertEqual([path.attribute unsignedLongValue], 0); + XCTAssertNil(values[0][@"error"]); + XCTAssertTrue([values[0][@"data"][@"type"] isEqualToString:@"Boolean"]); + XCTAssertEqual([values[0][@"data"][@"value"] boolValue], NO); + [cacheExpectation fulfill]; + }]; [self waitForExpectations:@[ cacheExpectation ] timeout:kTimeoutInSeconds]; // Read from cache with wildcard path NSLog(@"Reading from cache using wildcard endpoint..."); cacheExpectation = [self expectationWithDescription:@"Attribute cache read"]; - [clusterStateCacheContainer - readAttributePathWithEndpointID:nil - clusterID:@6 - attributeID:@0 - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Read attribute cache value: %@, error %@", values, error); - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - XCTAssertTrue([values count] > 0); - for (NSDictionary * value in values) { - MTRAttributePath * path = value[@"attributePath"]; - XCTAssertEqual([path.cluster unsignedLongValue], 6); - XCTAssertEqual([path.attribute unsignedLongValue], 0); - XCTAssertNil(value[@"error"]); - } - [cacheExpectation fulfill]; - }]; + [attributeCacheContainer + readAttributeWithEndpointId:nil + clusterId:@6 + attributeId:@0 + clientQueue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Read attribute cache value: %@, error %@", values, error); + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + XCTAssertTrue([values count] > 0); + for (NSDictionary * value in values) { + MTRAttributePath * path = value[@"attributePath"]; + XCTAssertEqual([path.cluster unsignedLongValue], 6); + XCTAssertEqual([path.attribute unsignedLongValue], 0); + XCTAssertNil(value[@"error"]); + } + [cacheExpectation fulfill]; + }]; [self waitForExpectations:@[ cacheExpectation ] timeout:kTimeoutInSeconds]; // Read from cache with wildcard path NSLog(@"Reading from cache using wildcard cluster ID..."); cacheExpectation = [self expectationWithDescription:@"Attribute cache read"]; - [clusterStateCacheContainer - readAttributePathWithEndpointID:@1 - clusterID:nil - attributeID:@0 - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Read attribute cache value: %@, error %@", values, error); - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - XCTAssertTrue([values count] > 0); - for (NSDictionary * value in values) { - MTRAttributePath * path = value[@"attributePath"]; - XCTAssertEqual([path.endpoint unsignedShortValue], 1); - XCTAssertEqual([path.attribute unsignedLongValue], 0); - } - [cacheExpectation fulfill]; - }]; + [attributeCacheContainer + readAttributeWithEndpointId:@1 + clusterId:nil + attributeId:@0 + clientQueue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Read attribute cache value: %@, error %@", values, error); + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + XCTAssertTrue([values count] > 0); + for (NSDictionary * value in values) { + MTRAttributePath * path = value[@"attributePath"]; + XCTAssertEqual([path.endpoint unsignedShortValue], 1); + XCTAssertEqual([path.attribute unsignedLongValue], 0); + } + [cacheExpectation fulfill]; + }]; [self waitForExpectations:@[ cacheExpectation ] timeout:kTimeoutInSeconds]; // Read from cache with wildcard path NSLog(@"Reading from cache using wildcard attribute ID..."); cacheExpectation = [self expectationWithDescription:@"Attribute cache read"]; - [clusterStateCacheContainer - readAttributePathWithEndpointID:@1 - clusterID:@6 - attributeID:nil - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Read attribute cache value: %@, error %@", values, error); - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - XCTAssertTrue([values count] > 0); - for (NSDictionary * value in values) { - MTRAttributePath * path = value[@"attributePath"]; - XCTAssertEqual([path.endpoint unsignedShortValue], 1); - XCTAssertEqual([path.cluster unsignedLongValue], 6); - XCTAssertNil(value[@"error"]); - } - [cacheExpectation fulfill]; - }]; + [attributeCacheContainer + readAttributeWithEndpointId:@1 + clusterId:@6 + attributeId:nil + clientQueue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Read attribute cache value: %@, error %@", values, error); + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + XCTAssertTrue([values count] > 0); + for (NSDictionary * value in values) { + MTRAttributePath * path = value[@"attributePath"]; + XCTAssertEqual([path.endpoint unsignedShortValue], 1); + XCTAssertEqual([path.cluster unsignedLongValue], 6); + XCTAssertNil(value[@"error"]); + } + [cacheExpectation fulfill]; + }]; [self waitForExpectations:@[ cacheExpectation ] timeout:kTimeoutInSeconds]; // Read from cache with wildcard path NSLog(@"Reading from cache using wildcard endpoint ID and cluster ID..."); cacheExpectation = [self expectationWithDescription:@"Attribute cache read"]; - [clusterStateCacheContainer - readAttributePathWithEndpointID:nil - clusterID:nil - attributeID:@0 - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Read attribute cache value: %@, error %@", values, error); - XCTAssertNotNil(error); - [cacheExpectation fulfill]; - }]; + [attributeCacheContainer + readAttributeWithEndpointId:nil + clusterId:nil + attributeId:@0 + clientQueue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Read attribute cache value: %@, error %@", values, error); + XCTAssertNotNil(error); + [cacheExpectation fulfill]; + }]; [self waitForExpectations:@[ cacheExpectation ] timeout:kTimeoutInSeconds]; } @@ -988,20 +1011,21 @@ - (void)test012_SubscriptionError MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); XCTestExpectation * deregisterExpectation = [self expectationWithDescription:@"Report handler deregistered"]; - [device deregisterReportHandlersWithQueue:queue - completion:^{ - [deregisterExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + [deregisterExpectation fulfill]; + }]; [self waitForExpectations:@[ deregisterExpectation ] timeout:kTimeoutInSeconds]; // Subscribe XCTestExpectation * expectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(10)]; - [device subscribeAttributePathWithEndpointID:@1 - clusterID:@6 - attributeID:@0 - params:params - queue:queue + [device subscribeAttributeWithEndpointId:@1 + clusterId:@6 + attributeId:@0 + minInterval:@1 + maxInterval:@10 + params:nil + clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -1039,12 +1063,12 @@ - (void)test012_SubscriptionError // Send commands to trigger attribute change XCTestExpectation * commandExpectation = [self expectationWithDescription:@"command responded"]; NSDictionary * fields = @{ @"type" : @"Structure", @"value" : [NSArray array] }; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@1 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@1 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1078,10 +1102,10 @@ - (void)test012_SubscriptionError [self waitForExpectations:@[ failureExpectation ] timeout:kTimeoutInSeconds]; deregisterExpectation = [self expectationWithDescription:@"Report handler deregistered"]; - [device deregisterReportHandlersWithQueue:queue - completion:^{ - [deregisterExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + [deregisterExpectation fulfill]; + }]; [self waitForExpectations:@[ deregisterExpectation ] timeout:kTimeoutInSeconds]; } #endif @@ -1096,15 +1120,25 @@ - (void)test013_ReuseChipClusterObject MTRDeviceController * controller = sController; XCTAssertNotNil(controller); - MTRBaseDevice * device = [MTRBaseDevice deviceWithNodeID:@(kDeviceId) controller:controller]; + __block MTRBaseDevice * device; + __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; + }]; + [self waitForExpectationsWithTimeout:kCASESetupTimeoutInSeconds handler:nil]; XCTestExpectation * expectation = [self expectationWithDescription:@"ReuseMTRClusterObjectFirstCall"]; dispatch_queue_t queue = dispatch_get_main_queue(); - MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:queue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster testWithCompletion:^(NSError * err) { + [cluster testWithCompletionHandler:^(NSError * err) { NSLog(@"ReuseMTRClusterObject test Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; @@ -1116,7 +1150,7 @@ - (void)test013_ReuseChipClusterObject // Reuse the MTRCluster Object for multiple times. - [cluster testWithCompletion:^(NSError * err) { + [cluster testWithCompletionHandler:^(NSError * err) { NSLog(@"ReuseMTRClusterObject test Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; @@ -1142,12 +1176,12 @@ - (void)test014_InvokeCommandWithDifferentIdResponse }; // KeySetReadAllIndices in the Group Key Management has id 4 and a data response with id 5 [device - invokeCommandWithEndpointID:@0 - clusterID:@(0x003F) - commandID:@4 + invokeCommandWithEndpointId:@0 + clusterId:@(0x003F) + commandId:@4 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: KeySetReadAllIndices values: %@, error: %@", values, error); @@ -1206,12 +1240,14 @@ - (void)test015_FailedSubscribeWithQueueAcrossShutdown // Create first subscription. It needs to be using subscribeWithQueue and // must have a clusterStateCacheContainer to exercise the onDone case. NSLog(@"Subscribing..."); - __auto_type clusterStateCacheContainer = [[MTRClusterStateCacheContainer alloc] init]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(2)]; - params.autoResubscribe = NO; + __auto_type clusterStateCacheContainer = [[MTRAttributeCacheContainer alloc] init]; + __auto_type * params = [[MTRSubscribeParams alloc] init]; + params.autoResubscribe = @(NO); [device subscribeWithQueue:queue + minInterval:1 + maxInterval:2 params:params - clusterStateCacheContainer:clusterStateCacheContainer + cacheContainer:clusterStateCacheContainer attributeReportHandler:nil eventReportHandler:nil errorHandler:^(NSError * error) { @@ -1222,19 +1258,19 @@ - (void)test015_FailedSubscribeWithQueueAcrossShutdown // Wait a bit before restart, to allow whatever async things are going on after this is called to try to happen. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2 * NSEC_PER_SEC), queue, ^{ - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); // Needs to match what initStack does. - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:sTestKeys.ipk - fabricID:@(1) - nocSigner:sTestKeys]; - __auto_type * newController = [factory createControllerOnExistingFabric:params error:nil]; + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:sTestKeys + fabricId:1 + ipk:sTestKeys.ipk]; + __auto_type * newController = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(newController); sController = newController; - mConnectedDevice = [MTRBaseDevice deviceWithNodeID:@(kDeviceId) controller:newController]; - [errorExpectation fulfill]; + + WaitForCommissionee(errorExpectation); }); } subscriptionEstablished:^() { @@ -1245,15 +1281,17 @@ - (void)test015_FailedSubscribeWithQueueAcrossShutdown // Create second subscription which will cancel the first subscription. We // can use a non-existent path here to cut down on the work that gets done. - [device subscribeAttributePathWithEndpointID:@10000 - clusterID:@6 - attributeID:@0 - params:params - queue:queue - reportHandler:^(id _Nullable values, NSError * _Nullable error) { - } - subscriptionEstablished:^ { - }]; + [device subscribeAttributeWithEndpointId:@10000 + clusterId:@6 + attributeId:@0 + minInterval:@(1) + maxInterval:@(2) + params:params + clientQueue:queue + reportHandler:^(id _Nullable values, NSError * _Nullable error) { + } + subscriptionEstablished:^() { + }]; [self waitForExpectations:@[ errorExpectation ] timeout:60]; } @@ -1275,23 +1313,25 @@ - (void)test016_FailedSubscribeWithCacheReadDuringFailure // Create first subscription. It needs to be using subscribeWithQueue and // must have a clusterStateCacheContainer to exercise the onDone case. NSLog(@"Subscribing..."); - __auto_type clusterStateCacheContainer = [[MTRClusterStateCacheContainer alloc] init]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(2)]; - params.autoResubscribe = NO; + __auto_type clusterStateCacheContainer = [[MTRAttributeCacheContainer alloc] init]; + __auto_type * params = [[MTRSubscribeParams alloc] init]; + params.autoResubscribe = @(NO); [device subscribeWithQueue:queue + minInterval:1 + maxInterval:2 params:params - clusterStateCacheContainer:clusterStateCacheContainer + cacheContainer:clusterStateCacheContainer attributeReportHandler:nil eventReportHandler:nil errorHandler:^(NSError * error) { NSLog(@"Received report error: %@", error); - [MTRBaseClusterOnOff readAttributeOnOffWithClusterStateCache:clusterStateCacheContainer - endpoint:@1 - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - [errorExpectation fulfill]; - }]; + [MTRBaseClusterOnOff readAttributeOnOffWithAttributeCache:clusterStateCacheContainer + endpoint:@1 + queue:queue + completionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [errorExpectation fulfill]; + }]; } subscriptionEstablished:^() { [firstSubscribeExpectation fulfill]; @@ -1301,15 +1341,17 @@ - (void)test016_FailedSubscribeWithCacheReadDuringFailure // Create second subscription which will cancel the first subscription. We // can use a non-existent path here to cut down on the work that gets done. - [device subscribeAttributePathWithEndpointID:@10000 - clusterID:@6 - attributeID:@0 - params:params - queue:queue - reportHandler:^(id _Nullable values, NSError * _Nullable error) { - } - subscriptionEstablished:^ { - }]; + [device subscribeAttributeWithEndpointId:@10000 + clusterId:@6 + attributeId:@0 + minInterval:@(1) + maxInterval:@(2) + params:params + clientQueue:queue + reportHandler:^(id _Nullable values, NSError * _Nullable error) { + } + subscriptionEstablished:^() { + }]; [self waitForExpectations:@[ errorExpectation ] timeout:60]; } @@ -1323,22 +1365,23 @@ - (void)test900_SubscribeAllAttributes dispatch_queue_t queue = dispatch_get_main_queue(); XCTestExpectation * cleanSubscriptionExpectation = [self expectationWithDescription:@"Previous subscriptions cleaned"]; NSLog(@"Deregistering report handlers..."); - [device deregisterReportHandlersWithQueue:queue - completion:^{ - NSLog(@"Report handlers deregistered"); - [cleanSubscriptionExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + NSLog(@"Report handlers deregistered"); + [cleanSubscriptionExpectation fulfill]; + }]; [self waitForExpectations:@[ cleanSubscriptionExpectation ] timeout:kTimeoutInSeconds]; XCTestExpectation * expectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; __block void (^reportHandler)(id _Nullable values, NSError * _Nullable error) = nil; - MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; - [device subscribeAttributePathWithEndpointID:@1 - clusterID:@6 - attributeID:@0xffffffff - params:params - queue:queue + [device subscribeAttributeWithEndpointId:@1 + clusterId:@6 + attributeId:@0xffffffff + minInterval:@2 + maxInterval:@10 + params:nil + clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"Subscribe all - report attribute values: %@, error: %@, report handler: %d", values, error, (reportHandler != nil)); @@ -1376,12 +1419,12 @@ - (void)test900_SubscribeAllAttributes // Send commands to set attribute state to a known state XCTestExpectation * commandExpectation = [self expectationWithDescription:@"command responded"]; NSDictionary * fields = @{ @"type" : @"Structure", @"value" : @[] }; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@0 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@0 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1406,12 +1449,12 @@ - (void)test900_SubscribeAllAttributes // Send commands to trigger attribute change commandExpectation = [self expectationWithDescription:@"command responded"]; fields = @{ @"type" : @"Structure", @"value" : @[] }; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@1 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@1 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1455,12 +1498,12 @@ - (void)test900_SubscribeAllAttributes // Send command to trigger attribute change commandExpectation = [self expectationWithDescription:@"command responded"]; fields = @{ @"type" : @"Structure", @"value" : @[] }; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@0 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@0 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1497,13 +1540,14 @@ - (void)test999_TearDown XCTestExpectation * readFabricIndexExpectation = [self expectationWithDescription:@"Fabric index read"]; __block NSNumber * fabricIndex; - __auto_type * opCredsCluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(0) queue:queue]; - [opCredsCluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable readError) { - XCTAssertNil(readError); - XCTAssertNotNil(value); - fabricIndex = value; - [readFabricIndexExpectation fulfill]; - }]; + __auto_type * opCredsCluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:queue]; + [opCredsCluster + readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable readError) { + XCTAssertNil(readError); + XCTAssertNotNil(value); + fabricIndex = value; + [readFabricIndexExpectation fulfill]; + }]; [self waitForExpectations:@[ readFabricIndexExpectation ] timeout:kTimeoutInSeconds]; @@ -1511,16 +1555,16 @@ - (void)test999_TearDown XCTestExpectation * openCommissioningWindowExpectation = [self expectationWithDescription:@"Commissioning window opened"]; __auto_type * adminCommissioningCluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) + endpoint:0 queue:queue]; __auto_type * openWindowParams = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; openWindowParams.commissioningTimeout = @(900); openWindowParams.timedInvokeTimeoutMs = @(50000); [adminCommissioningCluster openBasicCommissioningWindowWithParams:openWindowParams - completion:^(NSError * _Nullable error) { - XCTAssertNil(error); - [openCommissioningWindowExpectation fulfill]; - }]; + completionHandler:^(NSError * _Nullable error) { + XCTAssertNil(error); + [openCommissioningWindowExpectation fulfill]; + }]; [self waitForExpectations:@[ openCommissioningWindowExpectation ] timeout:kTimeoutInSeconds]; @@ -1531,13 +1575,13 @@ - (void)test999_TearDown removeParams.fabricIndex = fabricIndex; [opCredsCluster removeFabricWithParams:removeParams - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable removeError) { - XCTAssertNil(removeError); - XCTAssertNotNil(data); - XCTAssertEqualObjects(data.statusCode, @(0)); - [removeFabricExpectation fulfill]; - }]; + completionHandler:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable removeError) { + XCTAssertNil(removeError); + XCTAssertNotNil(data); + XCTAssertEqualObjects(data.statusCode, @(0)); + [removeFabricExpectation fulfill]; + }]; [self waitForExpectations:@[ removeFabricExpectation ] timeout:kTimeoutInSeconds]; diff --git a/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m b/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m index feadedac8d091d..67b6a9caad9c6a 100644 --- a/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m @@ -18,6 +18,9 @@ * limitations under the License. */ // module headers +#import "MTRManualSetupPayloadParser.h" +#import "MTROnboardingPayloadParser.h" +#import "MTRQRCodeSetupPayloadParser.h" #import "MTRSetupPayload.h" // additional includes @@ -35,81 +38,87 @@ @implementation MTRSetupPayloadParserTests - (void)testOnboardingPayloadParser_Manual_NoError { NSError * error; - MTRSetupPayload * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:@"636108753500001000015" error:&error]; + MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"636108753500001000015" error:&error]; XCTAssertNotNil(payload); XCTAssertNil(error); XCTAssertTrue(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 10); - XCTAssertEqual(payload.setupPasscode.unsignedIntegerValue, 123456780); + XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 123456780); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 1); XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); XCTAssertEqual(payload.commissioningFlow, MTRCommissioningFlowCustom); XCTAssertEqual(payload.version.unsignedIntegerValue, 0); - XCTAssertEqual(payload.discoveryCapabilities, MTRDiscoveryCapabilitiesUnknown); + XCTAssertNil(payload.rendezvousInformation); } - (void)testOnboardingPayloadParser_QRCode_NoError { NSError * error; - MTRSetupPayload * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:@"MT:R5L90MP500K64J00000" error:&error]; + MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"MT:R5L90MP500K64J00000" + error:&error]; XCTAssertNotNil(payload); XCTAssertNil(error); XCTAssertFalse(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); - XCTAssertEqual(payload.setupPasscode.unsignedIntegerValue, 2048); + XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 2048); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); XCTAssertEqual(payload.commissioningFlow, MTRCommissioningFlowStandard); XCTAssertEqual(payload.version.unsignedIntegerValue, 5); - XCTAssertEqual(payload.discoveryCapabilities, MTRDiscoveryCapabilitiesSoftAP); + XCTAssertNotNil(payload.rendezvousInformation); + XCTAssertEqual([payload.rendezvousInformation unsignedLongValue], MTRDiscoveryCapabilitiesSoftAP); } - (void)testOnboardingPayloadParser_NFC_NoError { NSError * error; - MTRSetupPayload * payload = - [MTRSetupPayload setupPayloadWithOnboardingPayload:@"MT:R5L90MP500K64J0A33P0SET70.QT52B.E23-WZE0WISA0DK5N1K8SQ1RYCU1O0" - error:&error]; + MTRSetupPayload * payload = [MTROnboardingPayloadParser + setupPayloadForOnboardingPayload:@"MT:R5L90MP500K64J0A33P0SET70.QT52B.E23-WZE0WISA0DK5N1K8SQ1RYCU1O0" + error:&error]; XCTAssertNotNil(payload); XCTAssertNil(error); XCTAssertFalse(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); - XCTAssertEqual(payload.setupPasscode.unsignedIntegerValue, 2048); + XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 2048); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); XCTAssertEqual(payload.commissioningFlow, MTRCommissioningFlowStandard); XCTAssertEqual(payload.version.unsignedIntegerValue, 5); - XCTAssertEqual(payload.discoveryCapabilities, MTRDiscoveryCapabilitiesSoftAP); + XCTAssertNotNil(payload.rendezvousInformation); + XCTAssertEqual([payload.rendezvousInformation unsignedLongValue], MTRDiscoveryCapabilitiesSoftAP); } - (void)testManualParser { NSError * error; - MTRSetupPayload * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:@"636108753500001000015" error:&error]; + MTRManualSetupPayloadParser * parser = + [[MTRManualSetupPayloadParser alloc] initWithDecimalStringRepresentation:@"636108753500001000015"]; + MTRSetupPayload * payload = [parser populatePayload:&error]; XCTAssertNotNil(payload); XCTAssertNil(error); XCTAssertTrue(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 10); - XCTAssertEqual(payload.setupPasscode.unsignedIntegerValue, 123456780); + XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 123456780); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 1); XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); XCTAssertEqual(payload.commissioningFlow, MTRCommissioningFlowCustom); XCTAssertEqual(payload.version.unsignedIntegerValue, 0); - XCTAssertEqual(payload.discoveryCapabilities, MTRDiscoveryCapabilitiesUnknown); + XCTAssertNil(payload.rendezvousInformation); } - (void)testManualParser_Error { NSError * error; - MTRSetupPayload * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:@"" error:&error]; + MTRManualSetupPayloadParser * parser = [[MTRManualSetupPayloadParser alloc] initWithDecimalStringRepresentation:@""]; + MTRSetupPayload * payload = [parser populatePayload:&error]; XCTAssertNil(payload); XCTAssertEqual(error.code, MTRErrorCodeInvalidStringLength); @@ -118,7 +127,9 @@ - (void)testManualParser_Error - (void)testQRCodeParser_Error { NSError * error; - MTRSetupPayload * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:@"MT:R5L90MP500K64J0000." error:&error]; + MTRQRCodeSetupPayloadParser * parser = + [[MTRQRCodeSetupPayloadParser alloc] initWithBase38Representation:@"MT:R5L90MP500K64J0000."]; + MTRSetupPayload * payload = [parser populatePayload:&error]; XCTAssertNil(payload); XCTAssertEqual(error.code, MTRErrorCodeInvalidArgument); @@ -127,27 +138,30 @@ - (void)testQRCodeParser_Error - (void)testQRCodeParser { NSError * error; - MTRSetupPayload * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:@"MT:R5L90MP500K64J00000" error:&error]; + MTRQRCodeSetupPayloadParser * parser = + [[MTRQRCodeSetupPayloadParser alloc] initWithBase38Representation:@"MT:R5L90MP500K64J00000"]; + MTRSetupPayload * payload = [parser populatePayload:&error]; XCTAssertNotNil(payload); XCTAssertNil(error); XCTAssertFalse(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); - XCTAssertEqual(payload.setupPasscode.unsignedIntegerValue, 2048); + XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 2048); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); XCTAssertEqual(payload.commissioningFlow, MTRCommissioningFlowStandard); XCTAssertEqual(payload.version.unsignedIntegerValue, 5); - XCTAssertEqual(payload.discoveryCapabilities, MTRDiscoveryCapabilitiesSoftAP); + XCTAssertNotNil(payload.rendezvousInformation); + XCTAssertEqual([payload.rendezvousInformation unsignedLongValue], MTRDiscoveryCapabilitiesSoftAP); } - (void)testQRCodeParserWithOptionalData { NSError * error; - MTRSetupPayload * payload = - [MTRSetupPayload setupPayloadWithOnboardingPayload:@"MT:R5L90MP500K64J0A33P0SET70.QT52B.E23-WZE0WISA0DK5N1K8SQ1RYCU1O0" - error:&error]; + MTRQRCodeSetupPayloadParser * parser = [[MTRQRCodeSetupPayloadParser alloc] + initWithBase38Representation:@"MT:R5L90MP500K64J0A33P0SET70.QT52B.E23-WZE0WISA0DK5N1K8SQ1RYCU1O0"]; + MTRSetupPayload * payload = [parser populatePayload:&error]; XCTAssertNotNil(payload); XCTAssertNil(error); @@ -155,11 +169,12 @@ - (void)testQRCodeParserWithOptionalData XCTAssertEqual(payload.version.unsignedIntegerValue, 5); XCTAssertFalse(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); - XCTAssertEqual(payload.setupPasscode.unsignedIntegerValue, 2048); + XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 2048); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); XCTAssertEqual(payload.commissioningFlow, MTRCommissioningFlowStandard); - XCTAssertEqual(payload.discoveryCapabilities, MTRDiscoveryCapabilitiesSoftAP); + XCTAssertNotNil(payload.rendezvousInformation); + XCTAssertEqual([payload.rendezvousInformation unsignedLongValue], MTRDiscoveryCapabilitiesSoftAP); XCTAssertTrue([payload.serialNumber isEqualToString:@"123456789"]); NSArray * vendorOptionalInfo = [payload getAllOptionalVendorData:&error]; @@ -167,31 +182,13 @@ - (void)testQRCodeParserWithOptionalData XCTAssertEqual([vendorOptionalInfo count], 2); for (MTROptionalQRCodeInfo * info in vendorOptionalInfo) { if (info.tag.intValue == 130) { - XCTAssertEqual(info.infoType, MTROptionalQRCodeInfoTypeString); + XCTAssertEqual(info.infoType.intValue, MTROptionalQRCodeInfoTypeString); XCTAssertTrue([info.stringValue isEqualToString:@"myData"]); } else if (info.tag.intValue == 131) { - XCTAssertEqual(info.infoType, MTROptionalQRCodeInfoTypeInt32); + XCTAssertEqual(info.infoType.intValue, MTROptionalQRCodeInfoTypeInt32); XCTAssertEqual(info.integerValue.intValue, 12); } } } -- (void)testQRCodeWithNoCapabilities -{ - NSError * error; - MTRSetupPayload * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:@"MT:M5L9000000K64J00000" error:&error]; - - XCTAssertNotNil(payload); - XCTAssertNil(error); - - XCTAssertFalse(payload.hasShortDiscriminator); - XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); - XCTAssertEqual(payload.setupPasscode.unsignedIntegerValue, 2048); - XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); - XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); - XCTAssertEqual(payload.commissioningFlow, MTRCommissioningFlowStandard); - XCTAssertEqual(payload.version.unsignedIntegerValue, 0); - XCTAssertEqual(payload.discoveryCapabilities, MTRDiscoveryCapabilitiesOnNetwork); -} - @end diff --git a/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.m b/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.m index 444e2fdd900cd4..9e880e74162f7b 100644 --- a/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.m +++ b/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.m @@ -22,22 +22,24 @@ @interface MTRTestOTAProvider () @implementation MTRTestOTAProvider - (void)handleQueryImageForNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller - params:(MTROTASoftwareUpdateProviderClusterQueryImageParams *)params - completion:(MTRQueryImageCompletionHandler)completion + params:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { } - (void)handleApplyUpdateRequestForNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller - params:(MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams *)params - completion:(MTRApplyUpdateRequestCompletionHandler)completion + params:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { } - (void)handleNotifyUpdateAppliedForNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller - params:(MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params - completion:(MTRStatusCompletion)completion + params:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + completionHandler:(StatusCompletion)completionHandler { } @@ -45,7 +47,7 @@ - (void)handleBDXTransferSessionBeginForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller fileDesignator:(NSString * _Nonnull)fileDesignator offset:(NSNumber * _Nonnull)offset - completion:(MTRStatusCompletion)completion + completionHandler:(void (^)(NSError * error))completionHandler { } @@ -60,7 +62,7 @@ - (void)handleBDXQueryForNodeID:(NSNumber * _Nonnull)nodeID blockSize:(NSNumber * _Nonnull)blockSize blockIndex:(NSNumber * _Nonnull)blockIndex bytesToSkip:(NSNumber * _Nonnull)bytesToSkip - completion:(MTRBDXQueryCompletionHandler)completion + completionHandler:(void (^)(NSData * _Nullable data, BOOL isEOF))completionHandler { } diff --git a/src/darwin/Framework/CHIPTests/MTRTestStorage.h b/src/darwin/Framework/CHIPTests/MTRTestStorage.h index ba5e386be23b8c..9f8069ccb2a083 100644 --- a/src/darwin/Framework/CHIPTests/MTRTestStorage.h +++ b/src/darwin/Framework/CHIPTests/MTRTestStorage.h @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface MTRTestStorage : NSObject +@interface MTRTestStorage : NSObject - (nullable NSData *)storageDataForKey:(NSString *)key; - (BOOL)setStorageData:(NSData *)value forKey:(NSString *)key; - (BOOL)removeStorageDataForKey:(NSString *)key; diff --git a/src/darwin/Framework/CHIPTests/MTRThreadOperationalDatasetTests.mm b/src/darwin/Framework/CHIPTests/MTRThreadOperationalDatasetTests.mm index 873dd249454f0a..894478eecae035 100644 --- a/src/darwin/Framework/CHIPTests/MTRThreadOperationalDatasetTests.mm +++ b/src/darwin/Framework/CHIPTests/MTRThreadOperationalDatasetTests.mm @@ -38,10 +38,10 @@ - (void)testThreadOperationalDataset const uint16_t panID = 0x28f4; MTRThreadOperationalDataset * dataset = [[MTRThreadOperationalDataset alloc] initWithNetworkName:@"TestNetwork" - extendedPANID:[NSData dataWithBytes:&extendedPANID length:MTRSizeThreadExtendedPANID] + extendedPANID:[NSData dataWithBytes:&extendedPANID length:MTRSizeThreadExtendedPanId] masterKey:[NSData dataWithBytes:&masterKey length:MTRSizeThreadMasterKey] PSKc:[NSData dataWithBytes:&PKSc length:MTRSizeThreadPSKc] - channel:@(25) + channel:25 panID:[NSData dataWithBytes:&panID length:sizeof(panID)]]; XCTAssertNotNil(dataset); NSData * data = [dataset data]; @@ -54,7 +54,7 @@ - (void)testThreadOperationalDataset XCTAssertEqualObjects(reconstructed.masterKey, dataset.masterKey); XCTAssertEqualObjects(reconstructed.PSKc, dataset.PSKc); XCTAssertEqualObjects(reconstructed.extendedPANID, dataset.extendedPANID); - XCTAssertEqualObjects(reconstructed.channel, dataset.channel); + XCTAssertEqual(reconstructed.channel, dataset.channel); } - (void)testThreadOperationalDatasetInvalid @@ -68,7 +68,7 @@ - (void)testThreadOperationalDatasetInvalid extendedPANID:[NSData dataWithBytes:&extendedPANID length:sizeof(extendedPANID)] masterKey:[NSData dataWithBytes:&masterKey length:sizeof(masterKey)] PSKc:[NSData dataWithBytes:&PKSc length:sizeof(PKSc)] - channel:@(25) + channel:25 panID:[NSData dataWithBytes:&panID length:sizeof(panID)]]; XCTAssertNil(dataset); diff --git a/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m b/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m index c6ff3884d28714..e4ae881b3c45bb 100644 --- a/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m +++ b/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m @@ -41,6 +41,9 @@ // Singleton controller we use. static MTRDeviceController * sController = nil; +// Device we use to send speak CASE to the server. +static MTRBaseDevice * sDevice = nil; + // // Sample XPC Listener implementation that directly communicates with local CHIPDevice instance // @@ -62,7 +65,7 @@ - (void)stop; @interface MTRDeviceControllerServerSample : NSObject @property (nonatomic, readonly, strong) NSString * identifier; - (instancetype)initWithClientProxy:(id)proxy - clusterStateCacheDictionary:(NSMutableDictionary *)cacheDictionary; + attributeCacheDictionary:(NSMutableDictionary *)cacheDictionary; @end @interface MTRXPCListenerSample () @@ -72,8 +75,7 @@ @interface MTRXPCListenerSample () @property (nonatomic, readonly, strong) NSXPCInterface * clientInterface; @property (nonatomic, readonly, strong) NSXPCListener * xpcListener; @property (nonatomic, readonly, strong) NSMutableDictionary * servers; -@property (nonatomic, readonly, strong) - NSMutableDictionary * clusterStateCacheDictionary; +@property (nonatomic, readonly, strong) NSMutableDictionary * attributeCacheDictionary; @end @@ -85,7 +87,7 @@ - (instancetype)init _serviceInterface = [NSXPCInterface interfaceWithProtocol:@protocol(MTRDeviceControllerServerProtocol)]; _clientInterface = [NSXPCInterface interfaceWithProtocol:@protocol(MTRDeviceControllerClientProtocol)]; _servers = [NSMutableDictionary dictionary]; - _clusterStateCacheDictionary = [NSMutableDictionary dictionary]; + _attributeCacheDictionary = [NSMutableDictionary dictionary]; _xpcListener = [NSXPCListener anonymousListener]; [_xpcListener setDelegate:(id) self]; } @@ -113,7 +115,7 @@ - (BOOL)listener:(NSXPCListener *)listener shouldAcceptNewConnection:(NSXPCConne newConnection.exportedInterface = _serviceInterface; newConnection.remoteObjectInterface = _clientInterface; __auto_type newServer = [[MTRDeviceControllerServerSample alloc] initWithClientProxy:[newConnection remoteObjectProxy] - clusterStateCacheDictionary:_clusterStateCacheDictionary]; + attributeCacheDictionary:_attributeCacheDictionary]; newConnection.exportedObject = newServer; [_servers setObject:newServer forKey:newServer.identifier]; newConnection.invalidationHandler = ^{ @@ -128,8 +130,7 @@ - (BOOL)listener:(NSXPCListener *)listener shouldAcceptNewConnection:(NSXPCConne @interface MTRDeviceControllerServerSample () @property (nonatomic, readwrite, strong) id clientProxy; -@property (nonatomic, readonly, strong) - NSMutableDictionary * clusterStateCacheDictionary; +@property (nonatomic, readonly, strong) NSMutableDictionary * attributeCacheDictionary; @end // This sample does not have multiple controllers and hence controller Id shall be the same. @@ -138,21 +139,21 @@ @interface MTRDeviceControllerServerSample () @implementation MTRDeviceControllerServerSample - (instancetype)initWithClientProxy:(id)proxy - clusterStateCacheDictionary:(NSMutableDictionary *)cacheDictionary + attributeCacheDictionary:(NSMutableDictionary *)cacheDictionary { if ([super init]) { _clientProxy = proxy; _identifier = [[NSUUID UUID] UUIDString]; - _clusterStateCacheDictionary = cacheDictionary; + _attributeCacheDictionary = cacheDictionary; } return self; } -- (void)getDeviceControllerWithFabricID:(NSNumber *)fabricID +- (void)getDeviceControllerWithFabricId:(uint64_t)fabricId completion:(void (^)(id _Nullable controller, NSError * _Nullable error))completion { - // We are using a shared local device controller and hence no disctinction per fabricID. - (void) fabricID; + // We are using a shared local device controller and hence no disctinction per fabricId. + (void) fabricId; completion(MTRDeviceControllerId, nil); } @@ -162,26 +163,34 @@ - (void)getAnyDeviceControllerWithCompletion:(void (^)(id _Nullable controller, } - (void)readAttributeWithController:(id)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID + nodeId:(uint64_t)nodeId + endpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId params:(NSDictionary * _Nullable)params - completion:(MTRValuesHandler)completion + completion:(void (^)(id _Nullable values, NSError * _Nullable error))completion { (void) controller; __auto_type sharedController = sController; if (sharedController) { - __auto_type device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sharedController]; - [device readAttributePathWithEndpointID:endpointID - clusterID:clusterID - attributeID:attributeID - params:[MTRDeviceController decodeXPCReadParams:params] - queue:dispatch_get_main_queue() - completion:^( - NSArray *> * _Nullable values, NSError * _Nullable error) { - completion([MTRDeviceController encodeXPCResponseValues:values], error); - }]; + [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); + }]; + } + }]; } else { NSLog(@"Failed to get shared controller"); completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); @@ -189,28 +198,36 @@ - (void)readAttributeWithController:(id)controller } - (void)writeAttributeWithController:(id)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - attributeID:(NSNumber *)attributeID + nodeId:(uint64_t)nodeId + endpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + attributeId:(NSNumber *)attributeId value:(id)value timedWriteTimeout:(NSNumber *)timeoutMs - completion:(MTRValuesHandler)completion + completion:(void (^)(id _Nullable values, NSError * _Nullable error))completion { (void) controller; __auto_type sharedController = sController; if (sharedController) { - __auto_type device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sharedController]; - [device - writeAttributeWithEndpointID:endpointID - clusterID:clusterID - attributeID:attributeID - value:value - timedWriteTimeout:timeoutMs - queue:dispatch_get_main_queue() - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - completion([MTRDeviceController encodeXPCResponseValues:values], error); - }]; + [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); + }]; + } + }]; } else { NSLog(@"Failed to get shared controller"); completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); @@ -218,28 +235,36 @@ - (void)writeAttributeWithController:(id)controller } - (void)invokeCommandWithController:(id)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - commandID:(NSNumber *)commandID + nodeId:(uint64_t)nodeId + endpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + commandId:(NSNumber *)commandId fields:(id)fields timedInvokeTimeout:(NSNumber * _Nullable)timeoutMs - completion:(MTRValuesHandler)completion + completion:(void (^)(id _Nullable values, NSError * _Nullable error))completion { (void) controller; __auto_type sharedController = sController; if (sharedController) { - __auto_type device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sharedController]; - [device - invokeCommandWithEndpointID:endpointID - clusterID:clusterID - commandID:commandID - commandFields:fields - timedInvokeTimeout:nil + [sharedController getBaseDevice:nodeId queue:dispatch_get_main_queue() - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - completion([MTRDeviceController encodeXPCResponseValues:values], error); - }]; + 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); + }]; + } + }]; } else { NSLog(@"Failed to get shared controller"); completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); @@ -247,36 +272,56 @@ - (void)invokeCommandWithController:(id)controller } - (void)subscribeAttributeWithController:(id)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - params:(NSDictionary *)params - establishedHandler:(dispatch_block_t)establishedHandler + nodeId:(uint64_t)nodeId + endpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + minInterval:(NSNumber *)minInterval + maxInterval:(NSNumber *)maxInterval + params:(NSDictionary * _Nullable)params + establishedHandler:(void (^)(void))establishedHandler { __auto_type sharedController = sController; if (sharedController) { - __auto_type device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sharedController]; - [device subscribeAttributePathWithEndpointID:endpointID - clusterID:clusterID - attributeID:attributeID - params:[MTRDeviceController decodeXPCSubscribeParams:params] - queue: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() + 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]; + } + }]; } else { NSLog(@"Failed to get shared controller"); establishedHandler(); // Send an error report so that the client knows of the failure [self.clientProxy handleReportWithController:controller - nodeID:nodeID + nodeId:nodeId values:nil error:[NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError @@ -284,12 +329,19 @@ - (void)subscribeAttributeWithController:(id)controller } } -- (void)stopReportsWithController:(id _Nullable)controller nodeID:(NSNumber *)nodeID completion:(dispatch_block_t)completion +- (void)stopReportsWithController:(id _Nullable)controller nodeId:(uint64_t)nodeId completion:(void (^)(void))completion { __auto_type sharedController = sController; if (sharedController) { - __auto_type device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sharedController]; - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() completion:completion]; + [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]; + } + }]; } else { NSLog(@"Failed to get shared controller"); completion(); @@ -297,72 +349,83 @@ - (void)stopReportsWithController:(id _Nullable)controller nodeID:(NSNumber *)no } - (void)subscribeWithController:(id _Nullable)controller - nodeID:(NSNumber *)nodeID - params:(NSDictionary *)params + nodeId:(uint64_t)nodeId + minInterval:(NSNumber *)minInterval + maxInterval:(NSNumber *)maxInterval + params:(NSDictionary * _Nullable)params shouldCache:(BOOL)shouldCache - completion:(MTRStatusCompletion)completion + completion:(void (^)(NSError * _Nullable error))completion { __auto_type sharedController = sController; if (sharedController) { - MTRClusterStateCacheContainer * clusterStateCacheContainer; + MTRAttributeCacheContainer * attributeCacheContainer; if (shouldCache) { - clusterStateCacheContainer = [[MTRClusterStateCacheContainer alloc] init]; + attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; } - __auto_type device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sharedController]; - NSMutableArray * established = [NSMutableArray arrayWithCapacity:1]; - [established addObject:@NO]; - [device subscribeWithQueue:dispatch_get_main_queue() - params:[MTRDeviceController decodeXPCSubscribeParams:params] - clusterStateCacheContainer:clusterStateCacheContainer - attributeReportHandler:^(NSArray * value) { - NSLog(@"Received report: %@", value); - } - eventReportHandler:nil - errorHandler:^(NSError * error) { - NSLog(@"Received report error: %@", error); - if (![established[0] boolValue]) { - established[0] = @YES; - completion(error); - } - } - subscriptionEstablished:^() { - NSLog(@"Attribute cache subscription succeeded for device %llu", [nodeID unsignedLongLongValue]); - if (clusterStateCacheContainer) { - [self.clusterStateCacheDictionary setObject:clusterStateCacheContainer forKey:nodeID]; - } - if (![established[0] boolValue]) { - established[0] = @YES; - completion(nil); - } - } - resubscriptionScheduled:nil]; + [sharedController getBaseDevice:nodeId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + if (error) { + NSLog(@"Error: Failed to get connected device (%llu) for attribute cache: %@", nodeId, error); + completion(error); + return; + } + NSMutableArray * established = [NSMutableArray arrayWithCapacity:1]; + [established addObject:@NO]; + [device subscribeWithQueue:dispatch_get_main_queue() + minInterval:[minInterval unsignedShortValue] + maxInterval:[maxInterval unsignedShortValue] + params:[MTRDeviceController decodeXPCSubscribeParams:params] + cacheContainer:attributeCacheContainer + attributeReportHandler:^(NSArray * value) { + NSLog(@"Received report: %@", value); + } + eventReportHandler:nil + errorHandler:^(NSError * error) { + NSLog(@"Received report error: %@", error); + if (![established[0] boolValue]) { + established[0] = @YES; + completion(error); + } + } + subscriptionEstablished:^() { + NSLog(@"Attribute cache subscription succeeded for device %llu", nodeId); + if (attributeCacheContainer) { + [self.attributeCacheDictionary setObject:attributeCacheContainer forKey:@(nodeId)]; + } + if (![established[0] boolValue]) { + established[0] = @YES; + completion(nil); + } + } + resubscriptionScheduled:nil]; + }]; } else { NSLog(@"Failed to get shared controller"); completion([NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); } } -- (void)readClusterStateCacheWithController:(id _Nullable)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - completion:(MTRValuesHandler)completion +- (void)readAttributeCacheWithController:(id _Nullable)controller + nodeId:(uint64_t)nodeId + endpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + completion:(void (^)(id _Nullable values, NSError * _Nullable error))completion { - MTRClusterStateCacheContainer * clusterStateCacheContainer = _clusterStateCacheDictionary[nodeID]; - if (clusterStateCacheContainer) { - [clusterStateCacheContainer - readAttributePathWithEndpointID:endpointID - clusterID:clusterID - attributeID:attributeID - queue:dispatch_get_main_queue() - completion:^( - NSArray *> * _Nullable values, NSError * _Nullable error) { - completion([MTRDeviceController encodeXPCResponseValues:values], error); - }]; + MTRAttributeCacheContainer * attributeCacheContainer = _attributeCacheDictionary[[NSNumber numberWithUnsignedLongLong:nodeId]]; + if (attributeCacheContainer) { + [attributeCacheContainer + readAttributeWithEndpointId:endpointId + clusterId:clusterId + attributeId:attributeId + clientQueue:dispatch_get_main_queue() + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + completion([MTRDeviceController encodeXPCResponseValues:values], error); + }]; } else { - NSLog(@"Attribute cache for node ID %llu was not setup", [nodeID unsignedLongLongValue]); + NSLog(@"Attribute cache for node ID %llu was not setup", nodeId); completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); } } @@ -370,10 +433,13 @@ - (void)readClusterStateCacheWithController:(id _Nullable)controller @end static const uint16_t kPairingTimeoutInSeconds = 10; +static const uint16_t kCASESetupTimeoutInSeconds = 30; static const uint16_t kTimeoutInSeconds = 3; static const uint64_t kDeviceId = 0x12344321; -static NSString * kOnboardingPayload = @"MT:-24J0AFN00KA0648G00"; +static const uint32_t kSetupPINCode = 20202021; +static const uint16_t kRemotePort = 5540; static const uint16_t kLocalPort = 5541; +static NSString * kAddress = @"::1"; // This test suite reuses a device object to speed up the test process for CI. // The following global variable holds the reference to the device object. @@ -387,11 +453,11 @@ - (void)readClusterStateCacheWithController:(id _Nullable)controller return mConnectedDevice; } -@interface MTRRemoteDeviceSampleTestDeviceControllerDelegate : NSObject +@interface MTRRemoteDeviceSampleTestPairingDelegate : NSObject @property (nonatomic, strong) XCTestExpectation * expectation; @end -@implementation MTRRemoteDeviceSampleTestDeviceControllerDelegate +@implementation MTRRemoteDeviceSampleTestPairingDelegate - (id)initWithExpectation:(XCTestExpectation *)expectation { self = [super init]; @@ -401,19 +467,17 @@ - (id)initWithExpectation:(XCTestExpectation *)expectation return self; } -- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError *)error +- (void)onPairingComplete:(NSError *)error { XCTAssertEqual(error.code, 0); NSError * commissionError = nil; - [sController commissionNodeWithID:@(kDeviceId) - commissioningParams:[[MTRCommissioningParameters alloc] init] - error:&commissionError]; + [sController commissionDevice:kDeviceId commissioningParams:[[MTRCommissioningParameters alloc] init] error:&commissionError]; XCTAssertNil(commissionError); - // Keep waiting for controller:commissioningComplete + // Keep waiting for onCommissioningComplete } -- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError *)error +- (void)onCommissioningComplete:(NSError *)error { XCTAssertEqual(error.code, 0); [_expectation fulfill]; @@ -452,45 +516,50 @@ - (void)initStack { XCTestExpectation * expectation = [self expectationWithDescription:@"Pairing Complete"]; - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + __auto_type * factory = [MTRControllerFactory sharedInstance]; XCTAssertNotNil(factory); __auto_type * storage = [[MTRTestStorage alloc] init]; - __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; factoryParams.port = @(kLocalPort); - NSError * error; - BOOL ok = [factory startControllerFactory:factoryParams error:&error]; + BOOL ok = [factory startup:factoryParams]; XCTAssertTrue(ok); - XCTAssertNil(error); __auto_type * testKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; - params.vendorID = @(kTestVendorId); + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; + params.vendorId = @(kTestVendorId); - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:&error]; + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); - XCTAssertNil(error); sController = controller; - MTRRemoteDeviceSampleTestDeviceControllerDelegate * deviceControllerDelegate = - [[MTRRemoteDeviceSampleTestDeviceControllerDelegate alloc] initWithExpectation:expectation]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.device_controller_delegate", DISPATCH_QUEUE_SERIAL); - - [controller setDeviceControllerDelegate:deviceControllerDelegate queue:callbackQueue]; + MTRRemoteDeviceSampleTestPairingDelegate * pairing = + [[MTRRemoteDeviceSampleTestPairingDelegate alloc] initWithExpectation:expectation]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.pairing", DISPATCH_QUEUE_SERIAL); - __auto_type * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:kOnboardingPayload error:&error]; - XCTAssertNotNil(payload); - XCTAssertNil(error); + [controller setPairingDelegate:pairing queue:callbackQueue]; - [controller setupCommissioningSessionWithPayload:payload newNodeID:@(kDeviceId) error:&error]; - XCTAssertNil(error); + NSError * error; + [controller pairDevice:kDeviceId address:kAddress port:kRemotePort setupPINCode:kSetupPINCode error:&error]; + XCTAssertEqual(error.code, 0); [self waitForExpectationsWithTimeout:kPairingTimeoutInSeconds handler:nil]; + __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; + }]; + [self waitForExpectationsWithTimeout:kCASESetupTimeoutInSeconds handler:nil]; + mSampleListener = [[MTRXPCListenerSample alloc] init]; [mSampleListener start]; } @@ -506,15 +575,18 @@ - (void)shutdownStack [controller shutdown]; XCTAssertFalse([controller isRunning]); - [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; + [[MTRControllerFactory sharedInstance] shutdown]; mDeviceController = nil; } - (void)waitForCommissionee { + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); __auto_type remoteController = [MTRDeviceController - sharedControllerWithID:MTRDeviceControllerId + sharedControllerWithId:MTRDeviceControllerId xpcConnectBlock:^NSXPCConnection * _Nonnull { if (mSampleListener.listenerEndpoint) { return [[NSXPCConnection alloc] initWithListenerEndpoint:mSampleListener.listenerEndpoint]; @@ -522,7 +594,13 @@ - (void)waitForCommissionee NSLog(@"Listener is not active"); return nil; }]; - mConnectedDevice = [MTRBaseDevice deviceWithNodeID:@(kDeviceId) controller:remoteController]; + [remoteController getBaseDevice:kDeviceId + queue:queue + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + mConnectedDevice = device; + [expectation fulfill]; + }]; + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; mDeviceController = remoteController; } @@ -546,31 +624,31 @@ - (void)test001_ReadAttribute MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - [device readAttributePathWithEndpointID:nil - clusterID:@29 - attributeID:@0 - params:nil - queue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); - - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - - { - XCTAssertTrue([values isKindOfClass:[NSArray class]]); - NSArray * resultArray = values; - for (NSDictionary * result in resultArray) { - MTRAttributePath * path = result[@"attributePath"]; - XCTAssertEqual([path.cluster unsignedIntegerValue], 29); - XCTAssertEqual([path.attribute unsignedIntegerValue], 0); - XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); - XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Array"]); - } - XCTAssertTrue([resultArray count] > 0); + [device readAttributeWithEndpointId:nil + clusterId:@29 + attributeId:@0 + params:nil + clientQueue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); + + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + + { + XCTAssertTrue([values isKindOfClass:[NSArray class]]); + NSArray * resultArray = values; + for (NSDictionary * result in resultArray) { + MTRAttributePath * path = result[@"attributePath"]; + XCTAssertEqual([path.cluster unsignedIntegerValue], 29); + XCTAssertEqual([path.attribute unsignedIntegerValue], 0); + XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); + XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Array"]); } + XCTAssertTrue([resultArray count] > 0); + } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -588,12 +666,12 @@ - (void)test002_WriteAttribute NSDictionary * writeValue = [NSDictionary dictionaryWithObjectsAndKeys:@"UnsignedInteger", @"type", [NSNumber numberWithUnsignedInteger:200], @"value", nil]; - [device writeAttributeWithEndpointID:@1 - clusterID:@8 - attributeID:@17 + [device writeAttributeWithEndpointId:@1 + clusterId:@8 + attributeId:@17 value:writeValue timedWriteTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"write attribute: Brightness values: %@, error: %@", values, error); @@ -636,12 +714,12 @@ - (void)test003_InvokeCommand @{ @"contextTag" : @1, @"data" : @ { @"type" : @"UnsignedInteger", @"value" : @10 } } ] }; - [device invokeCommandWithEndpointID:@1 - clusterID:@8 - commandID:@4 + [device invokeCommandWithEndpointId:@1 + clusterId:@8 + commandId:@4 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); @@ -679,12 +757,13 @@ - (void)test004_Subscribe MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; - [device subscribeAttributePathWithEndpointID:@1 - clusterID:@6 - attributeID:@0 - params:params - queue:queue + [device subscribeAttributeWithEndpointId:@1 + clusterId:@6 + attributeId:@0 + minInterval:@2 + maxInterval:@10 + params:nil + clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -722,12 +801,12 @@ - (void)test004_Subscribe // Send command to trigger attribute change NSDictionary * fields = [NSDictionary dictionaryWithObjectsAndKeys:@"Structure", @"type", [NSArray array], @"value", nil]; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@1 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@1 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -751,10 +830,10 @@ - (void)test004_Subscribe [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; XCTestExpectation * clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; } @@ -769,22 +848,22 @@ - (void)test005_ReadAttributeFailure MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - [device readAttributePathWithEndpointID:@0 - clusterID:@10000 - attributeID:@0 - params:nil - queue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); + [device readAttributeWithEndpointId:@0 + clusterId:@10000 + attributeId:@0 + params:nil + clientQueue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); - XCTAssertNil(values); - // Error is copied over XPC and hence cannot use MTRErrorTestUtils utility which checks against - // a local domain string object. - XCTAssertTrue([error.domain isEqualToString:MTRInteractionErrorDomain]); - XCTAssertEqual(error.code, EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER); + XCTAssertNil(values); + // Error is copied over XPC and hence cannot use MTRErrorTestUtils utility which checks against a + // local domain string object. + XCTAssertTrue([error.domain isEqualToString:MTRInteractionErrorDomain]); + XCTAssertEqual(error.code, EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -802,12 +881,12 @@ - (void)test006_WriteAttributeFailure NSDictionary * writeValue = [NSDictionary dictionaryWithObjectsAndKeys:@"UnsignedInteger", @"type", [NSNumber numberWithUnsignedInteger:200], @"value", nil]; - [device writeAttributeWithEndpointID:@1 - clusterID:@8 - attributeID:@10000 + [device writeAttributeWithEndpointId:@1 + clusterId:@8 + attributeId:@10000 value:writeValue timedWriteTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"write attribute: Brightness values: %@, error: %@", values, error); @@ -849,7 +928,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 queue:queue + [device invokeCommandWithEndpointId:@1 clusterId:@8 commandId:@40000 commandFields:fields clientQueue:queue timedInvokeTimeout:nil completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); @@ -890,13 +969,15 @@ - (void)test008_SubscribeFailure MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; - params.autoResubscribe = NO; - [device subscribeAttributePathWithEndpointID:@10000 - clusterID:@6 - attributeID:@0 + __auto_type * params = [[MTRSubscribeParams alloc] init]; + params.autoResubscribe = @(NO); + [device subscribeAttributeWithEndpointId:@10000 + clusterId:@6 + attributeId:@0 + minInterval:@2 + maxInterval:@10 params:params - queue:queue + clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -928,32 +1009,32 @@ - (void)test009_ReadAttributeWithParams dispatch_queue_t queue = dispatch_get_main_queue(); MTRReadParams * readParams = [[MTRReadParams alloc] init]; - readParams.fabricFiltered = NO; - [device readAttributePathWithEndpointID:nil - clusterID:@29 - attributeID:@0 - params:readParams - queue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); - - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - - { - XCTAssertTrue([values isKindOfClass:[NSArray class]]); - NSArray * resultArray = values; - for (NSDictionary * result in resultArray) { - MTRAttributePath * path = result[@"attributePath"]; - XCTAssertEqual([path.cluster unsignedIntegerValue], 29); - XCTAssertEqual([path.attribute unsignedIntegerValue], 0); - XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); - XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Array"]); - } - XCTAssertTrue([resultArray count] > 0); + readParams.fabricFiltered = @NO; + [device readAttributeWithEndpointId:nil + clusterId:@29 + attributeId:@0 + params:readParams + clientQueue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); + + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + + { + XCTAssertTrue([values isKindOfClass:[NSArray class]]); + NSArray * resultArray = values; + for (NSDictionary * result in resultArray) { + MTRAttributePath * path = result[@"attributePath"]; + XCTAssertEqual([path.cluster unsignedIntegerValue], 29); + XCTAssertEqual([path.attribute unsignedIntegerValue], 0); + XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); + XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Array"]); } + XCTAssertTrue([resultArray count] > 0); + } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -968,10 +1049,10 @@ - (void)test010_SubscribeWithNoParams dispatch_queue_t queue = dispatch_get_main_queue(); XCTestExpectation * clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; __block void (^firstReportHandler)(id _Nullable values, NSError * _Nullable error) = nil; @@ -979,12 +1060,13 @@ - (void)test010_SubscribeWithNoParams // Subscribe XCTestExpectation * subscribeExpectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; - [device subscribeAttributePathWithEndpointID:@1 - clusterID:@6 - attributeID:@0 - params:params - queue:queue + [device subscribeAttributeWithEndpointId:@1 + clusterId:@6 + attributeId:@0 + minInterval:@2 + maxInterval:@10 + params:nil + clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1004,12 +1086,13 @@ - (void)test010_SubscribeWithNoParams // Setup 2nd subscriber subscribeExpectation = [self expectationWithDescription:@"subscribe CurrentLevel attribute"]; - params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; - [device subscribeAttributePathWithEndpointID:@1 - clusterID:@8 - attributeID:@0 - params:params - queue:queue + [device subscribeAttributeWithEndpointId:@1 + clusterId:@8 + attributeId:@0 + minInterval:@2 + maxInterval:@10 + params:nil + clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"2nd subscriber report attribute: CurrentLevel values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1030,12 +1113,12 @@ - (void)test010_SubscribeWithNoParams // Send command to clear attribute state XCTestExpectation * clearCommandExpectation = [self expectationWithDescription:@"Clearing command invoked"]; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@0 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@0 commandFields:@{ @"type" : @"Structure", @"value" : @[] } timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1099,12 +1182,12 @@ - (void)test010_SubscribeWithNoParams // Send command to trigger attribute change NSDictionary * fields = [NSDictionary dictionaryWithObjectsAndKeys:@"Structure", @"type", [NSArray array], @"value", nil]; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@1 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@1 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1128,10 +1211,10 @@ - (void)test010_SubscribeWithNoParams [self waitForExpectations:@[ reportExpectation, secondReportExpectation ] timeout:kTimeoutInSeconds]; clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; } @@ -1145,10 +1228,10 @@ - (void)test011_SubscribeWithParams dispatch_queue_t queue = dispatch_get_main_queue(); XCTestExpectation * clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; __block void (^firstReportHandler)(id _Nullable values, NSError * _Nullable error) = nil; @@ -1156,12 +1239,13 @@ - (void)test011_SubscribeWithParams // Subscribe XCTestExpectation * subscribeExpectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; - [device subscribeAttributePathWithEndpointID:@1 - clusterID:@6 - attributeID:@0 - params:params - queue:queue + [device subscribeAttributeWithEndpointId:@1 + clusterId:@6 + attributeId:@0 + minInterval:@2 + maxInterval:@10 + params:nil + clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1180,14 +1264,16 @@ - (void)test011_SubscribeWithParams [self waitForExpectations:@[ subscribeExpectation ] timeout:kTimeoutInSeconds]; // Setup 2nd subscriber - MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; - myParams.keepPreviousSubscriptions = NO; + MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] init]; + myParams.keepPreviousSubscriptions = @NO; subscribeExpectation = [self expectationWithDescription:@"subscribe CurrentLevel attribute"]; - [device subscribeAttributePathWithEndpointID:@1 - clusterID:@8 - attributeID:@0 + [device subscribeAttributeWithEndpointId:@1 + clusterId:@8 + attributeId:@0 + minInterval:@2 + maxInterval:@10 params:myParams - queue:queue + clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"2nd subscriber report attribute: CurrentLevel values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1208,12 +1294,12 @@ - (void)test011_SubscribeWithParams // Send command to clear attribute state XCTestExpectation * clearCommandExpectation = [self expectationWithDescription:@"Clearing command invoked"]; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@0 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@0 commandFields:@{ @"type" : @"Structure", @"value" : @[] } timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1277,12 +1363,12 @@ - (void)test011_SubscribeWithParams // Send command to trigger attribute change NSDictionary * fields = [NSDictionary dictionaryWithObjectsAndKeys:@"Structure", @"type", [NSArray array], @"value", nil]; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@1 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@1 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1306,17 +1392,17 @@ - (void)test011_SubscribeWithParams [self waitForExpectations:@[ reportExpectation, secondReportExpectation ] timeout:kTimeoutInSeconds]; clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; } @@ -1330,10 +1416,10 @@ - (void)test012_SubscribeKeepingPreviousSubscription dispatch_queue_t queue = dispatch_get_main_queue(); XCTestExpectation * clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; __block void (^firstReportHandler)(id _Nullable values, NSError * _Nullable error) = nil; @@ -1341,12 +1427,13 @@ - (void)test012_SubscribeKeepingPreviousSubscription // Subscribe XCTestExpectation * subscribeExpectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; - [device subscribeAttributePathWithEndpointID:@1 - clusterID:@6 - attributeID:@0 - params:params - queue:queue + [device subscribeAttributeWithEndpointId:@1 + clusterId:@6 + attributeId:@0 + minInterval:@2 + maxInterval:@10 + params:nil + clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1366,13 +1453,15 @@ - (void)test012_SubscribeKeepingPreviousSubscription // Setup 2nd subscriber subscribeExpectation = [self expectationWithDescription:@"subscribe CurrentLevel attribute"]; - MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; - myParams.keepPreviousSubscriptions = YES; - [device subscribeAttributePathWithEndpointID:@1 - clusterID:@8 - attributeID:@0 + MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] init]; + myParams.keepPreviousSubscriptions = @YES; + [device subscribeAttributeWithEndpointId:@1 + clusterId:@8 + attributeId:@0 + minInterval:@2 + maxInterval:@10 params:myParams - queue:queue + clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"2nd subscriber report attribute: CurrentLevel values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1393,12 +1482,12 @@ - (void)test012_SubscribeKeepingPreviousSubscription // Send command to clear attribute state XCTestExpectation * clearCommandExpectation = [self expectationWithDescription:@"Clearing command invoked"]; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@0 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@0 commandFields:@{ @"type" : @"Structure", @"value" : @[] } timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1460,12 +1549,12 @@ - (void)test012_SubscribeKeepingPreviousSubscription // Send command to trigger attribute change NSDictionary * fields = [NSDictionary dictionaryWithObjectsAndKeys:@"Structure", @"type", [NSArray array], @"value", nil]; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@1 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@1 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1489,10 +1578,10 @@ - (void)test012_SubscribeKeepingPreviousSubscription [self waitForExpectations:@[ reportExpectation, secondReportExpectation ] timeout:kTimeoutInSeconds]; clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithClientQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; } @@ -1509,12 +1598,12 @@ - (void)test013_TimedWriteAttribute NSDictionary * writeValue = [NSDictionary dictionaryWithObjectsAndKeys:@"UnsignedInteger", @"type", [NSNumber numberWithUnsignedInteger:200], @"value", nil]; XCTestExpectation * expectation = [self expectationWithDescription:@"Wrote LevelControl Brightness attribute"]; - [device writeAttributeWithEndpointID:@1 - clusterID:@8 - attributeID:@17 + [device writeAttributeWithEndpointId:@1 + clusterId:@8 + attributeId:@17 value:writeValue timedWriteTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"write attribute: Brightness values: %@, error: %@", values, error); @@ -1541,12 +1630,12 @@ - (void)test013_TimedWriteAttribute writeValue = [NSDictionary dictionaryWithObjectsAndKeys:@"UnsignedInteger", @"type", [NSNumber numberWithUnsignedInteger:100], @"value", nil]; expectation = [self expectationWithDescription:@"Requested timed write on LevelControl Brightness attribute"]; - [device writeAttributeWithEndpointID:@1 - clusterID:@8 - attributeID:@17 + [device writeAttributeWithEndpointId:@1 + clusterId:@8 + attributeId:@17 value:writeValue timedWriteTimeout:@1000 - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"Timed-write attribute: Brightness values: %@, error: %@", values, error); @@ -1573,12 +1662,13 @@ - (void)test013_TimedWriteAttribute // subscribe, which should get the new value at the timeout expectation = [self expectationWithDescription:@"Subscribed"]; __block void (^reportHandler)(id _Nullable values, NSError * _Nullable error); - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(2) maxInterval:@(10)]; - [device subscribeAttributePathWithEndpointID:@1 - clusterID:@8 - attributeID:@17 - params:params - queue:queue + [device subscribeAttributeWithEndpointId:@1 + clusterId:@8 + attributeId:@17 + minInterval:@2 + maxInterval:@10 + params:nil + clientQueue:queue reportHandler:^(id _Nullable value, NSError * _Nullable error) { NSLog(@"report attribute: Brightness values: %@, error: %@", value, error); @@ -1615,12 +1705,11 @@ - (void)test013_TimedWriteAttribute // Read back to see if the timed write has taken effect expectation = [self expectationWithDescription:@"Read LevelControl Brightness attribute after pause"]; - [device - readAttributePathWithEndpointID:@1 - clusterID:@8 - attributeID:@17 + [device readAttributeWithEndpointId:@1 + clusterId:@8 + attributeId:@17 params:nil - queue:queue + clientQueue:queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { NSLog(@"read attribute: LevelControl Brightness values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1655,12 +1744,12 @@ - (void)test014_TimedInvokeCommand @{ @"contextTag" : @1, @"data" : @ { @"type" : @"UnsignedInteger", @"value" : @10 } } ] }; - [device invokeCommandWithEndpointID:@1 - clusterID:@8 - commandID:@4 + [device invokeCommandWithEndpointId:@1 + clusterId:@8 + commandId:@4 commandFields:fields timedInvokeTimeout:@1000 - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); @@ -1686,7 +1775,7 @@ - (void)test014_TimedInvokeCommand sleep(1); } -- (void)test900_SubscribeClusterStateCache +- (void)test900_SubscribeAttributeCache { #if MANUAL_INDIVIDUAL_TEST [self initStack]; @@ -1697,12 +1786,13 @@ - (void)test900_SubscribeClusterStateCache MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - MTRClusterStateCacheContainer * clusterStateCacheContainer = [[MTRClusterStateCacheContainer alloc] init]; + MTRAttributeCacheContainer * attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; NSLog(@"Setting up attribute cache subscription..."); - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(60)]; [device subscribeWithQueue:queue - params:params - clusterStateCacheContainer:clusterStateCacheContainer + minInterval:1 + maxInterval:60 + params:nil + cacheContainer:attributeCacheContainer attributeReportHandler:^(NSArray * value) { NSLog(@"Report for attribute cache: %@", value); } @@ -1723,12 +1813,12 @@ - (void)test900_SubscribeClusterStateCache NSLog(@"Invoking clearing command..."); expectation = [self expectationWithDescription:@"Clearing command invoked"]; NSDictionary * fields = [NSDictionary dictionaryWithObjectsAndKeys:@"Structure", @"type", [NSArray array], @"value", nil]; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@0 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@0 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoked command: On values: %@, error: %@", values, error); @@ -1754,12 +1844,12 @@ - (void)test900_SubscribeClusterStateCache NSLog(@"Invoking command to trigger report..."); expectation = [self expectationWithDescription:@"Command invoked"]; fields = [NSDictionary dictionaryWithObjectsAndKeys:@"Structure", @"type", [NSArray array], @"value", nil]; - [device invokeCommandWithEndpointID:@1 - clusterID:@6 - commandID:@1 + [device invokeCommandWithEndpointId:@1 + clusterId:@6 + commandId:@1 commandFields:fields timedInvokeTimeout:nil - queue:queue + clientQueue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoked command: On values: %@, error: %@", values, error); @@ -1785,28 +1875,28 @@ - (void)test900_SubscribeClusterStateCache sleep(1); NSLog(@"Reading from attribute cache..."); expectation = [self expectationWithDescription:@"Cache read"]; - [clusterStateCacheContainer - readAttributePathWithEndpointID:@1 - clusterID:@6 - attributeID:@0 - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Cached attribute read: %@, error: %@", values, error); - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); - XCTAssertEqual([values count], 1); - for (NSDictionary * value in values) { - XCTAssertTrue([value isKindOfClass:[NSDictionary class]]); - NSDictionary * result = value; - MTRAttributePath * path = result[@"attributePath"]; - XCTAssertEqual([path.endpoint unsignedIntegerValue], 1); - XCTAssertEqual([path.cluster unsignedIntegerValue], 6); - XCTAssertEqual([path.attribute unsignedIntegerValue], 0); - XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); - XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Boolean"]); - XCTAssertEqual([result[@"data"][@"value"] boolValue], YES); - } - [expectation fulfill]; - }]; + [attributeCacheContainer + readAttributeWithEndpointId:@1 + clusterId:@6 + attributeId:@0 + clientQueue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Cached attribute read: %@, error: %@", values, error); + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); + XCTAssertEqual([values count], 1); + for (NSDictionary * value in values) { + XCTAssertTrue([value isKindOfClass:[NSDictionary class]]); + NSDictionary * result = value; + MTRAttributePath * path = result[@"attributePath"]; + XCTAssertEqual([path.endpoint unsignedIntegerValue], 1); + XCTAssertEqual([path.cluster unsignedIntegerValue], 6); + XCTAssertEqual([path.attribute unsignedIntegerValue], 0); + XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); + XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Boolean"]); + XCTAssertEqual([result[@"data"][@"value"] boolValue], YES); + } + [expectation fulfill]; + }]; [self waitForExpectations:@[ expectation ] timeout:kTimeoutInSeconds]; } @@ -1814,20 +1904,21 @@ - (void)test900_SubscribeClusterStateCache - (void)test999_TearDown { // Put the device back in the state we found it: open commissioning window, no fabrics commissioned. - MTRBaseDevice * device = [MTRBaseDevice deviceWithNodeID:@(kDeviceId) controller:sController]; dispatch_queue_t queue = dispatch_get_main_queue(); + MTRBaseDevice * device = sDevice; // Get our current fabric index, for later deletion. XCTestExpectation * readFabricIndexExpectation = [self expectationWithDescription:@"Fabric index read"]; __block NSNumber * fabricIndex; - __auto_type * opCredsCluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:@(0) queue:queue]; - [opCredsCluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable readError) { - XCTAssertNil(readError); - XCTAssertNotNil(value); - fabricIndex = value; - [readFabricIndexExpectation fulfill]; - }]; + __auto_type * opCredsCluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:queue]; + [opCredsCluster + readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable readError) { + XCTAssertNil(readError); + XCTAssertNotNil(value); + fabricIndex = value; + [readFabricIndexExpectation fulfill]; + }]; [self waitForExpectations:@[ readFabricIndexExpectation ] timeout:kTimeoutInSeconds]; @@ -1835,16 +1926,16 @@ - (void)test999_TearDown XCTestExpectation * openCommissioningWindowExpectation = [self expectationWithDescription:@"Commissioning window opened"]; __auto_type * adminCommissioningCluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) + endpoint:0 queue:queue]; __auto_type * openWindowParams = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; openWindowParams.commissioningTimeout = @(900); openWindowParams.timedInvokeTimeoutMs = @(50000); [adminCommissioningCluster openBasicCommissioningWindowWithParams:openWindowParams - completion:^(NSError * _Nullable error) { - XCTAssertNil(error); - [openCommissioningWindowExpectation fulfill]; - }]; + completionHandler:^(NSError * _Nullable error) { + XCTAssertNil(error); + [openCommissioningWindowExpectation fulfill]; + }]; [self waitForExpectations:@[ openCommissioningWindowExpectation ] timeout:kTimeoutInSeconds]; @@ -1855,13 +1946,13 @@ - (void)test999_TearDown removeParams.fabricIndex = fabricIndex; [opCredsCluster removeFabricWithParams:removeParams - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable removeError) { - XCTAssertNil(removeError); - XCTAssertNotNil(data); - XCTAssertEqualObjects(data.statusCode, @(0)); - [removeFabricExpectation fulfill]; - }]; + completionHandler:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable removeError) { + XCTAssertNil(removeError); + XCTAssertNotNil(data); + XCTAssertEqualObjects(data.statusCode, @(0)); + [removeFabricExpectation fulfill]; + }]; [self waitForExpectations:@[ removeFabricExpectation ] timeout:kTimeoutInSeconds]; diff --git a/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m b/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m index 91c4e21328bea7..c48ae1215ae38f 100644 --- a/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m +++ b/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m @@ -76,55 +76,63 @@ - (NSString *)description } @end -@interface MTRClusterStateCacheContainer (Test) +@interface MTRAttributeCacheContainer (Test) // Obsolete method is moved to this test suite to keep tests compatible - (void)subscribeWithDeviceController:(MTRDeviceController *)deviceController - deviceID:(NSNumber *)deviceID + deviceId:(uint64_t)deviceId params:(MTRSubscribeParams * _Nullable)params - queue:(dispatch_queue_t)queue + clientQueue:(dispatch_queue_t)clientQueue completion:(void (^)(NSError * _Nullable error))completion; @end -@implementation MTRClusterStateCacheContainer (Test) +@implementation MTRAttributeCacheContainer (Test) - (void)subscribeWithDeviceController:(MTRDeviceController *)deviceController - deviceID:(NSNumber *)deviceID + deviceId:(uint64_t)deviceId params:(MTRSubscribeParams * _Nullable)params - queue:queue + clientQueue:clientQueue completion:(void (^)(NSError * _Nullable error))completion { + __auto_type workQueue = dispatch_get_main_queue(); __auto_type completionHandler = ^(NSError * _Nullable error) { - dispatch_async(queue, ^{ + dispatch_async(clientQueue, ^{ completion(error); }); }; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:deviceID controller:deviceController]; - - __auto_type * subscriptionParams - = (params == nil) ? [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(43200)] : params; - __auto_type established = [NSMutableArray arrayWithCapacity:1]; - [established addObject:@NO]; - [device subscribeWithQueue:queue - params:subscriptionParams - clusterStateCacheContainer: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 + queue:workQueue + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + if (error) { + NSLog(@"Error: Failed to get connected device (%llu) for attribute cache: %@", deviceId, error); + completionHandler(error); + return; + } + __auto_type established = [NSMutableArray arrayWithCapacity:1]; + [established addObject:@NO]; + [device subscribeWithQueue:clientQueue + minInterval:1 + maxInterval:43200 + params:params + cacheContainer: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); + if (![established[0] boolValue]) { + established[0] = @YES; + completionHandler(nil); + } + } + resubscriptionScheduled:nil]; + }]; } @end @@ -139,26 +147,26 @@ @interface MTRXPCProtocolTests @property (readwrite, strong) XCTestExpectation * xpcDisconnectExpectation; @property (readwrite, strong) void (^handleGetAnySharedRemoteControllerWithFabricId) - (NSNumber * fabricId, void (^completion)(id _Nullable controller, NSError * _Nullable error)); + (uint64_t fabricId, void (^completion)(id _Nullable controller, NSError * _Nullable error)); @property (readwrite, strong) void (^handleGetAnySharedRemoteController) (void (^completion)(id _Nullable controller, NSError * _Nullable error)); -@property (readwrite, strong) void (^handleReadAttribute)(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, +@property (readwrite, strong) void (^handleReadAttribute)(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, NSNumber * _Nullable attributeId, MTRReadParams * _Nullable params, void (^completion)(id _Nullable values, NSError * _Nullable error)); @property (readwrite, strong) void (^handleWriteAttribute) - (id controller, NSNumber * nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, id value, + (id controller, uint64_t nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, id value, NSNumber * _Nullable timedWriteTimeout, void (^completion)(id _Nullable values, NSError * _Nullable error)); @property (readwrite, strong) void (^handleInvokeCommand) - (id controller, NSNumber * nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id fields, + (id controller, uint64_t nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id fields, NSNumber * _Nullable timedInvokeTimeout, void (^completion)(id _Nullable values, NSError * _Nullable error)); -@property (readwrite, strong) void (^handleSubscribeAttribute) - (id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nonnull params, void (^establishedHandler)(void)); -@property (readwrite, strong) void (^handleStopReports)(id controller, NSNumber * nodeId, void (^completion)(void)); -@property (readwrite, strong) void (^handleSubscribeAll)(id controller, NSNumber * nodeId, MTRSubscribeParams * _Nonnull params, - BOOL shouldCache, void (^completion)(NSError * _Nullable error)); -@property (readwrite, strong) void (^handleReadClusterStateCache) - (id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, +@property (readwrite, strong) void (^handleSubscribeAttribute)(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, + NSNumber * _Nullable clusterId, NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, + MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)); +@property (readwrite, strong) void (^handleStopReports)(id controller, uint64_t nodeId, void (^completion)(void)); +@property (readwrite, strong) void (^handleSubscribeAll)(id controller, uint64_t nodeId, NSNumber * minInterval, + NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, BOOL shouldCache, void (^completion)(NSError * _Nullable error)); +@property (readwrite, strong) void (^handleReadAttributeCache) + (id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, NSNumber * _Nullable attributeId, void (^completion)(id _Nullable values, NSError * _Nullable error)); @end @@ -190,12 +198,12 @@ - (BOOL)listener:(NSXPCListener *)listener shouldAcceptNewConnection:(NSXPCConne return YES; } -- (void)getDeviceControllerWithFabricID:(NSNumber *)fabricID +- (void)getDeviceControllerWithFabricId:(uint64_t)fabricId completion:(void (^)(id _Nullable controller, NSError * _Nullable error))completion { dispatch_async(dispatch_get_main_queue(), ^{ XCTAssertNotNil(self.handleGetAnySharedRemoteControllerWithFabricId); - self.handleGetAnySharedRemoteControllerWithFabricId(fabricID, completion); + self.handleGetAnySharedRemoteControllerWithFabricId(fabricId, completion); }); } @@ -208,95 +216,100 @@ - (void)getAnyDeviceControllerWithCompletion:(void (^)(id _Nullable controller, } - (void)readAttributeWithController:(id)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID + nodeId:(uint64_t)nodeId + endpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId params:(NSDictionary * _Nullable)params - completion:(MTRValuesHandler)completion + completion:(void (^)(id _Nullable values, NSError * _Nullable error))completion { dispatch_async(dispatch_get_main_queue(), ^{ XCTAssertNotNil(self.handleReadAttribute); self.handleReadAttribute( - controller, nodeID, endpointID, clusterID, attributeID, [MTRDeviceController decodeXPCReadParams:params], completion); + controller, nodeId, endpointId, clusterId, attributeId, [MTRDeviceController decodeXPCReadParams:params], completion); }); } - (void)writeAttributeWithController:(id)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - attributeID:(NSNumber *)attributeID + nodeId:(uint64_t)nodeId + endpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + attributeId:(NSNumber *)attributeId value:(id)value timedWriteTimeout:(NSNumber * _Nullable)timeoutMs - completion:(MTRValuesHandler)completion + completion:(void (^)(id _Nullable values, NSError * _Nullable error))completion { dispatch_async(dispatch_get_main_queue(), ^{ XCTAssertNotNil(self.handleWriteAttribute); - self.handleWriteAttribute(controller, nodeID, endpointID, clusterID, attributeID, value, timeoutMs, completion); + self.handleWriteAttribute(controller, nodeId, endpointId, clusterId, attributeId, value, timeoutMs, completion); }); } - (void)invokeCommandWithController:(id)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber *)endpointID - clusterID:(NSNumber *)clusterID - commandID:(NSNumber *)commandID + nodeId:(uint64_t)nodeId + endpointId:(NSNumber *)endpointId + clusterId:(NSNumber *)clusterId + commandId:(NSNumber *)commandId fields:(id)fields timedInvokeTimeout:(NSNumber * _Nullable)timeoutMs - completion:(MTRValuesHandler)completion + completion:(void (^)(id _Nullable values, NSError * _Nullable error))completion { dispatch_async(dispatch_get_main_queue(), ^{ XCTAssertNotNil(self.handleInvokeCommand); - self.handleInvokeCommand(controller, nodeID, endpointID, clusterID, commandID, fields, timeoutMs, completion); + self.handleInvokeCommand(controller, nodeId, endpointId, clusterId, commandId, fields, timeoutMs, completion); }); } - (void)subscribeAttributeWithController:(id)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - params:(NSDictionary *)params - establishedHandler:(dispatch_block_t)establishedHandler + nodeId:(uint64_t)nodeId + endpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + minInterval:(NSNumber *)minInterval + maxInterval:(NSNumber *)maxInterval + params:(NSDictionary * _Nullable)params + establishedHandler:(void (^)(void))establishedHandler { dispatch_async(dispatch_get_main_queue(), ^{ XCTAssertNotNil(self.handleSubscribeAttribute); - self.handleSubscribeAttribute(controller, nodeID, endpointID, clusterID, attributeID, + self.handleSubscribeAttribute(controller, nodeId, endpointId, clusterId, attributeId, minInterval, maxInterval, [MTRDeviceController decodeXPCSubscribeParams:params], establishedHandler); }); } -- (void)stopReportsWithController:(id)controller nodeID:(NSNumber *)nodeID completion:(dispatch_block_t)completion +- (void)stopReportsWithController:(id)controller nodeId:(uint64_t)nodeId completion:(void (^)(void))completion { dispatch_async(dispatch_get_main_queue(), ^{ XCTAssertNotNil(self.handleStopReports); - self.handleStopReports(controller, nodeID, completion); + self.handleStopReports(controller, nodeId, completion); }); } - (void)subscribeWithController:(id _Nullable)controller - nodeID:(NSNumber *)nodeID - params:(NSDictionary *)params + nodeId:(uint64_t)nodeId + minInterval:(NSNumber *)minInterval + maxInterval:(NSNumber *)maxInterval + params:(NSDictionary * _Nullable)params shouldCache:(BOOL)shouldCache - completion:(MTRStatusCompletion)completion + completion:(void (^)(NSError * _Nullable error))completion { dispatch_async(dispatch_get_main_queue(), ^{ XCTAssertNotNil(self.handleSubscribeAll); - self.handleSubscribeAll(controller, nodeID, [MTRDeviceController decodeXPCSubscribeParams:params], shouldCache, completion); + self.handleSubscribeAll(controller, nodeId, minInterval, maxInterval, [MTRDeviceController decodeXPCSubscribeParams:params], + shouldCache, completion); }); } -- (void)readClusterStateCacheWithController:(id _Nullable)controller - nodeID:(NSNumber *)nodeID - endpointID:(NSNumber * _Nullable)endpointID - clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID - completion:(MTRValuesHandler)completion +- (void)readAttributeCacheWithController:(id _Nullable)controller + nodeId:(uint64_t)nodeId + endpointId:(NSNumber * _Nullable)endpointId + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + completion:(void (^)(id _Nullable values, NSError * _Nullable error))completion { dispatch_async(dispatch_get_main_queue(), ^{ - XCTAssertNotNil(self.handleReadClusterStateCache); - self.handleReadClusterStateCache(controller, nodeID, endpointID, clusterID, attributeID, completion); + XCTAssertNotNil(self.handleReadAttributeCache); + self.handleReadAttributeCache(controller, nodeId, endpointId, clusterId, attributeId, completion); }); } @@ -311,7 +324,7 @@ - (void)setUp [_xpcListener resume]; _controllerUUID = [[NSUUID UUID] UUIDString]; _remoteDeviceController = - [MTRDeviceController sharedControllerWithID:_controllerUUID + [MTRDeviceController sharedControllerWithId:_controllerUUID xpcConnectBlock:^NSXPCConnection * { return [[NSXPCConnection alloc] initWithListenerEndpoint:self.xpcListener.endpoint]; }]; @@ -332,9 +345,9 @@ - (void)testReadAttributeSuccess NSNumber * myClusterId = @200; NSNumber * myAttributeId = @300; NSArray * myValues = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; @@ -342,11 +355,11 @@ - (void)testReadAttributeSuccess XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; - _handleReadAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + _handleReadAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, NSNumber * _Nullable attributeId, MTRReadParams * _Nullable params, void (^completion)(id _Nullable values, NSError * _Nullable error)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); @@ -355,21 +368,27 @@ - (void)testReadAttributeSuccess completion([MTRDeviceController encodeXPCResponseValues:myValues], nil); }; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Reading..."); - [device readAttributePathWithEndpointID: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"]; - }]; + [_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"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -385,47 +404,53 @@ - (void)testReadAttributeWithParamsSuccess NSNumber * myClusterId = @200; NSNumber * myAttributeId = @300; NSArray * myValues = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; MTRReadParams * myParams = [[MTRReadParams alloc] init]; - myParams.fabricFiltered = NO; + myParams.fabricFiltered = @NO; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; - _handleReadAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + _handleReadAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, NSNumber * _Nullable attributeId, MTRReadParams * _Nullable params, void (^completion)(id _Nullable values, NSError * _Nullable error)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); XCTAssertNotNil(params); - XCTAssertEqual(params.fabricFiltered, myParams.fabricFiltered); + XCTAssertEqual([params.fabricFiltered boolValue], [myParams.fabricFiltered boolValue]); [callExpectation fulfill]; completion([MTRDeviceController encodeXPCResponseValues:myValues], nil); }; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Reading..."); - [device readAttributePathWithEndpointID: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"]; - }]; + [_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"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -445,11 +470,11 @@ - (void)testReadAttributeFailure XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; - _handleReadAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + _handleReadAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, NSNumber * _Nullable attributeId, MTRReadParams * _Nullable params, void (^completion)(id _Nullable values, NSError * _Nullable error)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); @@ -458,20 +483,26 @@ - (void)testReadAttributeFailure completion(nil, myError); }; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Reading..."); - [device readAttributePathWithEndpointID: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"]; - }]; + [_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"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -489,19 +520,19 @@ - (void)testWriteAttributeSuccess NSDictionary * myValue = [NSDictionary dictionaryWithObjectsAndKeys:@"UnsignedInteger", @"type", [NSNumber numberWithInteger:654321], @"value", nil]; NSArray * myResults = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId] + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId] } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; - _handleWriteAttribute = ^(id controller, NSNumber * nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, + _handleWriteAttribute = ^(id controller, uint64_t nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, id value, NSNumber * _Nullable timedWriteTimeout, void (^completion)(id _Nullable values, NSError * _Nullable error)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); @@ -511,22 +542,28 @@ - (void)testWriteAttributeSuccess completion([MTRDeviceController encodeXPCResponseValues:myResults], nil); }; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - 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"]; - }]; + [_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"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -545,19 +582,19 @@ - (void)testTimedWriteAttributeSuccess [NSDictionary dictionaryWithObjectsAndKeys:@"UnsignedInteger", @"type", [NSNumber numberWithInteger:654321], @"value", nil]; NSNumber * myTimedWriteTimeout = @1234; NSArray * myResults = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId] + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId] } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; - _handleWriteAttribute = ^(id controller, NSNumber * nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, + _handleWriteAttribute = ^(id controller, uint64_t nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, id value, NSNumber * _Nullable timedWriteTimeout, void (^completion)(id _Nullable values, NSError * _Nullable error)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); @@ -568,22 +605,28 @@ - (void)testTimedWriteAttributeSuccess completion([MTRDeviceController encodeXPCResponseValues:myResults], nil); }; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - 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"]; - }]; + [_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"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -605,10 +648,10 @@ - (void)testWriteAttributeFailure XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; - _handleWriteAttribute = ^(id controller, NSNumber * nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, + _handleWriteAttribute = ^(id controller, uint64_t nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, id value, NSNumber * _Nullable timedWriteTimeout, void (^completion)(id _Nullable values, NSError * _Nullable error)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); @@ -618,21 +661,27 @@ - (void)testWriteAttributeFailure completion(nil, myError); }; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - 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"]; - }]; + [_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"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -652,17 +701,17 @@ - (void)testInvokeCommandSuccess [NSNumber numberWithFloat:1.0], @"value", nil]], @"value", nil]; NSArray * myResults = @[ - @{ @"commandPath" : [MTRCommandPath commandPathWithEndpointID:myEndpointId clusterID:myClusterId commandID:myCommandId] } + @{ @"commandPath" : [MTRCommandPath commandPathWithEndpointId:myEndpointId clusterId:myClusterId commandId:myCommandId] } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; _handleInvokeCommand - = ^(id controller, NSNumber * nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id commandFields, + = ^(id controller, uint64_t nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id commandFields, NSNumber * _Nullable timedInvokeTimeout, void (^completion)(id _Nullable values, NSError * _Nullable error)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([commandId unsignedLongValue], [myCommandId unsignedLongValue]); @@ -672,22 +721,28 @@ - (void)testInvokeCommandSuccess completion([MTRDeviceController encodeXPCResponseValues:myResults], nil); }; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - 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"]; - }]; + [_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"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -708,17 +763,17 @@ - (void)testTimedInvokeCommandSuccess [NSNumber numberWithFloat:1.0], @"value", nil]], @"value", nil]; NSArray * myResults = @[ - @{ @"commandPath" : [MTRCommandPath commandPathWithEndpointID:myEndpointId clusterID:myClusterId commandID:myCommandId] } + @{ @"commandPath" : [MTRCommandPath commandPathWithEndpointId:myEndpointId clusterId:myClusterId commandId:myCommandId] } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; _handleInvokeCommand - = ^(id controller, NSNumber * nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id commandFields, + = ^(id controller, uint64_t nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id commandFields, NSNumber * _Nullable timedInvokeTimeout, void (^completion)(id _Nullable values, NSError * _Nullable error)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([commandId unsignedLongValue], [myCommandId unsignedLongValue]); @@ -729,22 +784,28 @@ - (void)testTimedInvokeCommandSuccess completion([MTRDeviceController encodeXPCResponseValues:myResults], nil); }; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - 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"]; - }]; + [_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"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -769,10 +830,10 @@ - (void)testInvokeCommandFailure __auto_type uuid = self.controllerUUID; _handleInvokeCommand - = ^(id controller, NSNumber * nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id commandFields, + = ^(id controller, uint64_t nodeId, NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id commandFields, NSNumber * _Nullable timedInvokeTimeout, void (^completion)(id _Nullable values, NSError * _Nullable error)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([commandId unsignedLongValue], [myCommandId unsignedLongValue]); @@ -782,21 +843,27 @@ - (void)testInvokeCommandFailure completion(nil, myError); }; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - 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"]; - }]; + [_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"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -814,9 +881,9 @@ - (void)testSubscribeAttributeSuccess NSNumber * myMinInterval = @5; NSNumber * myMaxInterval = @60; __block NSArray * myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; @@ -824,38 +891,47 @@ - (void)testSubscribeAttributeSuccess __block XCTestExpectation * reportExpectation = [self expectationWithDescription:@"Report sent"]; __auto_type uuid = self.controllerUUID; - _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nonnull params, void (^establishedHandler)(void)) { + _handleSubscribeAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, + void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertNil(params); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:params - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); + [_remoteDeviceController + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; + 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]; + }]; }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -863,7 +939,7 @@ - (void)testSubscribeAttributeSuccess // Inject report id clientObject = _xpcConnection.remoteObjectProxy; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -873,13 +949,13 @@ - (void)testSubscribeAttributeSuccess // Inject another report reportExpectation = [self expectationWithDescription:@"2nd report sent"]; myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @771234 } } ]; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -888,20 +964,23 @@ - (void)testSubscribeAttributeSuccess // Setup stop report handler XCTestExpectation * stopExpectation = [self expectationWithDescription:@"Reports stopped"]; - _handleStopReports = ^(id _Nullable controller, NSNumber * nodeId, void (^completion)(void)) { + _handleStopReports = ^(id _Nullable controller, uint64_t nodeId, void (^completion)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); completion(); [stopExpectation fulfill]; }; // Deregister report handler - device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; + [_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"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -916,13 +995,13 @@ - (void)testSubscribeAttributeWithParamsSuccess NSNumber * myAttributeId = @300; NSNumber * myMinInterval = @5; NSNumber * myMaxInterval = @60; - MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; - myParams.fabricFiltered = NO; - myParams.keepPreviousSubscriptions = NO; + MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] init]; + myParams.fabricFiltered = @NO; + myParams.keepPreviousSubscriptions = @NO; __block NSArray * myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; @@ -930,39 +1009,49 @@ - (void)testSubscribeAttributeWithParamsSuccess __block XCTestExpectation * reportExpectation = [self expectationWithDescription:@"Report sent"]; __auto_type uuid = self.controllerUUID; - _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nonnull params, void (^establishedHandler)(void)) { + _handleSubscribeAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, + void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); - XCTAssertEqual(params.fabricFiltered, myParams.fabricFiltered); - XCTAssertEqual(params.keepPreviousSubscriptions, myParams.keepPreviousSubscriptions); + XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertNotNil(params); + XCTAssertEqual([params.fabricFiltered boolValue], [myParams.fabricFiltered boolValue]); + XCTAssertEqual([params.keepPreviousSubscriptions boolValue], [myParams.keepPreviousSubscriptions boolValue]); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:myParams - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); + [_remoteDeviceController + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; + 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]; + }]; }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -970,7 +1059,7 @@ - (void)testSubscribeAttributeWithParamsSuccess // Inject report id clientObject = _xpcConnection.remoteObjectProxy; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -980,13 +1069,13 @@ - (void)testSubscribeAttributeWithParamsSuccess // Inject another report reportExpectation = [self expectationWithDescription:@"2nd report sent"]; myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @771234 } } ]; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -995,20 +1084,23 @@ - (void)testSubscribeAttributeWithParamsSuccess // Setup stop report handler XCTestExpectation * stopExpectation = [self expectationWithDescription:@"Reports stopped"]; - _handleStopReports = ^(id _Nullable controller, NSNumber * nodeId, void (^completion)(void)) { + _handleStopReports = ^(id _Nullable controller, uint64_t nodeId, void (^completion)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); completion(); [stopExpectation fulfill]; }; // Deregister report handler - device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; + [_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"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1034,45 +1126,54 @@ - (void)testBadlyFormattedReport reportExpectation.inverted = YES; __auto_type uuid = self.controllerUUID; - _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nonnull params, void (^establishedHandler)(void)) { + _handleSubscribeAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, + void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertNil(params); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:params - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); + [_remoteDeviceController + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; + 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]; + }]; }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; // Inject badly formatted report id clientObject = _xpcConnection.remoteObjectProxy; - [clientObject handleReportWithController:uuid nodeID:@(myNodeId) values:myReport error:nil]; + [clientObject handleReportWithController:uuid nodeId:myNodeId values:myReport error:nil]; // Wait for report, which isn't expected. [self waitForExpectations:[NSArray arrayWithObject:reportExpectation] timeout:kNegativeTimeoutInSeconds]; @@ -1080,13 +1181,13 @@ - (void)testBadlyFormattedReport // Inject another report reportExpectation = [self expectationWithDescription:@"Report sent"]; myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @771234 } } ]; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1095,21 +1196,24 @@ - (void)testBadlyFormattedReport // Setup stop report handler XCTestExpectation * stopExpectation = [self expectationWithDescription:@"Reports stopped"]; - _handleStopReports = ^(id _Nullable controller, NSNumber * nodeId, void (^completion)(void)) { + _handleStopReports = ^(id _Nullable controller, uint64_t nodeId, void (^completion)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); completion(); [stopExpectation fulfill]; }; // Deregister report handler _xpcDisconnectExpectation.inverted = NO; - device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; + [_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"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1125,9 +1229,9 @@ - (void)testReportWithUnrelatedEndpointId NSNumber * myMinInterval = @5; NSNumber * myMaxInterval = @60; __block NSArray * myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:@([myEndpointId unsignedShortValue] + 1) - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:@([myEndpointId unsignedShortValue] + 1) + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; @@ -1136,38 +1240,47 @@ - (void)testReportWithUnrelatedEndpointId reportExpectation.inverted = YES; __auto_type uuid = self.controllerUUID; - _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)) { + _handleSubscribeAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, + void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertNil(params); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:params - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); + [_remoteDeviceController + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; + 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]; + }]; }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1175,7 +1288,7 @@ - (void)testReportWithUnrelatedEndpointId // Inject report id clientObject = _xpcConnection.remoteObjectProxy; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1185,13 +1298,13 @@ - (void)testReportWithUnrelatedEndpointId // Inject another report reportExpectation = [self expectationWithDescription:@"2nd report sent"]; myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @771234 } } ]; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1200,20 +1313,23 @@ - (void)testReportWithUnrelatedEndpointId // Setup stop report handler XCTestExpectation * stopExpectation = [self expectationWithDescription:@"Reports stopped"]; - _handleStopReports = ^(id _Nullable controller, NSNumber * nodeId, void (^completion)(void)) { + _handleStopReports = ^(id _Nullable controller, uint64_t nodeId, void (^completion)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); completion(); [stopExpectation fulfill]; }; // Deregister report handler - device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; + [_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"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1229,9 +1345,9 @@ - (void)testReportWithUnrelatedClusterId NSNumber * myMinInterval = @5; NSNumber * myMaxInterval = @60; __block NSArray * myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:@([myClusterId unsignedLongValue] + 1) - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:@([myClusterId unsignedLongValue] + 1) + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; @@ -1240,38 +1356,47 @@ - (void)testReportWithUnrelatedClusterId reportExpectation.inverted = YES; __auto_type uuid = self.controllerUUID; - _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nonnull params, void (^establishedHandler)(void)) { + _handleSubscribeAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, + void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertNil(params); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:params - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); + [_remoteDeviceController + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; + 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]; + }]; }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1279,7 +1404,7 @@ - (void)testReportWithUnrelatedClusterId // Inject report id clientObject = _xpcConnection.remoteObjectProxy; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1289,13 +1414,13 @@ - (void)testReportWithUnrelatedClusterId // Inject another report reportExpectation = [self expectationWithDescription:@"2nd report sent"]; myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @771234 } } ]; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1304,20 +1429,23 @@ - (void)testReportWithUnrelatedClusterId // Setup stop report handler XCTestExpectation * stopExpectation = [self expectationWithDescription:@"Reports stopped"]; - _handleStopReports = ^(id _Nullable controller, NSNumber * nodeId, void (^completion)(void)) { + _handleStopReports = ^(id _Nullable controller, uint64_t nodeId, void (^completion)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); completion(); [stopExpectation fulfill]; }; // Deregister report handler - device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; + [_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"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1333,9 +1461,9 @@ - (void)testReportWithUnrelatedAttributeId NSNumber * myMinInterval = @5; NSNumber * myMaxInterval = @60; __block NSArray * myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:@([myAttributeId unsignedLongValue] + 1)], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:@([myAttributeId unsignedLongValue] + 1)], @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; @@ -1344,38 +1472,47 @@ - (void)testReportWithUnrelatedAttributeId reportExpectation.inverted = YES; __auto_type uuid = self.controllerUUID; - _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nonnull params, void (^establishedHandler)(void)) { + _handleSubscribeAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, + void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertNil(params); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:params - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); + [_remoteDeviceController + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; + 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]; + }]; }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1383,7 +1520,7 @@ - (void)testReportWithUnrelatedAttributeId // Inject report id clientObject = _xpcConnection.remoteObjectProxy; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1393,13 +1530,13 @@ - (void)testReportWithUnrelatedAttributeId // Inject another report reportExpectation = [self expectationWithDescription:@"2nd report sent"]; myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @771234 } } ]; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1408,20 +1545,23 @@ - (void)testReportWithUnrelatedAttributeId // Setup stop report handler XCTestExpectation * stopExpectation = [self expectationWithDescription:@"Reports stopped"]; - _handleStopReports = ^(id _Nullable controller, NSNumber * nodeId, void (^completion)(void)) { + _handleStopReports = ^(id _Nullable controller, uint64_t nodeId, void (^completion)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); completion(); [stopExpectation fulfill]; }; // Deregister report handler - device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; + [_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"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1437,9 +1577,9 @@ - (void)testReportWithUnrelatedNode NSNumber * myMinInterval = @5; NSNumber * myMaxInterval = @60; __block NSArray * myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; @@ -1448,38 +1588,47 @@ - (void)testReportWithUnrelatedNode reportExpectation.inverted = YES; __auto_type uuid = self.controllerUUID; - _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)) { + _handleSubscribeAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, + void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertNil(params); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:params - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); + [_remoteDeviceController + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; + 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]; + }]; }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1487,7 +1636,7 @@ - (void)testReportWithUnrelatedNode // Inject report id clientObject = _xpcConnection.remoteObjectProxy; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId + 1) + nodeId:myNodeId + 1 values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1497,13 +1646,13 @@ - (void)testReportWithUnrelatedNode // Inject another report reportExpectation = [self expectationWithDescription:@"2nd report sent"]; myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @771234 } } ]; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1512,20 +1661,23 @@ - (void)testReportWithUnrelatedNode // Setup stop report handler XCTestExpectation * stopExpectation = [self expectationWithDescription:@"Reports stopped"]; - _handleStopReports = ^(id _Nullable controller, NSNumber * nodeId, void (^completion)(void)) { + _handleStopReports = ^(id _Nullable controller, uint64_t nodeId, void (^completion)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); completion(); [stopExpectation fulfill]; }; // Deregister report handler - device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; + [_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"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1541,9 +1693,9 @@ - (void)testSubscribeMultiEndpoints NSNumber * myMinInterval = @5; NSNumber * myMaxInterval = @60; __block NSArray * myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; @@ -1551,38 +1703,47 @@ - (void)testSubscribeMultiEndpoints __block XCTestExpectation * reportExpectation = [self expectationWithDescription:@"Report sent"]; __auto_type uuid = self.controllerUUID; - _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)) { + _handleSubscribeAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, + void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertNil(endpointId); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertNil(params); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributePathWithEndpointID:nil - clusterID:myClusterId - attributeID:myAttributeId - params:params - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); + [_remoteDeviceController + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; + 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]; + }]; }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1590,7 +1751,7 @@ - (void)testSubscribeMultiEndpoints // Inject report id clientObject = _xpcConnection.remoteObjectProxy; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1600,13 +1761,13 @@ - (void)testSubscribeMultiEndpoints // Inject another report reportExpectation = [self expectationWithDescription:@"2nd report sent"]; myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @771234 } } ]; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1615,20 +1776,23 @@ - (void)testSubscribeMultiEndpoints // Setup stop report handler XCTestExpectation * stopExpectation = [self expectationWithDescription:@"Reports stopped"]; - _handleStopReports = ^(id _Nullable controller, NSNumber * nodeId, void (^completion)(void)) { + _handleStopReports = ^(id _Nullable controller, uint64_t nodeId, void (^completion)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); completion(); [stopExpectation fulfill]; }; // Deregister report handler - device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; + [_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"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1644,9 +1808,9 @@ - (void)testSubscribeMultiClusters NSNumber * myMinInterval = @5; NSNumber * myMaxInterval = @60; __block NSArray * myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; @@ -1654,38 +1818,47 @@ - (void)testSubscribeMultiClusters __block XCTestExpectation * reportExpectation = [self expectationWithDescription:@"Report sent"]; __auto_type uuid = self.controllerUUID; - _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)) { + _handleSubscribeAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, + void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertNil(clusterId); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertNil(params); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributePathWithEndpointID:myEndpointId - clusterID:nil - attributeID:myAttributeId - params:params - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); + [_remoteDeviceController + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; + 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]; + }]; }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1693,7 +1866,7 @@ - (void)testSubscribeMultiClusters // Inject report id clientObject = _xpcConnection.remoteObjectProxy; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1703,13 +1876,13 @@ - (void)testSubscribeMultiClusters // Inject another report reportExpectation = [self expectationWithDescription:@"2nd report sent"]; myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @771234 } } ]; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1718,20 +1891,23 @@ - (void)testSubscribeMultiClusters // Setup stop report handler XCTestExpectation * stopExpectation = [self expectationWithDescription:@"Reports stopped"]; - _handleStopReports = ^(id _Nullable controller, NSNumber * nodeId, void (^completion)(void)) { + _handleStopReports = ^(id _Nullable controller, uint64_t nodeId, void (^completion)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); completion(); [stopExpectation fulfill]; }; // Deregister report handler - device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; + [_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"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1747,9 +1923,9 @@ - (void)testSubscribeMultiAttributes NSNumber * myMinInterval = @5; NSNumber * myMaxInterval = @60; __block NSArray * myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; @@ -1757,38 +1933,47 @@ - (void)testSubscribeMultiAttributes __block XCTestExpectation * reportExpectation = [self expectationWithDescription:@"Report sent"]; __auto_type uuid = self.controllerUUID; - _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)) { + _handleSubscribeAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, + void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertNil(attributeId); - XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertNil(params); [callExpectation fulfill]; establishedHandler(); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:nil - params:params - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); + [_remoteDeviceController + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; + 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]; + }]; }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1796,7 +1981,7 @@ - (void)testSubscribeMultiAttributes // Inject report id clientObject = _xpcConnection.remoteObjectProxy; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1806,13 +1991,13 @@ - (void)testSubscribeMultiAttributes // Inject another report reportExpectation = [self expectationWithDescription:@"2nd report sent"]; myReport = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @771234 } } ]; [clientObject handleReportWithController:uuid - nodeID:@(myNodeId) + nodeId:myNodeId values:[MTRDeviceController encodeXPCResponseValues:myReport] error:nil]; @@ -1821,20 +2006,23 @@ - (void)testSubscribeMultiAttributes // Setup stop report handler XCTestExpectation * stopExpectation = [self expectationWithDescription:@"Reports stopped"]; - _handleStopReports = ^(id _Nullable controller, NSNumber * nodeId, void (^completion)(void)) { + _handleStopReports = ^(id _Nullable controller, uint64_t nodeId, void (^completion)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); completion(); [stopExpectation fulfill]; }; // Deregister report handler - device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; + [_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"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1861,15 +2049,17 @@ - (void)testMutiSubscriptions __block NSArray * reportExpectations; __auto_type uuid = self.controllerUUID; - _handleSubscribeAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRSubscribeParams * _Nullable params, void (^establishedHandler)(void)) { + _handleSubscribeAttribute = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, NSNumber * minInterval, NSNumber * maxInterval, MTRSubscribeParams * _Nullable params, + void (^establishedHandler)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertEqual([params.minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); - XCTAssertEqual([params.maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertEqual([minInterval unsignedShortValue], [myMinInterval unsignedShortValue]); + XCTAssertEqual([maxInterval unsignedShortValue], [myMaxInterval unsignedShortValue]); + XCTAssertNil(params); [callExpectation fulfill]; establishedHandler(); }; @@ -1886,23 +2076,30 @@ - (void)testMutiSubscriptions myMaxInterval = maxIntervals[i]; callExpectation = [self expectationWithDescription:[NSString stringWithFormat:@"XPC call (%u) received", i]]; establishExpectation = [self expectationWithDescription:[NSString stringWithFormat:@"Established (%u) called", i]]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:myMinInterval maxInterval:myMaxInterval]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:params - queue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Subscriber [%d] report value: %@", i, values); - XCTAssertNotNil(values); + [_remoteDeviceController + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); XCTAssertNil(error); - XCTAssertTrue([myReports[i] isEqual:values]); - [reportExpectations[i] fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; + 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]; + }]; }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1918,15 +2115,15 @@ - (void)testMutiSubscriptions [self expectationWithDescription:[NSString stringWithFormat:@"Report(%d) for second subscriber sent", count]], nil]; myReports = @[ @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:endpointIds[0] - clusterID:clusterIds[0] - attributeID:attributeIds[0]], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:endpointIds[0] + clusterId:clusterIds[0] + attributeId:attributeIds[0]], @"data" : @ { @"type" : @"SignedInteger", @"value" : [NSNumber numberWithInteger:123456 + count * 100] } } ], @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:endpointIds[1] - clusterID:clusterIds[1] - attributeID:attributeIds[1]], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:endpointIds[1] + clusterId:clusterIds[1] + attributeId:attributeIds[1]], @"data" : @ { @"type" : @"SignedInteger", @"value" : [NSNumber numberWithInteger:123457 + count * 100] } } ] ]; @@ -1934,7 +2131,7 @@ - (void)testMutiSubscriptions NSUInteger nodeId = nodeIds[i]; dispatch_async(dispatch_get_main_queue(), ^{ [clientObject handleReportWithController:uuid - nodeID:@(nodeId) + nodeId:nodeId values:[MTRDeviceController encodeXPCResponseValues:myReports[i]] error:nil]; }); @@ -1945,21 +2142,25 @@ - (void)testMutiSubscriptions // Setup stop report handler XCTestExpectation * stopExpectation = [self expectationWithDescription:@"Reports stopped"]; __auto_type nodeToStop = nodeIds[0]; - _handleStopReports = ^(id _Nullable controller, NSNumber * nodeId, void (^completion)(void)) { + _handleStopReports = ^(id _Nullable controller, uint64_t nodeId, void (^completion)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], nodeToStop); + XCTAssertEqual(nodeId, nodeToStop); completion(); [stopExpectation fulfill]; }; // Deregister report handler for first subscriber __auto_type deregisterExpectation = [self expectationWithDescription:@"First subscriber deregistered"]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(nodeToStop) controller:_remoteDeviceController]; - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - [deregisterExpectation fulfill]; - }]; + [_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]; + }]; + }]; [self waitForExpectations:@[ stopExpectation, deregisterExpectation ] timeout:kTimeoutInSeconds]; @@ -1972,15 +2173,15 @@ - (void)testMutiSubscriptions reportExpectations[0].inverted = YES; myReports = @[ @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:endpointIds[0] - clusterID:clusterIds[0] - attributeID:attributeIds[0]], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:endpointIds[0] + clusterId:clusterIds[0] + attributeId:attributeIds[0]], @"data" : @ { @"type" : @"SignedInteger", @"value" : [NSNumber numberWithInteger:223456 + count * 100] } } ], @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:endpointIds[1] - clusterID:clusterIds[1] - attributeID:attributeIds[1]], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:endpointIds[1] + clusterId:clusterIds[1] + attributeId:attributeIds[1]], @"data" : @ { @"type" : @"SignedInteger", @"value" : [NSNumber numberWithInteger:223457 + count * 100] } } ] ]; @@ -1988,7 +2189,7 @@ - (void)testMutiSubscriptions NSUInteger nodeId = nodeIds[i]; dispatch_async(dispatch_get_main_queue(), ^{ [clientObject handleReportWithController:uuid - nodeID:@(nodeId) + nodeId:nodeId values:[MTRDeviceController encodeXPCResponseValues:myReports[i]] error:nil]; }); @@ -1999,22 +2200,25 @@ - (void)testMutiSubscriptions // Setup stop report handler stopExpectation = [self expectationWithDescription:@"Reports stopped"]; nodeToStop = nodeIds[1]; - _handleStopReports = ^(id _Nullable controller, NSNumber * nodeId, void (^completion)(void)) { + _handleStopReports = ^(id _Nullable controller, uint64_t nodeId, void (^completion)(void)) { XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], nodeToStop); + XCTAssertEqual(nodeId, nodeToStop); completion(); [stopExpectation fulfill]; }; // Deregister report handler for second subscriber __auto_type secondDeregisterExpectation = [self expectationWithDescription:@"Second subscriber deregistered"]; - device = [MTRBaseDevice deviceWithNodeID:@(nodeToStop) controller:_remoteDeviceController]; - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - [secondDeregisterExpectation fulfill]; - }]; + [_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]; + }]; + }]; // Wait for deregistration and disconnection [self waitForExpectations:@[ secondDeregisterExpectation, _xpcDisconnectExpectation, stopExpectation ] @@ -2031,15 +2235,15 @@ - (void)testMutiSubscriptions reportExpectations[1].inverted = YES; myReports = @[ @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:endpointIds[0] - clusterID:clusterIds[0] - attributeID:attributeIds[0]], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:endpointIds[0] + clusterId:clusterIds[0] + attributeId:attributeIds[0]], @"data" : @ { @"type" : @"SignedInteger", @"value" : [NSNumber numberWithInteger:223456 + count * 100] } } ], @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:endpointIds[1] - clusterID:clusterIds[1] - attributeID:attributeIds[1]], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:endpointIds[1] + clusterId:clusterIds[1] + attributeId:attributeIds[1]], @"data" : @ { @"type" : @"SignedInteger", @"value" : [NSNumber numberWithInteger:223457 + count * 100] } } ] ]; @@ -2047,7 +2251,7 @@ - (void)testMutiSubscriptions NSUInteger nodeId = nodeIds[i]; dispatch_async(dispatch_get_main_queue(), ^{ [clientObject handleReportWithController:uuid - nodeID:@(nodeId) + nodeId:nodeId values:[MTRDeviceController encodeXPCResponseValues:myReports[i]] error:nil]; }); @@ -2060,34 +2264,9 @@ - (void)testAnySharedRemoteController { NSString * myUUID = [[NSUUID UUID] UUIDString]; uint64_t myNodeId = 9876543210; - NSNumber * myEndpointId = @100; - NSNumber * myClusterId = @200; - NSNumber * myAttributeId = @300; - NSArray * myValues = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], - @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } - } ]; - - XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; - XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; - - _handleReadAttribute = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, MTRReadParams * _Nullable params, - void (^completion)(id _Nullable values, NSError * _Nullable error)) { - XCTAssertTrue([controller isEqualToString:myUUID]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); - XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); - XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); - XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - XCTAssertNil(params); - [callExpectation fulfill]; - completion([MTRDeviceController encodeXPCResponseValues:myValues], nil); - }; __auto_type unspecifiedRemoteDeviceController = - [MTRDeviceController sharedControllerWithID:nil + [MTRDeviceController sharedControllerWithId:nil xpcConnectBlock:^NSXPCConnection * { return [[NSXPCConnection alloc] initWithListenerEndpoint:self.xpcListener.endpoint]; }]; @@ -2099,102 +2278,91 @@ - (void)testAnySharedRemoteController [anySharedRemoteControllerCallExpectation fulfill]; }; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:unspecifiedRemoteDeviceController]; - // Do a read to exercise the device. - NSLog(@"Device acquired. Reading..."); - [device readAttributePathWithEndpointID: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:anySharedRemoteControllerCallExpectation, callExpectation, - responseExpectation, nil] - timeout:kTimeoutInSeconds]; + __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]; + }]; - // When read is done, connection should have been released - [self waitForExpectations:[NSArray arrayWithObject:_xpcDisconnectExpectation] timeout:kTimeoutInSeconds]; - XCTAssertNil(_xpcConnection); + [self waitForExpectations:[NSArray arrayWithObjects:anySharedRemoteControllerCallExpectation, deviceAcquired, nil] + timeout:kTimeoutInSeconds]; } -- (void)testSubscribeClusterStateCacheSuccess +- (void)testSubscribeAttributeCacheSuccess { uint64_t myNodeId = 9876543210; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; - __auto_type clusterStateCacheContainer = [[MTRClusterStateCacheContainer alloc] init]; - _handleSubscribeAll = ^(id controller, NSNumber * nodeId, MTRSubscribeParams * _Nonnull params, BOOL shouldCache, - void (^completion)(NSError * _Nullable error)) { + __auto_type attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; + _handleSubscribeAll = ^(id controller, uint64_t nodeId, NSNumber * minInterval, NSNumber * maxInterval, + MTRSubscribeParams * _Nullable params, BOOL shouldCache, void (^completion)(NSError * _Nullable error)) { NSLog(@"Subscribe called"); XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); + XCTAssertNil(params); [callExpectation fulfill]; completion(nil); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [clusterStateCacheContainer subscribeWithDeviceController:_remoteDeviceController - deviceID:@(myNodeId) - params:nil - queue:dispatch_get_main_queue() - completion:^(NSError * _Nullable error) { - NSLog(@"Subscribe completion called with error: %@", error); - XCTAssertNil(error); - [responseExpectation fulfill]; - }]; + [attributeCacheContainer subscribeWithDeviceController:_remoteDeviceController + deviceId:myNodeId + params:nil + clientQueue:dispatch_get_main_queue() + completion:^(NSError * _Nullable error) { + NSLog(@"Subscribe completion called with error: %@", error); + XCTAssertNil(error); + [responseExpectation fulfill]; + }]; [self waitForExpectations:@[ callExpectation, responseExpectation, self.xpcDisconnectExpectation ] timeout:kTimeoutInSeconds]; XCTAssertNil(_xpcConnection); } -- (void)testSubscribeClusterStateCacheWithParamsSuccess +- (void)testSubscribeAttributeCacheWithParamsSuccess { uint64_t myNodeId = 9876543210; - MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(43200)]; - myParams.fabricFiltered = YES; - myParams.keepPreviousSubscriptions = YES; + MTRSubscribeParams * myParams = [[MTRSubscribeParams alloc] init]; + myParams.fabricFiltered = @YES; + myParams.keepPreviousSubscriptions = @YES; XCTestExpectation * callExpectation = [self expectationWithDescription:@"XPC call received"]; XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; - __auto_type clusterStateCacheContainer = [[MTRClusterStateCacheContainer alloc] init]; - _handleSubscribeAll = ^(id controller, NSNumber * nodeId, MTRSubscribeParams * _Nonnull params, BOOL shouldCache, - void (^completion)(NSError * _Nullable error)) { + __auto_type attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; + _handleSubscribeAll = ^(id controller, uint64_t nodeId, NSNumber * minInterval, NSNumber * maxInterval, + MTRSubscribeParams * _Nullable params, BOOL shouldCache, void (^completion)(NSError * _Nullable error)) { NSLog(@"Subscribe attribute cache called"); XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); - XCTAssertEqual(params.fabricFiltered, myParams.fabricFiltered); - XCTAssertEqual(params.keepPreviousSubscriptions, myParams.keepPreviousSubscriptions); + XCTAssertEqual(nodeId, myNodeId); + XCTAssertNotNil(params); + XCTAssertEqual([params.fabricFiltered boolValue], [myParams.fabricFiltered boolValue]); + XCTAssertEqual([params.keepPreviousSubscriptions boolValue], [myParams.keepPreviousSubscriptions boolValue]); [callExpectation fulfill]; completion(nil); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [clusterStateCacheContainer subscribeWithDeviceController:_remoteDeviceController - deviceID:@(myNodeId) - params:myParams - queue:dispatch_get_main_queue() - completion:^(NSError * _Nullable error) { - NSLog(@"Subscribe completion called with error: %@", error); - XCTAssertNil(error); - [responseExpectation fulfill]; - }]; + [attributeCacheContainer subscribeWithDeviceController:_remoteDeviceController + deviceId:myNodeId + params:myParams + clientQueue:dispatch_get_main_queue() + completion:^(NSError * _Nullable error) { + NSLog(@"Subscribe completion called with error: %@", error); + XCTAssertNil(error); + [responseExpectation fulfill]; + }]; [self waitForExpectations:@[ callExpectation, responseExpectation, self.xpcDisconnectExpectation ] timeout:kTimeoutInSeconds]; XCTAssertNil(_xpcConnection); } -- (void)testSubscribeClusterStateCacheFailure +- (void)testSubscribeAttributeCacheFailure { uint64_t myNodeId = 9876543210; NSError * myError = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]; @@ -2202,41 +2370,42 @@ - (void)testSubscribeClusterStateCacheFailure XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; - __auto_type clusterStateCacheContainer = [[MTRClusterStateCacheContainer alloc] init]; - _handleSubscribeAll = ^(id controller, NSNumber * nodeId, MTRSubscribeParams * _Nonnull params, BOOL shouldCache, - void (^completion)(NSError * _Nullable error)) { + __auto_type attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; + _handleSubscribeAll = ^(id controller, uint64_t nodeId, NSNumber * minInterval, NSNumber * maxInterval, + MTRSubscribeParams * _Nullable params, BOOL shouldCache, void (^completion)(NSError * _Nullable error)) { NSLog(@"Subscribe attribute cache called"); XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); + XCTAssertNil(params); [callExpectation fulfill]; completion(myError); }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [clusterStateCacheContainer subscribeWithDeviceController:_remoteDeviceController - deviceID:@(myNodeId) - params:nil - queue:dispatch_get_main_queue() - completion:^(NSError * _Nullable error) { - NSLog(@"Subscribe completion called with error: %@", error); - XCTAssertNotNil(error); - [responseExpectation fulfill]; - }]; + [attributeCacheContainer subscribeWithDeviceController:_remoteDeviceController + deviceId:myNodeId + params:nil + clientQueue:dispatch_get_main_queue() + completion:^(NSError * _Nullable error) { + NSLog(@"Subscribe completion called with error: %@", error); + XCTAssertNotNil(error); + [responseExpectation fulfill]; + }]; [self waitForExpectations:@[ callExpectation, responseExpectation, _xpcDisconnectExpectation ] timeout:kTimeoutInSeconds]; XCTAssertNil(_xpcConnection); } -- (void)testReadClusterStateCacheSuccess +- (void)testReadAttributeCacheSuccess { uint64_t myNodeId = 9876543210; NSNumber * myEndpointId = @100; NSNumber * myClusterId = @200; NSNumber * myAttributeId = @300; NSArray * myValues = @[ @{ - @"attributePath" : [MTRAttributePath attributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId], + @"attributePath" : [MTRAttributePath attributePathWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId], @"data" : @ { @"type" : @"SignedInteger", @"value" : @123456 } } ]; @@ -2245,59 +2414,59 @@ - (void)testReadClusterStateCacheSuccess XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; - __auto_type clusterStateCacheContainer = [[MTRClusterStateCacheContainer alloc] init]; - _handleSubscribeAll = ^(id controller, NSNumber * nodeId, MTRSubscribeParams * _Nonnull params, BOOL shouldCache, - void (^completion)(NSError * _Nullable error)) { + __auto_type attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; + _handleSubscribeAll = ^(id controller, uint64_t nodeId, NSNumber * minInterval, NSNumber * maxInterval, + MTRSubscribeParams * _Nullable params, BOOL shouldCache, void (^completion)(NSError * _Nullable error)) { NSLog(@"Subscribe attribute cache called"); XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); + XCTAssertNil(params); completion(nil); }; - _handleReadClusterStateCache - = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, void (^completion)(id _Nullable values, NSError * _Nullable error)) { - NSLog(@"Read attribute cache called"); - XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); - XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); - XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); - XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - [callExpectation fulfill]; - completion([MTRDeviceController encodeXPCResponseValues:myValues], nil); - }; + _handleReadAttributeCache = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, void (^completion)(id _Nullable values, NSError * _Nullable error)) { + NSLog(@"Read attribute cache called"); + XCTAssertTrue([controller isEqualToString:uuid]); + XCTAssertEqual(nodeId, myNodeId); + XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); + XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); + XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); + [callExpectation fulfill]; + completion([MTRDeviceController encodeXPCResponseValues:myValues], nil); + }; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [clusterStateCacheContainer subscribeWithDeviceController:_remoteDeviceController - deviceID:@(myNodeId) - params:nil - queue:dispatch_get_main_queue() - completion:^(NSError * _Nullable error) { - NSLog(@"Subscribe completion called with error: %@", error); - XCTAssertNil(error); - [subscribeExpectation fulfill]; - }]; + [attributeCacheContainer subscribeWithDeviceController:_remoteDeviceController + deviceId:myNodeId + params:nil + clientQueue:dispatch_get_main_queue() + completion:^(NSError * _Nullable error) { + NSLog(@"Subscribe completion called with error: %@", error); + XCTAssertNil(error); + [subscribeExpectation fulfill]; + }]; [self waitForExpectations:@[ subscribeExpectation, _xpcDisconnectExpectation ] timeout:kTimeoutInSeconds]; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [clusterStateCacheContainer - readAttributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - queue:dispatch_get_main_queue() - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Read cached value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myValues isEqual:values]); - [responseExpectation fulfill]; - }]; + [attributeCacheContainer + readAttributeWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId + clientQueue:dispatch_get_main_queue() + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Read cached value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myValues isEqual:values]); + [responseExpectation fulfill]; + }]; [self waitForExpectations:@[ callExpectation, responseExpectation, _xpcDisconnectExpectation ] timeout:kTimeoutInSeconds]; XCTAssertNil(_xpcConnection); } -- (void)testReadClusterStateCacheFailure +- (void)testReadAttributeCacheFailure { uint64_t myNodeId = 9876543210; NSNumber * myEndpointId = @100; @@ -2309,52 +2478,51 @@ - (void)testReadClusterStateCacheFailure XCTestExpectation * responseExpectation = [self expectationWithDescription:@"XPC response received"]; __auto_type uuid = self.controllerUUID; - __auto_type clusterStateCacheContainer = [[MTRClusterStateCacheContainer alloc] init]; - _handleSubscribeAll = ^(id controller, NSNumber * nodeId, MTRSubscribeParams * _Nonnull params, BOOL shouldCache, - void (^completion)(NSError * _Nullable error)) { + __auto_type attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; + _handleSubscribeAll = ^(id controller, uint64_t nodeId, NSNumber * minInterval, NSNumber * maxInterval, + MTRSubscribeParams * _Nullable params, BOOL shouldCache, void (^completion)(NSError * _Nullable error)) { NSLog(@"Subscribe attribute cache called"); XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); + XCTAssertEqual(nodeId, myNodeId); + XCTAssertNil(params); completion(nil); }; - _handleReadClusterStateCache - = ^(id controller, NSNumber * nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, - NSNumber * _Nullable attributeId, void (^completion)(id _Nullable values, NSError * _Nullable error)) { - NSLog(@"Read attribute cache called"); - XCTAssertTrue([controller isEqualToString:uuid]); - XCTAssertEqual([nodeId unsignedLongLongValue], myNodeId); - XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); - XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); - XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); - [callExpectation fulfill]; - completion(nil, myError); - }; + _handleReadAttributeCache = ^(id controller, uint64_t nodeId, NSNumber * _Nullable endpointId, NSNumber * _Nullable clusterId, + NSNumber * _Nullable attributeId, void (^completion)(id _Nullable values, NSError * _Nullable error)) { + NSLog(@"Read attribute cache called"); + XCTAssertTrue([controller isEqualToString:uuid]); + XCTAssertEqual(nodeId, myNodeId); + XCTAssertEqual([endpointId unsignedShortValue], [myEndpointId unsignedShortValue]); + XCTAssertEqual([clusterId unsignedLongValue], [myClusterId unsignedLongValue]); + XCTAssertEqual([attributeId unsignedLongValue], [myAttributeId unsignedLongValue]); + [callExpectation fulfill]; + completion(nil, myError); + }; - _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [clusterStateCacheContainer subscribeWithDeviceController:_remoteDeviceController - deviceID:@(myNodeId) - params:nil - queue:dispatch_get_main_queue() - completion:^(NSError * _Nullable error) { - NSLog(@"Subscribe completion called with error: %@", error); - XCTAssertNil(error); - [subscribeExpectation fulfill]; - }]; - [self waitForExpectations:@[ subscribeExpectation, _xpcDisconnectExpectation ] timeout:kTimeoutInSeconds]; + [attributeCacheContainer subscribeWithDeviceController:_remoteDeviceController + deviceId:myNodeId + params:nil + clientQueue:dispatch_get_main_queue() + completion:^(NSError * _Nullable error) { + NSLog(@"Subscribe completion called with error: %@", error); + XCTAssertNil(error); + [subscribeExpectation fulfill]; + }]; + [self waitForExpectations:@[ subscribeExpectation ] timeout:kTimeoutInSeconds]; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; - [clusterStateCacheContainer - readAttributePathWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - queue:dispatch_get_main_queue() - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Read cached value: %@", values); - XCTAssertNil(values); - XCTAssertNotNil(error); - [responseExpectation fulfill]; - }]; + [attributeCacheContainer + readAttributeWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId + clientQueue:dispatch_get_main_queue() + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Read cached value: %@", values); + XCTAssertNil(values); + XCTAssertNotNil(error); + [responseExpectation fulfill]; + }]; [self waitForExpectations:@[ callExpectation, responseExpectation, _xpcDisconnectExpectation ] timeout:kTimeoutInSeconds]; XCTAssertNil(_xpcConnection); } @@ -2368,24 +2536,29 @@ - (void)testXPCConnectionFailure XCTestExpectation * responseExpectation = [self expectationWithDescription:@"Read response received"]; // Test with a device controller which wouldn't connect to XPC listener successfully - __auto_type failingDeviceController = [MTRDeviceController sharedControllerWithID:_controllerUUID + __auto_type failingDeviceController = [MTRDeviceController sharedControllerWithId:_controllerUUID xpcConnectBlock:^NSXPCConnection * { return nil; }]; - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(myNodeId) controller:failingDeviceController]; - NSLog(@"Device acquired. Reading..."); - [device readAttributePathWithEndpointID: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]; - }]; + [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]; + }]; + }]; [self waitForExpectations:@[ responseExpectation ] timeout:kTimeoutInSeconds]; } diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 5708ef969b195a..6e56afa28f948c 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -15,8 +15,8 @@ 1ED276E026C57CF000547A89 /* MTRCallbackBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ED276DF26C57CF000547A89 /* MTRCallbackBridge.mm */; }; 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ED276E126C5812A00547A89 /* MTRCluster.mm */; }; 1ED276E426C5832500547A89 /* MTRCluster.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED276E326C5832500547A89 /* MTRCluster.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1EDCE545289049A100E41EC9 /* MTROTAHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDCE543289049A100E41EC9 /* MTROTAHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1EDCE546289049A100E41EC9 /* MTROTAHeader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1EDCE544289049A100E41EC9 /* MTROTAHeader.mm */; }; + 1EDCE545289049A100E41EC9 /* MTROTAHeaderParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDCE543289049A100E41EC9 /* MTROTAHeaderParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1EDCE546289049A100E41EC9 /* MTROTAHeaderParser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1EDCE544289049A100E41EC9 /* MTROTAHeaderParser.mm */; }; 27A53C1727FBC6920053F131 /* MTRAttestationTrustStoreBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */; }; 27A53C1827FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */; }; 2C1B027A2641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2C1B02782641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm */; }; @@ -27,11 +27,11 @@ 2C5EEEF6268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C5EEEF4268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h */; }; 2C5EEEF7268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2C5EEEF5268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm */; }; 2C8C8FC0253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C8C8FBD253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h */; }; - 2C8C8FC1253E0C2100797F05 /* MTRStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C8C8FBE253E0C2100797F05 /* MTRStorage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2C8C8FC1253E0C2100797F05 /* MTRPersistentStorageDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C8C8FBE253E0C2100797F05 /* MTRPersistentStorageDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2C8C8FC2253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2C8C8FBF253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm */; }; - 2CB7163B252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CB71638252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h */; }; - 2CB7163C252E8A7C0026E2BB /* MTRDeviceControllerDelegateBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2CB71639252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.mm */; }; - 2CB7163F252F731E0026E2BB /* MTRDeviceControllerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CB7163E252F731E0026E2BB /* MTRDeviceControllerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2CB7163B252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CB71638252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.h */; }; + 2CB7163C252E8A7C0026E2BB /* MTRDevicePairingDelegateBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2CB71639252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.mm */; }; + 2CB7163F252F731E0026E2BB /* MTRDevicePairingDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CB7163E252F731E0026E2BB /* MTRDevicePairingDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2FD775552695557E00FF4B12 /* error-mapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FD775542695557E00FF4B12 /* error-mapping.cpp */; }; 3CF134A7289D8ADA0017A19E /* MTRCSRInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3CF134A9289D8D800017A19E /* MTRCSRInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CF134A8289D8D800017A19E /* MTRCSRInfo.m */; }; @@ -43,9 +43,9 @@ 511913FC28C100EF009235E9 /* MTRBaseSubscriptionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 511913FA28C100EF009235E9 /* MTRBaseSubscriptionCallback.h */; }; 5129BCFD26A9EE3300122DDF /* MTRError.h in Headers */ = {isa = PBXBuildFile; fileRef = 5129BCFC26A9EE3300122DDF /* MTRError.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5136661328067D550025EDAE /* MTRDeviceController_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5136660F28067D540025EDAE /* MTRDeviceController_Internal.h */; }; - 5136661428067D550025EDAE /* MTRDeviceControllerFactory.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5136661028067D540025EDAE /* MTRDeviceControllerFactory.mm */; }; - 5136661528067D550025EDAE /* MTRDeviceControllerFactory_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5136661128067D540025EDAE /* MTRDeviceControllerFactory_Internal.h */; }; - 5136661628067D550025EDAE /* MTRDeviceControllerFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 5136661228067D550025EDAE /* MTRDeviceControllerFactory.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5136661428067D550025EDAE /* MTRControllerFactory.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5136661028067D540025EDAE /* MTRControllerFactory.mm */; }; + 5136661528067D550025EDAE /* MTRControllerFactory_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5136661128067D540025EDAE /* MTRControllerFactory_Internal.h */; }; + 5136661628067D550025EDAE /* MTRControllerFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 5136661228067D550025EDAE /* MTRControllerFactory.h */; settings = {ATTRIBUTES = (Public, ); }; }; 513DDB862761F69300DAA01A /* MTRAttributeTLVValueDecoder_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 513DDB852761F69300DAA01A /* MTRAttributeTLVValueDecoder_Internal.h */; }; 513DDB8A2761F6F900DAA01A /* MTRAttributeTLVValueDecoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 513DDB892761F6F900DAA01A /* MTRAttributeTLVValueDecoder.mm */; }; 51431AF927D2973E008A7943 /* MTRIMDispatch.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51431AF827D2973E008A7943 /* MTRIMDispatch.mm */; }; @@ -67,7 +67,7 @@ 51E51FBF282AD37A00FC978D /* MTRDeviceControllerStartupParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */; settings = {ATTRIBUTES = (Public, ); }; }; 51E51FC0282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */; }; 51E51FC1282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */; }; - 5A60370827EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A60370727EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h */; }; + 5A60370827EA1FF60020DB79 /* MTRAttributeCacheContainer+XPC.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A60370727EA1FF60020DB79 /* MTRAttributeCacheContainer+XPC.h */; }; 5A6FEC9027B563D900F25F42 /* MTRDeviceControllerOverXPC.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A6FEC8F27B563D900F25F42 /* MTRDeviceControllerOverXPC.m */; }; 5A6FEC9227B5669C00F25F42 /* MTRDeviceControllerOverXPC.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A6FEC8D27B5624E00F25F42 /* MTRDeviceControllerOverXPC.h */; }; 5A6FEC9627B5983000F25F42 /* MTRDeviceControllerXPCConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A6FEC9527B5983000F25F42 /* MTRDeviceControllerXPCConnection.m */; }; @@ -79,9 +79,9 @@ 5A7947E427C0129600434CF2 /* MTRDeviceController+XPC.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A7947E327C0129500434CF2 /* MTRDeviceController+XPC.m */; }; 5A7947E527C0129F00434CF2 /* MTRDeviceController+XPC.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A7947E227C0101200434CF2 /* MTRDeviceController+XPC.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5A830D6C27CFCF590053B85D /* MTRDeviceControllerOverXPC_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A830D6B27CFCF590053B85D /* MTRDeviceControllerOverXPC_Internal.h */; }; - 5ACDDD7A27CD129700EFD68A /* MTRClusterStateCacheContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5ACDDD7927CD129700EFD68A /* MTRClusterStateCacheContainer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5ACDDD7D27CD16D200EFD68A /* MTRClusterStateCacheContainer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5ACDDD7C27CD16D200EFD68A /* MTRClusterStateCacheContainer.mm */; }; - 5ACDDD7E27CD3F3A00EFD68A /* MTRClusterStateCacheContainer_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5ACDDD7B27CD14AF00EFD68A /* MTRClusterStateCacheContainer_Internal.h */; }; + 5ACDDD7A27CD129700EFD68A /* MTRAttributeCacheContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5ACDDD7927CD129700EFD68A /* MTRAttributeCacheContainer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5ACDDD7D27CD16D200EFD68A /* MTRAttributeCacheContainer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5ACDDD7C27CD16D200EFD68A /* MTRAttributeCacheContainer.mm */; }; + 5ACDDD7E27CD3F3A00EFD68A /* MTRAttributeCacheContainer_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5ACDDD7B27CD14AF00EFD68A /* MTRAttributeCacheContainer_Internal.h */; }; 5AE6D4E427A99041001F2493 /* MTRDeviceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AE6D4E327A99041001F2493 /* MTRDeviceTests.m */; }; 7534F12828BFF20300390851 /* MTRDeviceAttestationDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7534F12628BFF20300390851 /* MTRDeviceAttestationDelegate.mm */; }; 7534F12928BFF20300390851 /* MTRDeviceAttestationDelegate_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7534F12728BFF20300390851 /* MTRDeviceAttestationDelegate_Internal.h */; }; @@ -97,6 +97,7 @@ 7596A84F2877E6A9004DAE0E /* MTRCluster_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7596A84E2877E6A9004DAE0E /* MTRCluster_internal.h */; }; 7596A8512878709F004DAE0E /* MTRAsyncCallbackQueueTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7596A8502878709F004DAE0E /* MTRAsyncCallbackQueueTests.m */; }; 7596A85528788557004DAE0E /* MTRClusters.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7596A85228788557004DAE0E /* MTRClusters.mm */; }; + 7596A85628788557004DAE0E /* MTRClustersObjc_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7596A85328788557004DAE0E /* MTRClustersObjc_internal.h */; }; 7596A85728788557004DAE0E /* MTRClusters.h in Headers */ = {isa = PBXBuildFile; fileRef = 7596A85428788557004DAE0E /* MTRClusters.h */; settings = {ATTRIBUTES = (Public, ); }; }; 88EBF8CE27FABDD500686BC1 /* MTRDeviceAttestationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EBF8CB27FABDD500686BC1 /* MTRDeviceAttestationDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 88EBF8CF27FABDD500686BC1 /* MTRDeviceAttestationDelegateBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 88EBF8CC27FABDD500686BC1 /* MTRDeviceAttestationDelegateBridge.mm */; }; @@ -118,13 +119,13 @@ AF1CB8702874B04C00865A96 /* MTROTAProviderDelegateBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = AF1CB86F2874B04C00865A96 /* MTROTAProviderDelegateBridge.h */; }; AF5F90FF2878D351005503FA /* MTROTAProviderDelegateBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = AF5F90FE2878D351005503FA /* MTROTAProviderDelegateBridge.mm */; }; B20252972459E34F00F97062 /* Matter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B202528D2459E34F00F97062 /* Matter.framework */; }; - B289D4212639C0D300D4E314 /* MTROnboardingPayloadParser.h in Headers */ = {isa = PBXBuildFile; fileRef = B289D41F2639C0D300D4E314 /* MTROnboardingPayloadParser.h */; }; + B289D4212639C0D300D4E314 /* MTROnboardingPayloadParser.h in Headers */ = {isa = PBXBuildFile; fileRef = B289D41F2639C0D300D4E314 /* MTROnboardingPayloadParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; B289D4222639C0D300D4E314 /* MTROnboardingPayloadParser.m in Sources */ = {isa = PBXBuildFile; fileRef = B289D4202639C0D300D4E314 /* MTROnboardingPayloadParser.m */; }; B2E0D7B1245B0B5C003C5B48 /* Matter.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E0D7A8245B0B5C003C5B48 /* Matter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B2E0D7B2245B0B5C003C5B48 /* MTRManualSetupPayloadParser.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E0D7A9245B0B5C003C5B48 /* MTRManualSetupPayloadParser.h */; }; + B2E0D7B2245B0B5C003C5B48 /* MTRManualSetupPayloadParser.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E0D7A9245B0B5C003C5B48 /* MTRManualSetupPayloadParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; B2E0D7B3245B0B5C003C5B48 /* MTRError.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2E0D7AA245B0B5C003C5B48 /* MTRError.mm */; }; B2E0D7B4245B0B5C003C5B48 /* MTRError_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E0D7AB245B0B5C003C5B48 /* MTRError_Internal.h */; }; - B2E0D7B5245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E0D7AC245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.h */; }; + B2E0D7B5245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E0D7AC245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; B2E0D7B6245B0B5C003C5B48 /* MTRManualSetupPayloadParser.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2E0D7AD245B0B5C003C5B48 /* MTRManualSetupPayloadParser.mm */; }; B2E0D7B7245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2E0D7AE245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.mm */; }; B2E0D7B8245B0B5C003C5B48 /* MTRSetupPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E0D7AF245B0B5C003C5B48 /* MTRSetupPayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -154,8 +155,8 @@ 1ED276DF26C57CF000547A89 /* MTRCallbackBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MTRCallbackBridge.mm; path = "zap-generated/MTRCallbackBridge.mm"; sourceTree = ""; }; 1ED276E126C5812A00547A89 /* MTRCluster.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCluster.mm; sourceTree = ""; }; 1ED276E326C5832500547A89 /* MTRCluster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRCluster.h; sourceTree = ""; }; - 1EDCE543289049A100E41EC9 /* MTROTAHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTROTAHeader.h; sourceTree = ""; }; - 1EDCE544289049A100E41EC9 /* MTROTAHeader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROTAHeader.mm; sourceTree = ""; }; + 1EDCE543289049A100E41EC9 /* MTROTAHeaderParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTROTAHeaderParser.h; sourceTree = ""; }; + 1EDCE544289049A100E41EC9 /* MTROTAHeaderParser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROTAHeaderParser.mm; sourceTree = ""; }; 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRAttestationTrustStoreBridge.h; sourceTree = ""; }; 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRAttestationTrustStoreBridge.mm; sourceTree = ""; }; 2C1B02782641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROperationalCredentialsDelegate.mm; sourceTree = ""; }; @@ -166,11 +167,11 @@ 2C5EEEF4268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceConnectionBridge.h; sourceTree = ""; }; 2C5EEEF5268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceConnectionBridge.mm; sourceTree = ""; }; 2C8C8FBD253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRPersistentStorageDelegateBridge.h; sourceTree = ""; }; - 2C8C8FBE253E0C2100797F05 /* MTRStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRStorage.h; sourceTree = ""; }; + 2C8C8FBE253E0C2100797F05 /* MTRPersistentStorageDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRPersistentStorageDelegate.h; sourceTree = ""; }; 2C8C8FBF253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRPersistentStorageDelegateBridge.mm; sourceTree = ""; }; - 2CB71638252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerDelegateBridge.h; sourceTree = ""; }; - 2CB71639252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerDelegateBridge.mm; sourceTree = ""; }; - 2CB7163E252F731E0026E2BB /* MTRDeviceControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerDelegate.h; sourceTree = ""; }; + 2CB71638252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDevicePairingDelegateBridge.h; sourceTree = ""; }; + 2CB71639252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDevicePairingDelegateBridge.mm; sourceTree = ""; }; + 2CB7163E252F731E0026E2BB /* MTRDevicePairingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDevicePairingDelegate.h; sourceTree = ""; }; 2FD775542695557E00FF4B12 /* error-mapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "error-mapping.cpp"; path = "../../../app/util/error-mapping.cpp"; sourceTree = ""; }; 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRCSRInfo.h; sourceTree = ""; }; 3CF134A8289D8D800017A19E /* MTRCSRInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRCSRInfo.m; sourceTree = ""; }; @@ -182,9 +183,9 @@ 511913FA28C100EF009235E9 /* MTRBaseSubscriptionCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRBaseSubscriptionCallback.h; sourceTree = ""; }; 5129BCFC26A9EE3300122DDF /* MTRError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRError.h; sourceTree = ""; }; 5136660F28067D540025EDAE /* MTRDeviceController_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceController_Internal.h; sourceTree = ""; }; - 5136661028067D540025EDAE /* MTRDeviceControllerFactory.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerFactory.mm; sourceTree = ""; }; - 5136661128067D540025EDAE /* MTRDeviceControllerFactory_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerFactory_Internal.h; sourceTree = ""; }; - 5136661228067D550025EDAE /* MTRDeviceControllerFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerFactory.h; sourceTree = ""; }; + 5136661028067D540025EDAE /* MTRControllerFactory.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRControllerFactory.mm; sourceTree = ""; }; + 5136661128067D540025EDAE /* MTRControllerFactory_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRControllerFactory_Internal.h; sourceTree = ""; }; + 5136661228067D550025EDAE /* MTRControllerFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRControllerFactory.h; sourceTree = ""; }; 513DDB852761F69300DAA01A /* MTRAttributeTLVValueDecoder_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRAttributeTLVValueDecoder_Internal.h; sourceTree = ""; }; 513DDB892761F6F900DAA01A /* MTRAttributeTLVValueDecoder.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MTRAttributeTLVValueDecoder.mm; path = "zap-generated/MTRAttributeTLVValueDecoder.mm"; sourceTree = ""; }; 51431AF827D2973E008A7943 /* MTRIMDispatch.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRIMDispatch.mm; sourceTree = ""; }; @@ -206,7 +207,7 @@ 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStartupParams.h; sourceTree = ""; }; 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStartupParams_Internal.h; sourceTree = ""; }; 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerStartupParams.mm; sourceTree = ""; }; - 5A60370727EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MTRClusterStateCacheContainer+XPC.h"; sourceTree = ""; }; + 5A60370727EA1FF60020DB79 /* MTRAttributeCacheContainer+XPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MTRAttributeCacheContainer+XPC.h"; sourceTree = ""; }; 5A6FEC8B27B5609C00F25F42 /* MTRDeviceOverXPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceOverXPC.h; sourceTree = ""; }; 5A6FEC8D27B5624E00F25F42 /* MTRDeviceControllerOverXPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerOverXPC.h; sourceTree = ""; }; 5A6FEC8F27B563D900F25F42 /* MTRDeviceControllerOverXPC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRDeviceControllerOverXPC.m; sourceTree = ""; }; @@ -218,9 +219,9 @@ 5A7947E227C0101200434CF2 /* MTRDeviceController+XPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MTRDeviceController+XPC.h"; sourceTree = ""; }; 5A7947E327C0129500434CF2 /* MTRDeviceController+XPC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "MTRDeviceController+XPC.m"; sourceTree = ""; }; 5A830D6B27CFCF590053B85D /* MTRDeviceControllerOverXPC_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerOverXPC_Internal.h; sourceTree = ""; }; - 5ACDDD7927CD129700EFD68A /* MTRClusterStateCacheContainer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRClusterStateCacheContainer.h; sourceTree = ""; }; - 5ACDDD7B27CD14AF00EFD68A /* MTRClusterStateCacheContainer_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRClusterStateCacheContainer_Internal.h; sourceTree = ""; }; - 5ACDDD7C27CD16D200EFD68A /* MTRClusterStateCacheContainer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRClusterStateCacheContainer.mm; sourceTree = ""; }; + 5ACDDD7927CD129700EFD68A /* MTRAttributeCacheContainer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRAttributeCacheContainer.h; sourceTree = ""; }; + 5ACDDD7B27CD14AF00EFD68A /* MTRAttributeCacheContainer_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRAttributeCacheContainer_Internal.h; sourceTree = ""; }; + 5ACDDD7C27CD16D200EFD68A /* MTRAttributeCacheContainer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRAttributeCacheContainer.mm; sourceTree = ""; }; 5AE6D4E327A99041001F2493 /* MTRDeviceTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRDeviceTests.m; sourceTree = ""; }; 7534F12628BFF20300390851 /* MTRDeviceAttestationDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceAttestationDelegate.mm; sourceTree = ""; }; 7534F12728BFF20300390851 /* MTRDeviceAttestationDelegate_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceAttestationDelegate_Internal.h; sourceTree = ""; }; @@ -236,6 +237,7 @@ 7596A84E2877E6A9004DAE0E /* MTRCluster_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRCluster_internal.h; sourceTree = ""; }; 7596A8502878709F004DAE0E /* MTRAsyncCallbackQueueTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRAsyncCallbackQueueTests.m; sourceTree = ""; }; 7596A85228788557004DAE0E /* MTRClusters.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MTRClusters.mm; path = "zap-generated/MTRClusters.mm"; sourceTree = ""; }; + 7596A85328788557004DAE0E /* MTRClustersObjc_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MTRClustersObjc_internal.h; path = "zap-generated/MTRClustersObjc_internal.h"; sourceTree = ""; }; 7596A85428788557004DAE0E /* MTRClusters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MTRClusters.h; path = "zap-generated/MTRClusters.h"; sourceTree = ""; }; 88EBF8CB27FABDD500686BC1 /* MTRDeviceAttestationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceAttestationDelegate.h; sourceTree = ""; }; 88EBF8CC27FABDD500686BC1 /* MTRDeviceAttestationDelegateBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceAttestationDelegateBridge.mm; sourceTree = ""; }; @@ -327,6 +329,7 @@ 7596A83D28751220004DAE0E /* MTRBaseClusters_internal.h */, 7596A85428788557004DAE0E /* MTRClusters.h */, 7596A85228788557004DAE0E /* MTRClusters.mm */, + 7596A85328788557004DAE0E /* MTRClustersObjc_internal.h */, D4772A45285AE98300383630 /* MTRClusterConstants.h */, ); name = CHIPGeneratedFiles; @@ -355,8 +358,8 @@ B202528F2459E34F00F97062 /* CHIP */ = { isa = PBXGroup; children = ( - 1EDCE543289049A100E41EC9 /* MTROTAHeader.h */, - 1EDCE544289049A100E41EC9 /* MTROTAHeader.mm */, + 1EDCE543289049A100E41EC9 /* MTROTAHeaderParser.h */, + 1EDCE544289049A100E41EC9 /* MTROTAHeaderParser.mm */, 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */, 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */, 88EBF8CB27FABDD500686BC1 /* MTRDeviceAttestationDelegate.h */, @@ -387,20 +390,20 @@ 7596A84C287782E8004DAE0E /* MTRAsyncCallbackWorkQueue_Internal.h */, 7596A84628762783004DAE0E /* MTRAsyncCallbackWorkQueue.h */, 7596A84728762783004DAE0E /* MTRAsyncCallbackWorkQueue.mm */, - 2C8C8FBE253E0C2100797F05 /* MTRStorage.h */, - 5ACDDD7927CD129700EFD68A /* MTRClusterStateCacheContainer.h */, - 5A60370727EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h */, - 5ACDDD7B27CD14AF00EFD68A /* MTRClusterStateCacheContainer_Internal.h */, - 5ACDDD7C27CD16D200EFD68A /* MTRClusterStateCacheContainer.mm */, + 2C8C8FBE253E0C2100797F05 /* MTRPersistentStorageDelegate.h */, + 5ACDDD7927CD129700EFD68A /* MTRAttributeCacheContainer.h */, + 5A60370727EA1FF60020DB79 /* MTRAttributeCacheContainer+XPC.h */, + 5ACDDD7B27CD14AF00EFD68A /* MTRAttributeCacheContainer_Internal.h */, + 5ACDDD7C27CD16D200EFD68A /* MTRAttributeCacheContainer.mm */, 997DED152695343400975E97 /* MTRThreadOperationalDataset.mm */, 997DED172695344800975E97 /* MTRThreadOperationalDataset.h */, 2C8C8FBD253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h */, 2C8C8FBF253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm */, 99D466E02798936D0089A18F /* MTRCommissioningParameters.h */, 99AECC7F2798A57E00B6355B /* MTRCommissioningParameters.m */, - 2CB7163E252F731E0026E2BB /* MTRDeviceControllerDelegate.h */, - 2CB71638252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h */, - 2CB71639252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.mm */, + 2CB7163E252F731E0026E2BB /* MTRDevicePairingDelegate.h */, + 2CB71638252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.h */, + 2CB71639252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.mm */, AF1CB86D2874B03B00865A96 /* MTROTAProviderDelegate.h */, AF1CB86F2874B04C00865A96 /* MTROTAProviderDelegateBridge.h */, AF5F90FE2878D351005503FA /* MTROTAProviderDelegateBridge.mm */, @@ -421,12 +424,12 @@ 991DC0822475F45400C13860 /* MTRDeviceController.h */, 991DC0872475F47D00C13860 /* MTRDeviceController.mm */, 5136660F28067D540025EDAE /* MTRDeviceController_Internal.h */, - 5136661128067D540025EDAE /* MTRDeviceControllerFactory_Internal.h */, + 5136661128067D540025EDAE /* MTRControllerFactory_Internal.h */, 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */, 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */, 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */, - 5136661228067D550025EDAE /* MTRDeviceControllerFactory.h */, - 5136661028067D540025EDAE /* MTRDeviceControllerFactory.mm */, + 5136661228067D550025EDAE /* MTRControllerFactory.h */, + 5136661028067D540025EDAE /* MTRControllerFactory.mm */, 5A7947E227C0101200434CF2 /* MTRDeviceController+XPC.h */, 517BF3EE282B62B800A8B7DB /* MTRCertificates.h */, 517BF3EF282B62B800A8B7DB /* MTRCertificates.mm */, @@ -496,23 +499,24 @@ files = ( 517BF3F0282B62B800A8B7DB /* MTRCertificates.h in Headers */, 51E51FBF282AD37A00FC978D /* MTRDeviceControllerStartupParams.h in Headers */, - 5136661628067D550025EDAE /* MTRDeviceControllerFactory.h in Headers */, + 5136661628067D550025EDAE /* MTRControllerFactory.h in Headers */, 7596A84B287636C1004DAE0E /* MTRDevice_Internal.h in Headers */, 5A6FEC9927B5C88900F25F42 /* MTRDeviceOverXPC.h in Headers */, 51B22C222740CB1D008D5055 /* MTRCommandPayloadsObjc.h in Headers */, 51B22C1E2740CB0A008D5055 /* MTRStructsObjc.h in Headers */, - 2CB7163B252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h in Headers */, - 5ACDDD7A27CD129700EFD68A /* MTRClusterStateCacheContainer.h in Headers */, + 2CB7163B252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.h in Headers */, + 5ACDDD7A27CD129700EFD68A /* MTRAttributeCacheContainer.h in Headers */, 5A6FEC9227B5669C00F25F42 /* MTRDeviceControllerOverXPC.h in Headers */, 2C1B027B2641DB4E00780EF1 /* MTROperationalCredentialsDelegate.h in Headers */, 7596A85728788557004DAE0E /* MTRClusters.h in Headers */, 99D466E12798936D0089A18F /* MTRCommissioningParameters.h in Headers */, - 5136661528067D550025EDAE /* MTRDeviceControllerFactory_Internal.h in Headers */, + 5136661528067D550025EDAE /* MTRControllerFactory_Internal.h in Headers */, 515C1C70284F9FFB00A48F0C /* MTRMemory.h in Headers */, 7534F12928BFF20300390851 /* MTRDeviceAttestationDelegate_Internal.h in Headers */, D4772A46285AE98400383630 /* MTRClusterConstants.h in Headers */, + B289D4212639C0D300D4E314 /* MTROnboardingPayloadParser.h in Headers */, 513DDB862761F69300DAA01A /* MTRAttributeTLVValueDecoder_Internal.h in Headers */, - 2CB7163F252F731E0026E2BB /* MTRDeviceControllerDelegate.h in Headers */, + 2CB7163F252F731E0026E2BB /* MTRDevicePairingDelegate.h in Headers */, 88EBF8CE27FABDD500686BC1 /* MTRDeviceAttestationDelegate.h in Headers */, 2C222AD0255C620600E446B9 /* MTRBaseDevice.h in Headers */, 7596A84F2877E6A9004DAE0E /* MTRCluster_internal.h in Headers */, @@ -521,12 +525,10 @@ 754F3DF427FBB94B00E60580 /* MTREventTLVValueDecoder_Internal.h in Headers */, 3CF134AF289D90FF0017A19E /* MTRNOCChainIssuer.h in Headers */, 3CF134AB289D8DF70017A19E /* MTRAttestationInfo.h in Headers */, + B2E0D7B2245B0B5C003C5B48 /* MTRManualSetupPayloadParser.h in Headers */, 3CF134A7289D8ADA0017A19E /* MTRCSRInfo.h in Headers */, B2E0D7B1245B0B5C003C5B48 /* Matter.h in Headers */, 7596A84428762729004DAE0E /* MTRDevice.h in Headers */, - B2E0D7B5245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.h in Headers */, - B2E0D7B2245B0B5C003C5B48 /* MTRManualSetupPayloadParser.h in Headers */, - B289D4212639C0D300D4E314 /* MTROnboardingPayloadParser.h in Headers */, B2E0D7B8245B0B5C003C5B48 /* MTRSetupPayload.h in Headers */, 7596A84D287782EF004DAE0E /* MTRAsyncCallbackWorkQueue_Internal.h in Headers */, 7596A83E28751220004DAE0E /* MTRBaseClusters_internal.h in Headers */, @@ -535,15 +537,16 @@ 27A53C1727FBC6920053F131 /* MTRAttestationTrustStoreBridge.h in Headers */, 5A830D6C27CFCF590053B85D /* MTRDeviceControllerOverXPC_Internal.h in Headers */, 88EBF8D027FABDD500686BC1 /* MTRDeviceAttestationDelegateBridge.h in Headers */, - 5A60370827EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h in Headers */, - 5ACDDD7E27CD3F3A00EFD68A /* MTRClusterStateCacheContainer_Internal.h in Headers */, + 5A60370827EA1FF60020DB79 /* MTRAttributeCacheContainer+XPC.h in Headers */, + 5ACDDD7E27CD3F3A00EFD68A /* MTRAttributeCacheContainer_Internal.h in Headers */, 5136661328067D550025EDAE /* MTRDeviceController_Internal.h in Headers */, 998F286D26D55E10001846C6 /* MTRKeypair.h in Headers */, 1ED276E426C5832500547A89 /* MTRCluster.h in Headers */, 5A6FEC9A27B5C89300F25F42 /* MTRDeviceControllerXPCConnection.h in Headers */, 5129BCFD26A9EE3300122DDF /* MTRError.h in Headers */, - 2C8C8FC1253E0C2100797F05 /* MTRStorage.h in Headers */, + 2C8C8FC1253E0C2100797F05 /* MTRPersistentStorageDelegate.h in Headers */, AF1CB8702874B04C00865A96 /* MTROTAProviderDelegateBridge.h in Headers */, + B2E0D7B5245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.h in Headers */, 1EC4CE6425CC276600D7304F /* MTRBaseClusters.h in Headers */, 2C5EEEF6268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h in Headers */, 2C8C8FC0253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h in Headers */, @@ -552,11 +555,12 @@ 2C222ADF255C811800E446B9 /* MTRBaseDevice_Internal.h in Headers */, 511913FC28C100EF009235E9 /* MTRBaseSubscriptionCallback.h in Headers */, 51E0310027EA20D20083DC9C /* MTRControllerAccessControl.h in Headers */, + 7596A85628788557004DAE0E /* MTRClustersObjc_internal.h in Headers */, 991DC08B247704DC00C13860 /* MTRLogging.h in Headers */, 7596A84828762783004DAE0E /* MTRAsyncCallbackWorkQueue.h in Headers */, 5A7947E527C0129F00434CF2 /* MTRDeviceController+XPC.h in Headers */, B2E0D7B4245B0B5C003C5B48 /* MTRError_Internal.h in Headers */, - 1EDCE545289049A100E41EC9 /* MTROTAHeader.h in Headers */, + 1EDCE545289049A100E41EC9 /* MTROTAHeaderParser.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -682,12 +686,12 @@ files = ( 2C8C8FC2253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm in Sources */, 99AECC802798A57F00B6355B /* MTRCommissioningParameters.m in Sources */, - 2CB7163C252E8A7C0026E2BB /* MTRDeviceControllerDelegateBridge.mm in Sources */, + 2CB7163C252E8A7C0026E2BB /* MTRDevicePairingDelegateBridge.mm in Sources */, 997DED162695343400975E97 /* MTRThreadOperationalDataset.mm in Sources */, 515C1C6F284F9FFB00A48F0C /* MTRMemory.mm in Sources */, 27A53C1827FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm in Sources */, 998F287126D56940001846C6 /* MTRP256KeypairBridge.mm in Sources */, - 5136661428067D550025EDAE /* MTRDeviceControllerFactory.mm in Sources */, + 5136661428067D550025EDAE /* MTRControllerFactory.mm in Sources */, 51B22C2A2740CB47008D5055 /* MTRCommandPayloadsObjc.mm in Sources */, AF5F90FF2878D351005503FA /* MTROTAProviderDelegateBridge.mm in Sources */, 7534F12828BFF20300390851 /* MTRDeviceAttestationDelegate.mm in Sources */, @@ -698,7 +702,7 @@ 3CF134A9289D8D800017A19E /* MTRCSRInfo.m in Sources */, 991DC0892475F47D00C13860 /* MTRDeviceController.mm in Sources */, B2E0D7B7245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.mm in Sources */, - 1EDCE546289049A100E41EC9 /* MTROTAHeader.mm in Sources */, + 1EDCE546289049A100E41EC9 /* MTROTAHeaderParser.mm in Sources */, 1EC4CE5D25CC26E900D7304F /* MTRBaseClusters.mm in Sources */, 51E0310127EA20D20083DC9C /* MTRControllerAccessControl.mm in Sources */, 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */, @@ -709,7 +713,7 @@ 517BF3F1282B62B800A8B7DB /* MTRCertificates.mm in Sources */, 5A6FEC9627B5983000F25F42 /* MTRDeviceControllerXPCConnection.m in Sources */, 511913FB28C100EF009235E9 /* MTRBaseSubscriptionCallback.mm in Sources */, - 5ACDDD7D27CD16D200EFD68A /* MTRClusterStateCacheContainer.mm in Sources */, + 5ACDDD7D27CD16D200EFD68A /* MTRAttributeCacheContainer.mm in Sources */, 513DDB8A2761F6F900DAA01A /* MTRAttributeTLVValueDecoder.mm in Sources */, 2FD775552695557E00FF4B12 /* error-mapping.cpp in Sources */, 5A7947E427C0129600434CF2 /* MTRDeviceController+XPC.m in Sources */, diff --git a/third_party/zap/repo b/third_party/zap/repo index 8a3a89a5a936f4..7258c6226e9780 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit 8a3a89a5a936f4c9dfd4518eda14ebf95177a7ad +Subproject commit 7258c6226e97809d01d694e5a756077e3538f88f diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_tokens.h b/zzz_generated/all-clusters-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/all-clusters-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/gen_tokens.h b/zzz_generated/all-clusters-minimal-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/all-clusters-minimal-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/bridge-app/zap-generated/gen_tokens.h b/zzz_generated/bridge-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/bridge-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/gen_tokens.h b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_colortemperaturelight_hbUnzYVeyn/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_colortemperaturelight_hbUnzYVeyn/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_colortemperaturelight_hbUnzYVeyn/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_fan_7N2TobIlOX/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_fan_7N2TobIlOX/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_fan_7N2TobIlOX/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/contact-sensor-app/zap-generated/gen_tokens.h b/zzz_generated/contact-sensor-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/contact-sensor-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/controller-clusters/zap-generated/gen_tokens.h b/zzz_generated/controller-clusters/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/controller-clusters/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) 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 b9dd1e684a1676..8d464b8df99142 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -144,7 +144,9 @@ class IdentifyIdentify : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -153,16 +155,16 @@ class IdentifyIdentify : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster identifyWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -189,7 +191,9 @@ class IdentifyTriggerEffect : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000040) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -199,16 +203,16 @@ class IdentifyTriggerEffect : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -234,8 +238,10 @@ class ReadIdentifyIdentifyTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyTime response %@", [value description]); if (error != nil) { LogNSError("Identify IdentifyTime read Error", error); @@ -262,8 +268,10 @@ class WriteIdentifyIdentifyTime : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000003) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -271,12 +279,12 @@ class WriteIdentifyIdentifyTime : public WriteAttribute { [cluster writeAttributeIdentifyTimeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Identify IdentifyTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Identify IdentifyTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -297,15 +305,16 @@ class SubscribeAttributeIdentifyIdentifyTime : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeIdentifyTimeWithParams:params + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeIdentifyTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -335,8 +344,10 @@ class ReadIdentifyIdentifyType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeIdentifyTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeIdentifyTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyType response %@", [value description]); if (error != nil) { LogNSError("Identify IdentifyType read Error", error); @@ -360,15 +371,16 @@ class SubscribeAttributeIdentifyIdentifyType : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeIdentifyTypeWithParams:params + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeIdentifyTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -398,8 +410,10 @@ class ReadIdentifyGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Identify GeneratedCommandList read Error", error); @@ -423,15 +437,16 @@ class SubscribeAttributeIdentifyGeneratedCommandList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -461,8 +476,10 @@ class ReadIdentifyAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Identify AcceptedCommandList read Error", error); @@ -486,15 +503,16 @@ class SubscribeAttributeIdentifyAcceptedCommandList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -524,8 +542,10 @@ class ReadIdentifyAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Identify AttributeList read Error", error); @@ -549,15 +569,16 @@ class SubscribeAttributeIdentifyAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -587,8 +608,10 @@ class ReadIdentifyFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Identify FeatureMap read Error", error); @@ -612,15 +635,16 @@ class SubscribeAttributeIdentifyFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -650,8 +674,10 @@ class ReadIdentifyClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Identify ClusterRevision read Error", error); @@ -675,15 +701,16 @@ class SubscribeAttributeIdentifyClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -736,7 +763,9 @@ class GroupsAddGroup : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -748,17 +777,17 @@ class GroupsAddGroup : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -784,7 +813,9 @@ class GroupsViewGroup : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -793,17 +824,17 @@ class GroupsViewGroup : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -830,7 +861,9 @@ class GroupsGetGroupMembership : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGroupsClusterGetGroupMembershipParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -847,18 +880,18 @@ class GroupsGetGroupMembership : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getGroupMembershipWithParams:params - completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -885,7 +918,9 @@ class GroupsRemoveGroup : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -895,17 +930,17 @@ class GroupsRemoveGroup : public ClusterCommand { while (repeatCount--) { [cluster removeGroupWithParams:params - completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -930,7 +965,9 @@ class GroupsRemoveAllGroups : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGroupsClusterRemoveAllGroupsParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -938,16 +975,16 @@ class GroupsRemoveAllGroups : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster removeAllGroupsWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -973,7 +1010,9 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGroupsClusterAddGroupIfIdentifyingParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -985,16 +1024,16 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster addGroupIfIdentifyingWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1020,8 +1059,10 @@ class ReadGroupsNameSupport : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNameSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNameSupportWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.NameSupport response %@", [value description]); if (error != nil) { LogNSError("Groups NameSupport read Error", error); @@ -1045,15 +1086,16 @@ class SubscribeAttributeGroupsNameSupport : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNameSupportWithParams:params + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNameSupportWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -1083,8 +1125,10 @@ class ReadGroupsGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Groups GeneratedCommandList read Error", error); @@ -1108,15 +1152,16 @@ class SubscribeAttributeGroupsGeneratedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -1146,8 +1191,10 @@ class ReadGroupsAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Groups AcceptedCommandList read Error", error); @@ -1171,15 +1218,16 @@ class SubscribeAttributeGroupsAcceptedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -1209,8 +1257,10 @@ class ReadGroupsAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Groups AttributeList read Error", error); @@ -1234,15 +1284,16 @@ class SubscribeAttributeGroupsAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -1272,8 +1323,10 @@ class ReadGroupsFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Groups FeatureMap read Error", error); @@ -1297,15 +1350,16 @@ class SubscribeAttributeGroupsFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -1335,8 +1389,10 @@ class ReadGroupsClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Groups ClusterRevision read Error", error); @@ -1360,15 +1416,16 @@ class SubscribeAttributeGroupsClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -1434,7 +1491,9 @@ class ScenesAddScene : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRScenesClusterAddSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -1481,17 +1540,17 @@ class ScenesAddScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster addSceneWithParams:params - completion:^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -1520,7 +1579,9 @@ class ScenesViewScene : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRScenesClusterViewSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -1530,17 +1591,17 @@ class ScenesViewScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster viewSceneWithParams:params - completion:^(MTRScenesClusterViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -1567,7 +1628,9 @@ class ScenesRemoveScene : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRScenesClusterRemoveSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -1578,17 +1641,17 @@ class ScenesRemoveScene : public ClusterCommand { while (repeatCount--) { [cluster removeSceneWithParams:params - completion:^(MTRScenesClusterRemoveSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -1614,7 +1677,9 @@ class ScenesRemoveAllScenes : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRScenesClusterRemoveAllScenesParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -1623,18 +1688,18 @@ class ScenesRemoveAllScenes : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster removeAllScenesWithParams:params - completion:^(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -1661,7 +1726,9 @@ class ScenesStoreScene : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRScenesClusterStoreSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -1672,17 +1739,17 @@ class ScenesStoreScene : public ClusterCommand { while (repeatCount--) { [cluster storeSceneWithParams:params - completion:^(MTRScenesClusterStoreSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -1710,7 +1777,9 @@ class ScenesRecallScene : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRScenesClusterRecallSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -1729,16 +1798,16 @@ class ScenesRecallScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster recallSceneWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1764,7 +1833,9 @@ class ScenesGetSceneMembership : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -1773,18 +1844,18 @@ class ScenesGetSceneMembership : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getSceneMembershipWithParams:params - completion:^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -1815,7 +1886,9 @@ class ScenesEnhancedAddScene : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000040) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRScenesClusterEnhancedAddSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -1862,18 +1935,18 @@ class ScenesEnhancedAddScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enhancedAddSceneWithParams:params - completion:^(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -1902,7 +1975,9 @@ class ScenesEnhancedViewScene : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000041) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRScenesClusterEnhancedViewSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -1912,18 +1987,18 @@ class ScenesEnhancedViewScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enhancedViewSceneWithParams:params - completion:^(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -1953,7 +2028,9 @@ class ScenesCopyScene : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000042) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRScenesClusterCopySceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -1966,17 +2043,17 @@ class ScenesCopyScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster copySceneWithParams:params - completion:^(MTRScenesClusterCopySceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -2002,8 +2079,10 @@ class ReadScenesSceneCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSceneCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSceneCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneCount response %@", [value description]); if (error != nil) { LogNSError("Scenes SceneCount read Error", error); @@ -2027,15 +2106,16 @@ class SubscribeAttributeScenesSceneCount : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSceneCountWithParams:params + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSceneCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2065,8 +2145,10 @@ class ReadScenesCurrentScene : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentSceneWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentSceneWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentScene response %@", [value description]); if (error != nil) { LogNSError("Scenes CurrentScene read Error", error); @@ -2090,15 +2172,16 @@ class SubscribeAttributeScenesCurrentScene : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentSceneWithParams:params + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentSceneWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2128,8 +2211,10 @@ class ReadScenesCurrentGroup : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentGroupWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentGroupWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentGroup response %@", [value description]); if (error != nil) { LogNSError("Scenes CurrentGroup read Error", error); @@ -2153,15 +2238,16 @@ class SubscribeAttributeScenesCurrentGroup : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentGroupWithParams:params + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentGroupWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2191,8 +2277,10 @@ class ReadScenesSceneValid : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSceneValidWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSceneValidWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneValid response %@", [value description]); if (error != nil) { LogNSError("Scenes SceneValid read Error", error); @@ -2216,15 +2304,16 @@ class SubscribeAttributeScenesSceneValid : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSceneValidWithParams:params + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSceneValidWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2254,8 +2343,10 @@ class ReadScenesNameSupport : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNameSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNameSupportWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.NameSupport response %@", [value description]); if (error != nil) { LogNSError("Scenes NameSupport read Error", error); @@ -2279,15 +2370,16 @@ class SubscribeAttributeScenesNameSupport : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNameSupportWithParams:params + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNameSupportWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2317,8 +2409,10 @@ class ReadScenesLastConfiguredBy : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastConfiguredByWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLastConfiguredByWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.LastConfiguredBy response %@", [value description]); if (error != nil) { LogNSError("Scenes LastConfiguredBy read Error", error); @@ -2342,15 +2436,16 @@ class SubscribeAttributeScenesLastConfiguredBy : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLastConfiguredByWithParams:params + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLastConfiguredByWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2380,8 +2475,10 @@ class ReadScenesGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Scenes GeneratedCommandList read Error", error); @@ -2405,15 +2502,16 @@ class SubscribeAttributeScenesGeneratedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2443,8 +2541,10 @@ class ReadScenesAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Scenes AcceptedCommandList read Error", error); @@ -2468,15 +2568,16 @@ class SubscribeAttributeScenesAcceptedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2506,8 +2607,10 @@ class ReadScenesAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Scenes AttributeList read Error", error); @@ -2531,15 +2634,16 @@ class SubscribeAttributeScenesAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2569,8 +2673,10 @@ class ReadScenesFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Scenes FeatureMap read Error", error); @@ -2594,15 +2700,16 @@ class SubscribeAttributeScenesFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2632,8 +2739,10 @@ class ReadScenesClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Scenes ClusterRevision read Error", error); @@ -2657,15 +2766,16 @@ class SubscribeAttributeScenesClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -2720,7 +2830,7 @@ class OnOffOff : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROnOffClusterOffParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -2728,16 +2838,16 @@ class OnOffOff : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster offWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2761,7 +2871,7 @@ class OnOffOn : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROnOffClusterOnParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -2769,16 +2879,16 @@ class OnOffOn : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster onWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2802,7 +2912,7 @@ class OnOffToggle : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROnOffClusterToggleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -2810,16 +2920,16 @@ class OnOffToggle : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster toggleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2845,7 +2955,7 @@ class OnOffOffWithEffect : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000040) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROnOffClusterOffWithEffectParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -2855,16 +2965,16 @@ class OnOffOffWithEffect : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster offWithEffectWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2889,7 +2999,7 @@ class OnOffOnWithRecallGlobalScene : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000041) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -2897,16 +3007,16 @@ class OnOffOnWithRecallGlobalScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster onWithRecallGlobalSceneWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2933,7 +3043,7 @@ class OnOffOnWithTimedOff : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000042) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROnOffClusterOnWithTimedOffParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -2944,16 +3054,16 @@ class OnOffOnWithTimedOff : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster onWithTimedOffWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2979,8 +3089,8 @@ class ReadOnOffOnOff : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnOff response %@", [value description]); if (error != nil) { LogNSError("OnOff OnOff read Error", error); @@ -3004,15 +3114,14 @@ class SubscribeAttributeOnOffOnOff : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOnOffWithParams:params + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOnOffWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3042,8 +3151,8 @@ class ReadOnOffGlobalSceneControl : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGlobalSceneControlWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGlobalSceneControlWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GlobalSceneControl response %@", [value description]); if (error != nil) { LogNSError("OnOff GlobalSceneControl read Error", error); @@ -3067,15 +3176,14 @@ class SubscribeAttributeOnOffGlobalSceneControl : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGlobalSceneControlWithParams:params + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGlobalSceneControlWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3105,8 +3213,8 @@ class ReadOnOffOnTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x00004001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnTime response %@", [value description]); if (error != nil) { LogNSError("OnOff OnTime read Error", error); @@ -3133,8 +3241,8 @@ class WriteOnOffOnTime : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) WriteAttribute (0x00004001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -3142,12 +3250,12 @@ class WriteOnOffOnTime : public WriteAttribute { [cluster writeAttributeOnTimeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOff OnTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OnOff OnTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -3168,15 +3276,14 @@ class SubscribeAttributeOnOffOnTime : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x00004001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOnTimeWithParams:params + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOnTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3206,8 +3313,8 @@ class ReadOnOffOffWaitTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x00004002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOffWaitTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OffWaitTime response %@", [value description]); if (error != nil) { LogNSError("OnOff OffWaitTime read Error", error); @@ -3234,8 +3341,8 @@ class WriteOnOffOffWaitTime : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) WriteAttribute (0x00004002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -3243,12 +3350,12 @@ class WriteOnOffOffWaitTime : public WriteAttribute { [cluster writeAttributeOffWaitTimeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOff OffWaitTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OnOff OffWaitTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -3269,15 +3376,14 @@ class SubscribeAttributeOnOffOffWaitTime : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x00004002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOffWaitTimeWithParams:params + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOffWaitTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3307,8 +3413,8 @@ class ReadOnOffStartUpOnOff : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x00004003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeStartUpOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.StartUpOnOff response %@", [value description]); if (error != nil) { LogNSError("OnOff StartUpOnOff read Error", error); @@ -3335,8 +3441,8 @@ class WriteOnOffStartUpOnOff : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) WriteAttribute (0x00004003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -3344,12 +3450,12 @@ class WriteOnOffStartUpOnOff : public WriteAttribute { [cluster writeAttributeStartUpOnOffWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOff StartUpOnOff write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OnOff StartUpOnOff write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -3370,15 +3476,14 @@ class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x00004003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStartUpOnOffWithParams:params + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStartUpOnOffWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3408,8 +3513,8 @@ class ReadOnOffGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("OnOff GeneratedCommandList read Error", error); @@ -3433,15 +3538,14 @@ class SubscribeAttributeOnOffGeneratedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3471,8 +3575,8 @@ class ReadOnOffAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("OnOff AcceptedCommandList read Error", error); @@ -3496,15 +3600,14 @@ class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3534,8 +3637,8 @@ class ReadOnOffAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AttributeList response %@", [value description]); if (error != nil) { LogNSError("OnOff AttributeList read Error", error); @@ -3559,15 +3662,14 @@ class SubscribeAttributeOnOffAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3597,8 +3699,8 @@ class ReadOnOffFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("OnOff FeatureMap read Error", error); @@ -3622,15 +3724,14 @@ class SubscribeAttributeOnOffFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3660,8 +3761,8 @@ class ReadOnOffClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("OnOff ClusterRevision read Error", error); @@ -3685,15 +3786,14 @@ class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3740,10 +3840,9 @@ class ReadOnOffSwitchConfigurationSwitchType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSwitchTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeSwitchTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration SwitchType read Error", error); @@ -3767,17 +3866,15 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchType : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSwitchTypeWithParams:params + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSwitchTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3807,10 +3904,9 @@ class ReadOnOffSwitchConfigurationSwitchActions : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSwitchActionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeSwitchActionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration SwitchActions read Error", error); @@ -3837,10 +3933,9 @@ class WriteOnOffSwitchConfigurationSwitchActions : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000007) WriteAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -3848,12 +3943,12 @@ class WriteOnOffSwitchConfigurationSwitchActions : public WriteAttribute { [cluster writeAttributeSwitchActionsWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOffSwitchConfiguration SwitchActions write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OnOffSwitchConfiguration SwitchActions write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -3874,17 +3969,15 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchActions : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSwitchActionsWithParams:params + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSwitchActionsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3914,10 +4007,9 @@ class ReadOnOffSwitchConfigurationGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration GeneratedCommandList read Error", error); @@ -3941,17 +4033,15 @@ class SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList : public Su { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -3981,10 +4071,9 @@ class ReadOnOffSwitchConfigurationAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration AcceptedCommandList read Error", error); @@ -4008,17 +4097,15 @@ class SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4048,10 +4135,9 @@ class ReadOnOffSwitchConfigurationAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration AttributeList read Error", error); @@ -4075,17 +4161,15 @@ class SubscribeAttributeOnOffSwitchConfigurationAttributeList : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4115,10 +4199,9 @@ class ReadOnOffSwitchConfigurationFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration FeatureMap read Error", error); @@ -4142,17 +4225,15 @@ class SubscribeAttributeOnOffSwitchConfigurationFeatureMap : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4182,10 +4263,9 @@ class ReadOnOffSwitchConfigurationClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration ClusterRevision read Error", error); @@ -4209,17 +4289,15 @@ class SubscribeAttributeOnOffSwitchConfigurationClusterRevision : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterOnOffSwitchConfiguration * cluster = + [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4290,9 +4368,9 @@ class LevelControlMoveToLevel : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -4308,16 +4386,16 @@ class LevelControlMoveToLevel : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4346,9 +4424,9 @@ class LevelControlMove : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -4364,16 +4442,16 @@ class LevelControlMove : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4403,9 +4481,9 @@ class LevelControlStep : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRLevelControlClusterStepParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -4422,16 +4500,16 @@ class LevelControlStep : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stepWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4458,9 +4536,9 @@ class LevelControlStop : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRLevelControlClusterStopParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -4470,16 +4548,16 @@ class LevelControlStop : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4508,9 +4586,9 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -4526,16 +4604,16 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToLevelWithOnOffWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4564,9 +4642,9 @@ class LevelControlMoveWithOnOff : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -4582,16 +4660,16 @@ class LevelControlMoveWithOnOff : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveWithOnOffWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4621,9 +4699,9 @@ class LevelControlStepWithOnOff : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -4640,16 +4718,16 @@ class LevelControlStepWithOnOff : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stepWithOnOffWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4676,9 +4754,9 @@ class LevelControlStopWithOnOff : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -4688,16 +4766,16 @@ class LevelControlStopWithOnOff : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopWithOnOffWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4723,9 +4801,9 @@ class LevelControlMoveToClosestFrequency : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -4734,16 +4812,16 @@ class LevelControlMoveToClosestFrequency : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToClosestFrequencyWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4769,10 +4847,10 @@ class ReadLevelControlCurrentLevel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentLevel response %@", [value description]); if (error != nil) { LogNSError("LevelControl CurrentLevel read Error", error); @@ -4796,17 +4874,16 @@ class SubscribeAttributeLevelControlCurrentLevel : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentLevelWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4836,10 +4913,10 @@ class ReadLevelControlRemainingTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.RemainingTime response %@", [value description]); if (error != nil) { LogNSError("LevelControl RemainingTime read Error", error); @@ -4863,17 +4940,16 @@ class SubscribeAttributeLevelControlRemainingTime : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRemainingTimeWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRemainingTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4903,10 +4979,10 @@ class ReadLevelControlMinLevel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinLevel response %@", [value description]); if (error != nil) { LogNSError("LevelControl MinLevel read Error", error); @@ -4930,17 +5006,16 @@ class SubscribeAttributeLevelControlMinLevel : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinLevelWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -4970,10 +5045,10 @@ class ReadLevelControlMaxLevel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxLevel response %@", [value description]); if (error != nil) { LogNSError("LevelControl MaxLevel read Error", error); @@ -4997,17 +5072,16 @@ class SubscribeAttributeLevelControlMaxLevel : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxLevelWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5037,10 +5111,10 @@ class ReadLevelControlCurrentFrequency : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentFrequency response %@", [value description]); if (error != nil) { LogNSError("LevelControl CurrentFrequency read Error", error); @@ -5064,17 +5138,16 @@ class SubscribeAttributeLevelControlCurrentFrequency : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentFrequencyWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentFrequencyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5104,10 +5177,10 @@ class ReadLevelControlMinFrequency : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMinFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinFrequency response %@", [value description]); if (error != nil) { LogNSError("LevelControl MinFrequency read Error", error); @@ -5131,17 +5204,16 @@ class SubscribeAttributeLevelControlMinFrequency : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinFrequencyWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinFrequencyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5171,10 +5243,10 @@ class ReadLevelControlMaxFrequency : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxFrequency response %@", [value description]); if (error != nil) { LogNSError("LevelControl MaxFrequency read Error", error); @@ -5198,17 +5270,16 @@ class SubscribeAttributeLevelControlMaxFrequency : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxFrequencyWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxFrequencyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5238,10 +5309,10 @@ class ReadLevelControlOptions : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.Options response %@", [value description]); if (error != nil) { LogNSError("LevelControl Options read Error", error); @@ -5268,10 +5339,10 @@ class WriteLevelControlOptions : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -5279,12 +5350,12 @@ class WriteLevelControlOptions : public WriteAttribute { [cluster writeAttributeOptionsWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl Options write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl Options write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -5305,17 +5376,16 @@ class SubscribeAttributeLevelControlOptions : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOptionsWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOptionsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5345,10 +5415,10 @@ class ReadLevelControlOnOffTransitionTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnOffTransitionTime response %@", [value description]); if (error != nil) { LogNSError("LevelControl OnOffTransitionTime read Error", error); @@ -5375,10 +5445,10 @@ class WriteLevelControlOnOffTransitionTime : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -5386,12 +5456,12 @@ class WriteLevelControlOnOffTransitionTime : public WriteAttribute { [cluster writeAttributeOnOffTransitionTimeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl OnOffTransitionTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl OnOffTransitionTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -5412,17 +5482,16 @@ class SubscribeAttributeLevelControlOnOffTransitionTime : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOnOffTransitionTimeWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOnOffTransitionTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5452,10 +5521,10 @@ class ReadLevelControlOnLevel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnLevel response %@", [value description]); if (error != nil) { LogNSError("LevelControl OnLevel read Error", error); @@ -5482,10 +5551,10 @@ class WriteLevelControlOnLevel : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -5493,12 +5562,12 @@ class WriteLevelControlOnLevel : public WriteAttribute { [cluster writeAttributeOnLevelWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl OnLevel write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl OnLevel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -5519,17 +5588,16 @@ class SubscribeAttributeLevelControlOnLevel : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOnLevelWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOnLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5559,10 +5627,10 @@ class ReadLevelControlOnTransitionTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnTransitionTime response %@", [value description]); if (error != nil) { LogNSError("LevelControl OnTransitionTime read Error", error); @@ -5589,10 +5657,10 @@ class WriteLevelControlOnTransitionTime : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -5600,12 +5668,12 @@ class WriteLevelControlOnTransitionTime : public WriteAttribute { [cluster writeAttributeOnTransitionTimeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl OnTransitionTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl OnTransitionTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -5626,17 +5694,16 @@ class SubscribeAttributeLevelControlOnTransitionTime : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOnTransitionTimeWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOnTransitionTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5666,10 +5733,10 @@ class ReadLevelControlOffTransitionTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OffTransitionTime response %@", [value description]); if (error != nil) { LogNSError("LevelControl OffTransitionTime read Error", error); @@ -5696,10 +5763,10 @@ class WriteLevelControlOffTransitionTime : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -5707,12 +5774,12 @@ class WriteLevelControlOffTransitionTime : public WriteAttribute { [cluster writeAttributeOffTransitionTimeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl OffTransitionTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl OffTransitionTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -5733,17 +5800,16 @@ class SubscribeAttributeLevelControlOffTransitionTime : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOffTransitionTimeWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOffTransitionTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5773,10 +5839,10 @@ class ReadLevelControlDefaultMoveRate : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.DefaultMoveRate response %@", [value description]); if (error != nil) { LogNSError("LevelControl DefaultMoveRate read Error", error); @@ -5803,10 +5869,10 @@ class WriteLevelControlDefaultMoveRate : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -5814,12 +5880,12 @@ class WriteLevelControlDefaultMoveRate : public WriteAttribute { [cluster writeAttributeDefaultMoveRateWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl DefaultMoveRate write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl DefaultMoveRate write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -5840,17 +5906,16 @@ class SubscribeAttributeLevelControlDefaultMoveRate : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDefaultMoveRateWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDefaultMoveRateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5880,10 +5945,10 @@ class ReadLevelControlStartUpCurrentLevel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.StartUpCurrentLevel response %@", [value description]); if (error != nil) { LogNSError("LevelControl StartUpCurrentLevel read Error", error); @@ -5910,10 +5975,10 @@ class WriteLevelControlStartUpCurrentLevel : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -5921,12 +5986,12 @@ class WriteLevelControlStartUpCurrentLevel : public WriteAttribute { [cluster writeAttributeStartUpCurrentLevelWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl StartUpCurrentLevel write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl StartUpCurrentLevel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -5947,17 +6012,16 @@ class SubscribeAttributeLevelControlStartUpCurrentLevel : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStartUpCurrentLevelWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStartUpCurrentLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -5987,10 +6051,10 @@ class ReadLevelControlGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("LevelControl GeneratedCommandList read Error", error); @@ -6014,17 +6078,16 @@ class SubscribeAttributeLevelControlGeneratedCommandList : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6054,10 +6117,10 @@ class ReadLevelControlAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("LevelControl AcceptedCommandList read Error", error); @@ -6081,17 +6144,16 @@ class SubscribeAttributeLevelControlAcceptedCommandList : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6121,10 +6183,10 @@ class ReadLevelControlAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AttributeList response %@", [value description]); if (error != nil) { LogNSError("LevelControl AttributeList read Error", error); @@ -6148,17 +6210,16 @@ class SubscribeAttributeLevelControlAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6188,10 +6249,10 @@ class ReadLevelControlFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("LevelControl FeatureMap read Error", error); @@ -6215,17 +6276,16 @@ class SubscribeAttributeLevelControlFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6255,10 +6315,10 @@ class ReadLevelControlClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("LevelControl ClusterRevision read Error", error); @@ -6282,17 +6342,16 @@ class SubscribeAttributeLevelControlClusterRevision : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6346,10 +6405,10 @@ class ReadBinaryInputBasicActiveText : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActiveTextWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ActiveText response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic ActiveText read Error", error); @@ -6376,10 +6435,10 @@ class WriteBinaryInputBasicActiveText : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) WriteAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -6389,12 +6448,12 @@ class WriteBinaryInputBasicActiveText : public WriteAttribute { [cluster writeAttributeActiveTextWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic ActiveText write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BinaryInputBasic ActiveText write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -6415,17 +6474,16 @@ class SubscribeAttributeBinaryInputBasicActiveText : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveTextWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveTextWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6455,10 +6513,10 @@ class ReadBinaryInputBasicDescription : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Description response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic Description read Error", error); @@ -6485,10 +6543,10 @@ class WriteBinaryInputBasicDescription : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) WriteAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -6498,12 +6556,12 @@ class WriteBinaryInputBasicDescription : public WriteAttribute { [cluster writeAttributeDescriptionWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic Description write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BinaryInputBasic Description write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -6524,17 +6582,16 @@ class SubscribeAttributeBinaryInputBasicDescription : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDescriptionWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDescriptionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6564,10 +6621,10 @@ class ReadBinaryInputBasicInactiveText : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000002E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInactiveTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInactiveTextWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.InactiveText response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic InactiveText read Error", error); @@ -6594,10 +6651,10 @@ class WriteBinaryInputBasicInactiveText : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) WriteAttribute (0x0000002E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -6607,12 +6664,12 @@ class WriteBinaryInputBasicInactiveText : public WriteAttribute { [cluster writeAttributeInactiveTextWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic InactiveText write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BinaryInputBasic InactiveText write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -6633,17 +6690,16 @@ class SubscribeAttributeBinaryInputBasicInactiveText : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000002E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInactiveTextWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInactiveTextWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6673,10 +6729,10 @@ class ReadBinaryInputBasicOutOfService : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x00000051) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOutOfServiceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOutOfServiceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.OutOfService response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic OutOfService read Error", error); @@ -6703,10 +6759,10 @@ class WriteBinaryInputBasicOutOfService : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) WriteAttribute (0x00000051) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -6714,12 +6770,12 @@ class WriteBinaryInputBasicOutOfService : public WriteAttribute { [cluster writeAttributeOutOfServiceWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic OutOfService write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BinaryInputBasic OutOfService write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -6740,17 +6796,16 @@ class SubscribeAttributeBinaryInputBasicOutOfService : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x00000051) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOutOfServiceWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOutOfServiceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6780,10 +6835,10 @@ class ReadBinaryInputBasicPolarity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x00000054) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePolarityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePolarityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Polarity response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic Polarity read Error", error); @@ -6807,17 +6862,16 @@ class SubscribeAttributeBinaryInputBasicPolarity : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x00000054) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePolarityWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePolarityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6847,10 +6901,10 @@ class ReadBinaryInputBasicPresentValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x00000055) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePresentValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePresentValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.PresentValue response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic PresentValue read Error", error); @@ -6877,10 +6931,10 @@ class WriteBinaryInputBasicPresentValue : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) WriteAttribute (0x00000055) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -6888,12 +6942,12 @@ class WriteBinaryInputBasicPresentValue : public WriteAttribute { [cluster writeAttributePresentValueWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic PresentValue write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BinaryInputBasic PresentValue write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -6914,17 +6968,16 @@ class SubscribeAttributeBinaryInputBasicPresentValue : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x00000055) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePresentValueWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePresentValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -6954,10 +7007,10 @@ class ReadBinaryInputBasicReliability : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x00000067) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeReliabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeReliabilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Reliability response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic Reliability read Error", error); @@ -6984,10 +7037,10 @@ class WriteBinaryInputBasicReliability : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) WriteAttribute (0x00000067) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -6995,12 +7048,12 @@ class WriteBinaryInputBasicReliability : public WriteAttribute { [cluster writeAttributeReliabilityWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic Reliability write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BinaryInputBasic Reliability write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -7021,17 +7074,16 @@ class SubscribeAttributeBinaryInputBasicReliability : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x00000067) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeReliabilityWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeReliabilityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7061,10 +7113,10 @@ class ReadBinaryInputBasicStatusFlags : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000006F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStatusFlagsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeStatusFlagsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.StatusFlags response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic StatusFlags read Error", error); @@ -7088,17 +7140,16 @@ class SubscribeAttributeBinaryInputBasicStatusFlags : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000006F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStatusFlagsWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStatusFlagsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7128,10 +7179,10 @@ class ReadBinaryInputBasicApplicationType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x00000100) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeApplicationTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeApplicationTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ApplicationType response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic ApplicationType read Error", error); @@ -7155,17 +7206,16 @@ class SubscribeAttributeBinaryInputBasicApplicationType : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x00000100) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeApplicationTypeWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeApplicationTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7195,10 +7245,10 @@ class ReadBinaryInputBasicGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic GeneratedCommandList read Error", error); @@ -7222,17 +7272,16 @@ class SubscribeAttributeBinaryInputBasicGeneratedCommandList : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7262,10 +7311,10 @@ class ReadBinaryInputBasicAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic AcceptedCommandList read Error", error); @@ -7289,17 +7338,16 @@ class SubscribeAttributeBinaryInputBasicAcceptedCommandList : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7329,10 +7377,10 @@ class ReadBinaryInputBasicAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AttributeList response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic AttributeList read Error", error); @@ -7356,17 +7404,16 @@ class SubscribeAttributeBinaryInputBasicAttributeList : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7396,10 +7443,10 @@ class ReadBinaryInputBasicFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic FeatureMap read Error", error); @@ -7423,17 +7470,16 @@ class SubscribeAttributeBinaryInputBasicFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7463,10 +7509,10 @@ class ReadBinaryInputBasicClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic ClusterRevision read Error", error); @@ -7490,17 +7536,16 @@ class SubscribeAttributeBinaryInputBasicClusterRevision : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7549,8 +7594,10 @@ class ReadDescriptorDeviceTypeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDeviceTypeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDeviceListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.DeviceTypeList response %@", [value description]); if (error != nil) { LogNSError("Descriptor DeviceTypeList read Error", error); @@ -7574,15 +7621,16 @@ class SubscribeAttributeDescriptorDeviceTypeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDeviceTypeListWithParams:params + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDeviceListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7612,8 +7660,10 @@ class ReadDescriptorServerList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeServerListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ServerList response %@", [value description]); if (error != nil) { LogNSError("Descriptor ServerList read Error", error); @@ -7637,15 +7687,16 @@ class SubscribeAttributeDescriptorServerList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeServerListWithParams:params + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeServerListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7675,8 +7726,10 @@ class ReadDescriptorClientList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClientListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClientListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClientList response %@", [value description]); if (error != nil) { LogNSError("Descriptor ClientList read Error", error); @@ -7700,15 +7753,16 @@ class SubscribeAttributeDescriptorClientList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClientListWithParams:params + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClientListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7738,8 +7792,10 @@ class ReadDescriptorPartsList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePartsListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.PartsList response %@", [value description]); if (error != nil) { LogNSError("Descriptor PartsList read Error", error); @@ -7763,15 +7819,16 @@ class SubscribeAttributeDescriptorPartsList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePartsListWithParams:params + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePartsListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7801,8 +7858,10 @@ class ReadDescriptorGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Descriptor GeneratedCommandList read Error", error); @@ -7826,15 +7885,16 @@ class SubscribeAttributeDescriptorGeneratedCommandList : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7864,8 +7924,10 @@ class ReadDescriptorAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Descriptor AcceptedCommandList read Error", error); @@ -7889,15 +7951,16 @@ class SubscribeAttributeDescriptorAcceptedCommandList : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7927,8 +7990,10 @@ class ReadDescriptorAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Descriptor AttributeList read Error", error); @@ -7952,15 +8017,16 @@ class SubscribeAttributeDescriptorAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -7990,8 +8056,10 @@ class ReadDescriptorFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Descriptor FeatureMap read Error", error); @@ -8015,15 +8083,16 @@ class SubscribeAttributeDescriptorFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8053,8 +8122,10 @@ class ReadDescriptorClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Descriptor ClusterRevision read Error", error); @@ -8078,15 +8149,16 @@ class SubscribeAttributeDescriptorClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8132,19 +8204,19 @@ class ReadBindingBinding : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeBindingWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.Binding response %@", [value description]); - if (error != nil) { - LogNSError("Binding Binding read Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(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; } }; @@ -8166,8 +8238,10 @@ class WriteBindingBinding : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -8205,12 +8279,12 @@ class WriteBindingBinding : public WriteAttribute { [cluster writeAttributeBindingWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Binding Binding write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Binding Binding write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -8232,15 +8306,16 @@ class SubscribeAttributeBindingBinding : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBindingWithParams:params + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBindingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8270,8 +8345,10 @@ class ReadBindingGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Binding GeneratedCommandList read Error", error); @@ -8295,15 +8372,16 @@ class SubscribeAttributeBindingGeneratedCommandList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8333,8 +8411,10 @@ class ReadBindingAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Binding AcceptedCommandList read Error", error); @@ -8358,15 +8438,16 @@ class SubscribeAttributeBindingAcceptedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8396,8 +8477,10 @@ class ReadBindingAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Binding AttributeList read Error", error); @@ -8421,15 +8504,16 @@ class SubscribeAttributeBindingAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8459,8 +8543,10 @@ class ReadBindingFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Binding FeatureMap read Error", error); @@ -8484,15 +8570,16 @@ class SubscribeAttributeBindingFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8522,8 +8609,10 @@ class ReadBindingClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Binding ClusterRevision read Error", error); @@ -8547,15 +8636,16 @@ class SubscribeAttributeBindingClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8607,21 +8697,19 @@ class ReadAccessControlAcl : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.ACL response %@", [value description]); - if (error != nil) { - LogNSError("AccessControl ACL read Error", error); - } - SetCommandExitStatus(error); - }]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + 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); + }]; return CHIP_NO_ERROR; } }; @@ -8643,10 +8731,10 @@ class WriteAccessControlAcl : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -8705,14 +8793,14 @@ class WriteAccessControlAcl : public WriteAttribute { value = array_0; } - [cluster writeAttributeACLWithValue:value + [cluster writeAttributeAclWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("AccessControl ACL write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("AccessControl Acl write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -8735,22 +8823,21 @@ class SubscribeAttributeAccessControlAcl : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeACLWithParams:params + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAclWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.ACL response %@", [value description]); + NSLog(@"AccessControl.Acl response %@", [value description]); SetCommandExitStatus(error); }]; @@ -8775,21 +8862,19 @@ class ReadAccessControlExtension : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeExtensionWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.Extension response %@", [value description]); - if (error != nil) { - LogNSError("AccessControl Extension read Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(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; } }; @@ -8811,10 +8896,10 @@ class WriteAccessControlExtension : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -8833,12 +8918,12 @@ class WriteAccessControlExtension : public WriteAttribute { [cluster writeAttributeExtensionWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("AccessControl Extension write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("AccessControl Extension write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -8861,17 +8946,16 @@ class SubscribeAttributeAccessControlExtension : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeExtensionWithParams:params + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeExtensionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8901,10 +8985,11 @@ class ReadAccessControlSubjectsPerAccessControlEntry : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSubjectsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.SubjectsPerAccessControlEntry response %@", [value description]); if (error != nil) { LogNSError("AccessControl SubjectsPerAccessControlEntry read Error", error); @@ -8928,17 +9013,16 @@ class SubscribeAttributeAccessControlSubjectsPerAccessControlEntry : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSubjectsPerAccessControlEntryWithParams:params + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -8968,10 +9052,11 @@ class ReadAccessControlTargetsPerAccessControlEntry : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTargetsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeTargetsPerAccessControlEntryWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.TargetsPerAccessControlEntry response %@", [value description]); if (error != nil) { LogNSError("AccessControl TargetsPerAccessControlEntry read Error", error); @@ -8995,17 +9080,16 @@ class SubscribeAttributeAccessControlTargetsPerAccessControlEntry : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTargetsPerAccessControlEntryWithParams:params + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9035,10 +9119,11 @@ class ReadAccessControlAccessControlEntriesPerFabric : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAccessControlEntriesPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAccessControlEntriesPerFabricWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AccessControlEntriesPerFabric response %@", [value description]); if (error != nil) { LogNSError("AccessControl AccessControlEntriesPerFabric read Error", error); @@ -9062,17 +9147,16 @@ class SubscribeAttributeAccessControlAccessControlEntriesPerFabric : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAccessControlEntriesPerFabricWithParams:params + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9102,10 +9186,10 @@ class ReadAccessControlGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("AccessControl GeneratedCommandList read Error", error); @@ -9129,17 +9213,16 @@ class SubscribeAttributeAccessControlGeneratedCommandList : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9169,10 +9252,10 @@ class ReadAccessControlAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("AccessControl AcceptedCommandList read Error", error); @@ -9196,17 +9279,16 @@ class SubscribeAttributeAccessControlAcceptedCommandList : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9236,10 +9318,10 @@ class ReadAccessControlAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AttributeList response %@", [value description]); if (error != nil) { LogNSError("AccessControl AttributeList read Error", error); @@ -9263,17 +9345,16 @@ class SubscribeAttributeAccessControlAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9303,10 +9384,10 @@ class ReadAccessControlFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("AccessControl FeatureMap read Error", error); @@ -9330,17 +9411,16 @@ class SubscribeAttributeAccessControlFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9370,10 +9450,10 @@ class ReadAccessControlClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("AccessControl ClusterRevision read Error", error); @@ -9397,17 +9477,16 @@ class SubscribeAttributeAccessControlClusterRevision : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -9470,7 +9549,9 @@ class ActionsInstantAction : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRActionsClusterInstantActionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -9484,16 +9565,16 @@ class ActionsInstantAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster instantActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9521,7 +9602,9 @@ class ActionsInstantActionWithTransition : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRActionsClusterInstantActionWithTransitionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -9536,16 +9619,16 @@ class ActionsInstantActionWithTransition : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster instantActionWithTransitionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9572,7 +9655,9 @@ class ActionsStartAction : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRActionsClusterStartActionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -9586,16 +9671,16 @@ class ActionsStartAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster startActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9623,7 +9708,9 @@ class ActionsStartActionWithDuration : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRActionsClusterStartActionWithDurationParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -9638,16 +9725,16 @@ class ActionsStartActionWithDuration : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster startActionWithDurationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9674,7 +9761,9 @@ class ActionsStopAction : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRActionsClusterStopActionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -9688,16 +9777,16 @@ class ActionsStopAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9724,7 +9813,9 @@ class ActionsPauseAction : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRActionsClusterPauseActionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -9738,16 +9829,16 @@ class ActionsPauseAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster pauseActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9775,7 +9866,9 @@ class ActionsPauseActionWithDuration : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRActionsClusterPauseActionWithDurationParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -9790,16 +9883,16 @@ class ActionsPauseActionWithDuration : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster pauseActionWithDurationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9826,7 +9919,9 @@ class ActionsResumeAction : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRActionsClusterResumeActionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -9840,16 +9935,16 @@ class ActionsResumeAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster resumeActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9876,7 +9971,9 @@ class ActionsEnableAction : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRActionsClusterEnableActionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -9890,16 +9987,16 @@ class ActionsEnableAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enableActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9927,7 +10024,9 @@ class ActionsEnableActionWithDuration : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRActionsClusterEnableActionWithDurationParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -9942,16 +10041,16 @@ class ActionsEnableActionWithDuration : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enableActionWithDurationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9978,7 +10077,9 @@ class ActionsDisableAction : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRActionsClusterDisableActionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -9992,16 +10093,16 @@ class ActionsDisableAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster disableActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -10029,7 +10130,9 @@ class ActionsDisableActionWithDuration : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRActionsClusterDisableActionWithDurationParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -10044,16 +10147,16 @@ class ActionsDisableActionWithDuration : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster disableActionWithDurationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -10079,8 +10182,10 @@ class ReadActionsActionList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActionListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActionListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.ActionList response %@", [value description]); if (error != nil) { LogNSError("Actions ActionList read Error", error); @@ -10104,15 +10209,16 @@ class SubscribeAttributeActionsActionList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActionListWithParams:params + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActionListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10142,8 +10248,10 @@ class ReadActionsEndpointLists : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEndpointListsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEndpointListsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.EndpointLists response %@", [value description]); if (error != nil) { LogNSError("Actions EndpointLists read Error", error); @@ -10167,15 +10275,16 @@ class SubscribeAttributeActionsEndpointLists : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEndpointListsWithParams:params + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEndpointListsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10205,8 +10314,10 @@ class ReadActionsSetupURL : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetupURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSetupURLWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.SetupURL response %@", [value description]); if (error != nil) { LogNSError("Actions SetupURL read Error", error); @@ -10230,15 +10341,16 @@ class SubscribeAttributeActionsSetupURL : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSetupURLWithParams:params + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSetupURLWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10268,8 +10380,10 @@ class ReadActionsGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Actions GeneratedCommandList read Error", error); @@ -10293,15 +10407,16 @@ class SubscribeAttributeActionsGeneratedCommandList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10331,8 +10446,10 @@ class ReadActionsAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Actions AcceptedCommandList read Error", error); @@ -10356,15 +10473,16 @@ class SubscribeAttributeActionsAcceptedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10394,8 +10512,10 @@ class ReadActionsAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Actions AttributeList read Error", error); @@ -10419,15 +10539,16 @@ class SubscribeAttributeActionsAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10457,8 +10578,10 @@ class ReadActionsFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Actions FeatureMap read Error", error); @@ -10482,15 +10605,16 @@ class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10520,8 +10644,10 @@ class ReadActionsClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Actions ClusterRevision read Error", error); @@ -10545,15 +10671,16 @@ class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10622,7 +10749,7 @@ class BasicMfgSpecificPing : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000028) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTRBasicClusterMfgSpecificPingParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -10630,16 +10757,16 @@ class BasicMfgSpecificPing : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster mfgSpecificPingWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -10664,8 +10791,8 @@ class ReadBasicDataModelRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeDataModelRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.DataModelRevision response %@", [value description]); if (error != nil) { LogNSError("Basic DataModelRevision read Error", error); @@ -10689,15 +10816,14 @@ class SubscribeAttributeBasicDataModelRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDataModelRevisionWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDataModelRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10727,8 +10853,8 @@ class ReadBasicVendorName : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.VendorName response %@", [value description]); if (error != nil) { LogNSError("Basic VendorName read Error", error); @@ -10752,15 +10878,14 @@ class SubscribeAttributeBasicVendorName : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeVendorNameWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeVendorNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10790,8 +10915,8 @@ class ReadBasicVendorID : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.VendorID response %@", [value description]); if (error != nil) { LogNSError("Basic VendorID read Error", error); @@ -10815,15 +10940,14 @@ class SubscribeAttributeBasicVendorID : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeVendorIDWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeVendorIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10853,8 +10977,8 @@ class ReadBasicProductName : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeProductNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductName response %@", [value description]); if (error != nil) { LogNSError("Basic ProductName read Error", error); @@ -10878,15 +11002,14 @@ class SubscribeAttributeBasicProductName : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeProductNameWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeProductNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10916,8 +11039,8 @@ class ReadBasicProductID : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductID response %@", [value description]); if (error != nil) { LogNSError("Basic ProductID read Error", error); @@ -10941,15 +11064,14 @@ class SubscribeAttributeBasicProductID : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeProductIDWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeProductIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -10979,8 +11101,8 @@ class ReadBasicNodeLabel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.NodeLabel response %@", [value description]); if (error != nil) { LogNSError("Basic NodeLabel read Error", error); @@ -11007,8 +11129,8 @@ class WriteBasicNodeLabel : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -11018,12 +11140,12 @@ class WriteBasicNodeLabel : public WriteAttribute { [cluster writeAttributeNodeLabelWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Basic NodeLabel write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Basic NodeLabel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -11044,15 +11166,14 @@ class SubscribeAttributeBasicNodeLabel : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNodeLabelWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNodeLabelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11082,8 +11203,8 @@ class ReadBasicLocation : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.Location response %@", [value description]); if (error != nil) { LogNSError("Basic Location read Error", error); @@ -11110,8 +11231,8 @@ class WriteBasicLocation : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) WriteAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -11121,12 +11242,12 @@ class WriteBasicLocation : public WriteAttribute { [cluster writeAttributeLocationWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Basic Location write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Basic Location write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -11147,15 +11268,14 @@ class SubscribeAttributeBasicLocation : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLocationWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLocationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11185,8 +11305,8 @@ class ReadBasicHardwareVersion : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeHardwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.HardwareVersion response %@", [value description]); if (error != nil) { LogNSError("Basic HardwareVersion read Error", error); @@ -11210,15 +11330,14 @@ class SubscribeAttributeBasicHardwareVersion : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeHardwareVersionWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeHardwareVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11248,8 +11367,8 @@ class ReadBasicHardwareVersionString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeHardwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.HardwareVersionString response %@", [value description]); if (error != nil) { LogNSError("Basic HardwareVersionString read Error", error); @@ -11273,15 +11392,14 @@ class SubscribeAttributeBasicHardwareVersionString : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeHardwareVersionStringWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeHardwareVersionStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11311,8 +11429,8 @@ class ReadBasicSoftwareVersion : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeSoftwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.SoftwareVersion response %@", [value description]); if (error != nil) { LogNSError("Basic SoftwareVersion read Error", error); @@ -11336,15 +11454,14 @@ class SubscribeAttributeBasicSoftwareVersion : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSoftwareVersionWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSoftwareVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11374,8 +11491,8 @@ class ReadBasicSoftwareVersionString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeSoftwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.SoftwareVersionString response %@", [value description]); if (error != nil) { LogNSError("Basic SoftwareVersionString read Error", error); @@ -11399,15 +11516,14 @@ class SubscribeAttributeBasicSoftwareVersionString : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSoftwareVersionStringWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSoftwareVersionStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11437,8 +11553,8 @@ class ReadBasicManufacturingDate : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeManufacturingDateWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ManufacturingDate response %@", [value description]); if (error != nil) { LogNSError("Basic ManufacturingDate read Error", error); @@ -11462,15 +11578,14 @@ class SubscribeAttributeBasicManufacturingDate : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeManufacturingDateWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeManufacturingDateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11500,8 +11615,8 @@ class ReadBasicPartNumber : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePartNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.PartNumber response %@", [value description]); if (error != nil) { LogNSError("Basic PartNumber read Error", error); @@ -11525,15 +11640,14 @@ class SubscribeAttributeBasicPartNumber : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePartNumberWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePartNumberWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11563,8 +11677,8 @@ class ReadBasicProductURL : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeProductURLWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductURL response %@", [value description]); if (error != nil) { LogNSError("Basic ProductURL read Error", error); @@ -11588,15 +11702,14 @@ class SubscribeAttributeBasicProductURL : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeProductURLWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeProductURLWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11626,8 +11739,8 @@ class ReadBasicProductLabel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeProductLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductLabel response %@", [value description]); if (error != nil) { LogNSError("Basic ProductLabel read Error", error); @@ -11651,15 +11764,14 @@ class SubscribeAttributeBasicProductLabel : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeProductLabelWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeProductLabelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11689,8 +11801,8 @@ class ReadBasicSerialNumber : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeSerialNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.SerialNumber response %@", [value description]); if (error != nil) { LogNSError("Basic SerialNumber read Error", error); @@ -11714,15 +11826,14 @@ class SubscribeAttributeBasicSerialNumber : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSerialNumberWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSerialNumberWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11752,8 +11863,8 @@ class ReadBasicLocalConfigDisabled : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.LocalConfigDisabled response %@", [value description]); if (error != nil) { LogNSError("Basic LocalConfigDisabled read Error", error); @@ -11780,8 +11891,8 @@ class WriteBasicLocalConfigDisabled : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) WriteAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -11789,12 +11900,12 @@ class WriteBasicLocalConfigDisabled : public WriteAttribute { [cluster writeAttributeLocalConfigDisabledWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Basic LocalConfigDisabled write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Basic LocalConfigDisabled write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -11815,15 +11926,14 @@ class SubscribeAttributeBasicLocalConfigDisabled : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLocalConfigDisabledWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLocalConfigDisabledWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11853,8 +11963,8 @@ class ReadBasicReachable : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeReachableWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.Reachable response %@", [value description]); if (error != nil) { LogNSError("Basic Reachable read Error", error); @@ -11878,15 +11988,14 @@ class SubscribeAttributeBasicReachable : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeReachableWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeReachableWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11916,8 +12025,8 @@ class ReadBasicUniqueID : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeUniqueIDWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.UniqueID response %@", [value description]); if (error != nil) { LogNSError("Basic UniqueID read Error", error); @@ -11941,15 +12050,14 @@ class SubscribeAttributeBasicUniqueID : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUniqueIDWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUniqueIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -11979,8 +12087,8 @@ class ReadBasicCapabilityMinima : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCapabilityMinimaWithCompletion:^( + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeCapabilityMinimaWithCompletionHandler:^( MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.CapabilityMinima response %@", [value description]); if (error != nil) { @@ -12005,15 +12113,14 @@ class SubscribeAttributeBasicCapabilityMinima : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCapabilityMinimaWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCapabilityMinimaWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12043,8 +12150,8 @@ class ReadBasicGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Basic GeneratedCommandList read Error", error); @@ -12068,15 +12175,14 @@ class SubscribeAttributeBasicGeneratedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12106,8 +12212,8 @@ class ReadBasicAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Basic AcceptedCommandList read Error", error); @@ -12131,15 +12237,14 @@ class SubscribeAttributeBasicAcceptedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12169,8 +12274,8 @@ class ReadBasicAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Basic AttributeList read Error", error); @@ -12194,15 +12299,14 @@ class SubscribeAttributeBasicAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12232,8 +12336,8 @@ class ReadBasicFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Basic FeatureMap read Error", error); @@ -12257,15 +12361,14 @@ class SubscribeAttributeBasicFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12295,8 +12398,8 @@ class ReadBasicClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Basic ClusterRevision read Error", error); @@ -12320,15 +12423,14 @@ class SubscribeAttributeBasicClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -12384,10 +12486,9 @@ class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateProviderClusterQueryImageParams alloc] init]; + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + __auto_type * params = [[MTROtaSoftwareUpdateProviderClusterQueryImageParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.vendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorId)]; @@ -12429,18 +12530,18 @@ class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster queryImageWithParams:params - completion:^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -12469,10 +12570,9 @@ class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + __auto_type * params = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.updateToken = [NSData dataWithBytes:mRequest.updateToken.data() length:mRequest.updateToken.size()]; @@ -12481,18 +12581,18 @@ class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster applyUpdateRequestWithParams:params - completion:^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -12519,10 +12619,9 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + __auto_type * params = [[MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.updateToken = [NSData dataWithBytes:mRequest.updateToken.data() length:mRequest.updateToken.size()]; @@ -12531,16 +12630,16 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster notifyUpdateAppliedWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -12566,13 +12665,12 @@ class ReadOtaSoftwareUpdateProviderGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateProvider GeneratedCommandList read Error", error); + LogNSError("OtaSoftwareUpdateProvider GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -12593,22 +12691,20 @@ class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public S { ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); + NSLog(@"OtaSoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -12633,13 +12729,12 @@ class ReadOtaSoftwareUpdateProviderAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateProvider AcceptedCommandList read Error", error); + LogNSError("OtaSoftwareUpdateProvider AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -12660,22 +12755,20 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public Su { ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); + NSLog(@"OtaSoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -12700,13 +12793,12 @@ class ReadOtaSoftwareUpdateProviderAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateProvider.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateProvider AttributeList read Error", error); + LogNSError("OtaSoftwareUpdateProvider AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -12727,22 +12819,20 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); + NSLog(@"OtaSoftwareUpdateProvider.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -12767,13 +12857,12 @@ class ReadOtaSoftwareUpdateProviderFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateProvider.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateProvider FeatureMap read Error", error); + LogNSError("OtaSoftwareUpdateProvider FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -12794,22 +12883,20 @@ class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); + NSLog(@"OtaSoftwareUpdateProvider.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -12834,13 +12921,12 @@ class ReadOtaSoftwareUpdateProviderClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateProvider.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateProvider ClusterRevision read Error", error); + LogNSError("OtaSoftwareUpdateProvider ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -12861,22 +12947,20 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterOtaSoftwareUpdateProvider * cluster = + [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); + NSLog(@"OtaSoftwareUpdateProvider.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -12928,10 +13012,9 @@ class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + __auto_type * params = [[MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.providerNodeId = [NSNumber numberWithUnsignedLongLong:mRequest.providerNodeId]; @@ -12948,16 +13031,16 @@ class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster announceOtaProviderWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -12983,23 +13066,19 @@ class ReadOtaSoftwareUpdateRequestorDefaultOtaProviders : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeDefaultOtaProvidersWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.DefaultOtaProviders response %@", - [value description]); - if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor DefaultOtaProviders read Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(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; } }; @@ -13021,10 +13100,9 @@ class WriteOtaSoftwareUpdateRequestorDefaultOtaProviders : public WriteAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -13032,8 +13110,8 @@ class WriteOtaSoftwareUpdateRequestorDefaultOtaProviders : public WriteAttribute { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; for (auto & entry_0 : mValue) { - MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; - newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; + MTROtaSoftwareUpdateRequestorClusterProviderLocation * newElement_0; + newElement_0 = [MTROtaSoftwareUpdateRequestorClusterProviderLocation new]; newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; @@ -13042,15 +13120,14 @@ class WriteOtaSoftwareUpdateRequestorDefaultOtaProviders : public WriteAttribute value = array_0; } - [cluster - writeAttributeDefaultOtaProvidersWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor DefaultOtaProviders write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeDefaultOtaProvidersWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OtaSoftwareUpdateRequestor DefaultOtaProviders write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -13074,22 +13151,20 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOtaProviders : public S { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDefaultOtaProvidersWithParams:params + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDefaultOtaProvidersWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.DefaultOtaProviders response %@", [value description]); + NSLog(@"OtaSoftwareUpdateRequestor.DefaultOtaProviders response %@", [value description]); SetCommandExitStatus(error); }]; @@ -13114,13 +13189,12 @@ class ReadOtaSoftwareUpdateRequestorUpdatePossible : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUpdatePossibleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeUpdatePossibleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateRequestor.UpdatePossible response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor UpdatePossible read Error", error); + LogNSError("OtaSoftwareUpdateRequestor UpdatePossible read Error", error); } SetCommandExitStatus(error); }]; @@ -13141,22 +13215,20 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUpdatePossibleWithParams:params + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUpdatePossibleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); + NSLog(@"OtaSoftwareUpdateRequestor.UpdatePossible response %@", [value description]); SetCommandExitStatus(error); }]; @@ -13181,13 +13253,12 @@ class ReadOtaSoftwareUpdateRequestorUpdateState : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUpdateStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeUpdateStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateRequestor.UpdateState response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor UpdateState read Error", error); + LogNSError("OtaSoftwareUpdateRequestor UpdateState read Error", error); } SetCommandExitStatus(error); }]; @@ -13208,22 +13279,20 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUpdateStateWithParams:params + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUpdateStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); + NSLog(@"OtaSoftwareUpdateRequestor.UpdateState response %@", [value description]); SetCommandExitStatus(error); }]; @@ -13248,13 +13317,12 @@ class ReadOtaSoftwareUpdateRequestorUpdateStateProgress : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUpdateStateProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeUpdateStateProgressWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor UpdateStateProgress read Error", error); + LogNSError("OtaSoftwareUpdateRequestor UpdateStateProgress read Error", error); } SetCommandExitStatus(error); }]; @@ -13275,22 +13343,20 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public S { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUpdateStateProgressWithParams:params + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUpdateStateProgressWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); + NSLog(@"OtaSoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); SetCommandExitStatus(error); }]; @@ -13315,13 +13381,12 @@ class ReadOtaSoftwareUpdateRequestorGeneratedCommandList : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor GeneratedCommandList read Error", error); + LogNSError("OtaSoftwareUpdateRequestor GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -13342,22 +13407,20 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); + NSLog(@"OtaSoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -13382,13 +13445,12 @@ class ReadOtaSoftwareUpdateRequestorAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor AcceptedCommandList read Error", error); + LogNSError("OtaSoftwareUpdateRequestor AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -13409,22 +13471,20 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public S { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); + NSLog(@"OtaSoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -13449,13 +13509,12 @@ class ReadOtaSoftwareUpdateRequestorAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateRequestor.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor AttributeList read Error", error); + LogNSError("OtaSoftwareUpdateRequestor AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -13476,22 +13535,20 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); + NSLog(@"OtaSoftwareUpdateRequestor.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -13516,13 +13573,12 @@ class ReadOtaSoftwareUpdateRequestorFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateRequestor.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor FeatureMap read Error", error); + LogNSError("OtaSoftwareUpdateRequestor FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -13543,22 +13599,20 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); + NSLog(@"OtaSoftwareUpdateRequestor.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -13583,13 +13637,12 @@ class ReadOtaSoftwareUpdateRequestorClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateRequestor.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor ClusterRevision read Error", error); + LogNSError("OtaSoftwareUpdateRequestor ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -13610,22 +13663,20 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); + NSLog(@"OtaSoftwareUpdateRequestor.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -13667,10 +13718,9 @@ class ReadLocalizationConfigurationActiveLocale : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveLocaleWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeActiveLocaleWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration ActiveLocale read Error", error); @@ -13697,10 +13747,9 @@ class WriteLocalizationConfigurationActiveLocale : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -13710,12 +13759,12 @@ class WriteLocalizationConfigurationActiveLocale : public WriteAttribute { [cluster writeAttributeActiveLocaleWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LocalizationConfiguration ActiveLocale write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LocalizationConfiguration ActiveLocale write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -13736,17 +13785,15 @@ class SubscribeAttributeLocalizationConfigurationActiveLocale : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveLocaleWithParams:params + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveLocaleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13776,10 +13823,9 @@ class ReadLocalizationConfigurationSupportedLocales : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSupportedLocalesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeSupportedLocalesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration SupportedLocales read Error", error); @@ -13803,17 +13849,15 @@ class SubscribeAttributeLocalizationConfigurationSupportedLocales : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSupportedLocalesWithParams:params + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSupportedLocalesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13843,10 +13887,9 @@ class ReadLocalizationConfigurationGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration GeneratedCommandList read Error", error); @@ -13870,17 +13913,15 @@ class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public S { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13910,10 +13951,9 @@ class ReadLocalizationConfigurationAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration AcceptedCommandList read Error", error); @@ -13937,17 +13977,15 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Su { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -13977,10 +14015,9 @@ class ReadLocalizationConfigurationAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration AttributeList read Error", error); @@ -14004,17 +14041,15 @@ class SubscribeAttributeLocalizationConfigurationAttributeList : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14044,10 +14079,9 @@ class ReadLocalizationConfigurationFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration FeatureMap read Error", error); @@ -14071,17 +14105,15 @@ class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14111,10 +14143,9 @@ class ReadLocalizationConfigurationClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration ClusterRevision read Error", error); @@ -14138,17 +14169,15 @@ class SubscribeAttributeLocalizationConfigurationClusterRevision : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14196,10 +14225,9 @@ class ReadTimeFormatLocalizationHourFormat : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeHourFormatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeHourFormatWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization HourFormat read Error", error); @@ -14226,10 +14254,9 @@ class WriteTimeFormatLocalizationHourFormat : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -14237,12 +14264,12 @@ class WriteTimeFormatLocalizationHourFormat : public WriteAttribute { [cluster writeAttributeHourFormatWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TimeFormatLocalization HourFormat write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TimeFormatLocalization HourFormat write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -14263,17 +14290,15 @@ class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeHourFormatWithParams:params + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeHourFormatWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14303,10 +14328,9 @@ class ReadTimeFormatLocalizationActiveCalendarType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveCalendarTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeActiveCalendarTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization ActiveCalendarType read Error", error); @@ -14333,10 +14357,9 @@ class WriteTimeFormatLocalizationActiveCalendarType : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -14344,12 +14367,12 @@ class WriteTimeFormatLocalizationActiveCalendarType : public WriteAttribute { [cluster writeAttributeActiveCalendarTypeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TimeFormatLocalization ActiveCalendarType write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TimeFormatLocalization ActiveCalendarType write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -14370,17 +14393,15 @@ class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveCalendarTypeWithParams:params + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveCalendarTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14410,10 +14431,9 @@ class ReadTimeFormatLocalizationSupportedCalendarTypes : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSupportedCalendarTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeSupportedCalendarTypesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization SupportedCalendarTypes read Error", error); @@ -14437,17 +14457,15 @@ class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public Su { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSupportedCalendarTypesWithParams:params + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSupportedCalendarTypesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14477,10 +14495,9 @@ class ReadTimeFormatLocalizationGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization GeneratedCommandList read Error", error); @@ -14504,17 +14521,15 @@ class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14544,10 +14559,9 @@ class ReadTimeFormatLocalizationAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization AcceptedCommandList read Error", error); @@ -14571,17 +14585,15 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14611,10 +14623,9 @@ class ReadTimeFormatLocalizationAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization AttributeList read Error", error); @@ -14638,17 +14649,15 @@ class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14678,10 +14687,9 @@ class ReadTimeFormatLocalizationFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization FeatureMap read Error", error); @@ -14705,17 +14713,15 @@ class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14745,10 +14751,9 @@ class ReadTimeFormatLocalizationClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization ClusterRevision read Error", error); @@ -14772,17 +14777,15 @@ class SubscribeAttributeTimeFormatLocalizationClusterRevision : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14828,10 +14831,10 @@ class ReadUnitLocalizationTemperatureUnit : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeTemperatureUnitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); if (error != nil) { LogNSError("UnitLocalization TemperatureUnit read Error", error); @@ -14858,10 +14861,10 @@ class WriteUnitLocalizationTemperatureUnit : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -14869,12 +14872,12 @@ class WriteUnitLocalizationTemperatureUnit : public WriteAttribute { [cluster writeAttributeTemperatureUnitWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("UnitLocalization TemperatureUnit write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("UnitLocalization TemperatureUnit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -14895,17 +14898,16 @@ class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTemperatureUnitWithParams:params + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTemperatureUnitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -14935,10 +14937,10 @@ class ReadUnitLocalizationGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("UnitLocalization GeneratedCommandList read Error", error); @@ -14962,17 +14964,16 @@ class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15002,10 +15003,10 @@ class ReadUnitLocalizationAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("UnitLocalization AcceptedCommandList read Error", error); @@ -15029,17 +15030,16 @@ class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15069,10 +15069,10 @@ class ReadUnitLocalizationAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AttributeList response %@", [value description]); if (error != nil) { LogNSError("UnitLocalization AttributeList read Error", error); @@ -15096,17 +15096,16 @@ class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15136,10 +15135,10 @@ class ReadUnitLocalizationFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("UnitLocalization FeatureMap read Error", error); @@ -15163,17 +15162,16 @@ class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15203,10 +15201,10 @@ class ReadUnitLocalizationClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("UnitLocalization ClusterRevision read Error", error); @@ -15230,17 +15228,16 @@ class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15286,10 +15283,9 @@ class ReadPowerSourceConfigurationSources : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeSourcesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); if (error != nil) { LogNSError("PowerSourceConfiguration Sources read Error", error); @@ -15313,17 +15309,15 @@ class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSourcesWithParams:params + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSourcesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15353,10 +15347,9 @@ class ReadPowerSourceConfigurationGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("PowerSourceConfiguration GeneratedCommandList read Error", error); @@ -15380,17 +15373,15 @@ class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public Su { ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15420,10 +15411,9 @@ class ReadPowerSourceConfigurationAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("PowerSourceConfiguration AcceptedCommandList read Error", error); @@ -15447,17 +15437,15 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15487,10 +15475,9 @@ class ReadPowerSourceConfigurationAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); if (error != nil) { LogNSError("PowerSourceConfiguration AttributeList read Error", error); @@ -15514,17 +15501,15 @@ class SubscribeAttributePowerSourceConfigurationAttributeList : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15554,10 +15539,9 @@ class ReadPowerSourceConfigurationFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("PowerSourceConfiguration FeatureMap read Error", error); @@ -15581,17 +15565,15 @@ class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15621,10 +15603,9 @@ class ReadPowerSourceConfigurationClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("PowerSourceConfiguration ClusterRevision read Error", error); @@ -15648,17 +15629,15 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15734,10 +15713,10 @@ class ReadPowerSourceStatus : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Status response %@", [value description]); if (error != nil) { LogNSError("PowerSource Status read Error", error); @@ -15761,17 +15740,16 @@ class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStatusWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15801,10 +15779,10 @@ class ReadPowerSourceOrder : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOrderWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOrderWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Order response %@", [value description]); if (error != nil) { LogNSError("PowerSource Order read Error", error); @@ -15828,17 +15806,16 @@ class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOrderWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOrderWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15868,10 +15845,10 @@ class ReadPowerSourceDescription : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Description response %@", [value description]); if (error != nil) { LogNSError("PowerSource Description read Error", error); @@ -15895,17 +15872,16 @@ class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDescriptionWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDescriptionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -15935,16 +15911,17 @@ class ReadPowerSourceWiredAssessedInputVoltage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -15962,17 +15939,16 @@ class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWiredAssessedInputVoltageWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWiredAssessedInputVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16002,16 +15978,17 @@ class ReadPowerSourceWiredAssessedInputFrequency : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -16029,17 +16006,16 @@ class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWiredAssessedInputFrequencyWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16069,10 +16045,10 @@ class ReadPowerSourceWiredCurrentType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWiredCurrentTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeWiredCurrentTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); if (error != nil) { LogNSError("PowerSource WiredCurrentType read Error", error); @@ -16096,17 +16072,16 @@ class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWiredCurrentTypeWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWiredCurrentTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16136,10 +16111,10 @@ class ReadPowerSourceWiredAssessedCurrent : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWiredAssessedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeWiredAssessedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); if (error != nil) { LogNSError("PowerSource WiredAssessedCurrent read Error", error); @@ -16163,17 +16138,16 @@ class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWiredAssessedCurrentWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWiredAssessedCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16203,10 +16177,10 @@ class ReadPowerSourceWiredNominalVoltage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWiredNominalVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeWiredNominalVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); if (error != nil) { LogNSError("PowerSource WiredNominalVoltage read Error", error); @@ -16230,17 +16204,16 @@ class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWiredNominalVoltageWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWiredNominalVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16270,10 +16243,10 @@ class ReadPowerSourceWiredMaximumCurrent : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWiredMaximumCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeWiredMaximumCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); if (error != nil) { LogNSError("PowerSource WiredMaximumCurrent read Error", error); @@ -16297,17 +16270,16 @@ class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWiredMaximumCurrentWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWiredMaximumCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16337,10 +16309,10 @@ class ReadPowerSourceWiredPresent : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWiredPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeWiredPresentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredPresent response %@", [value description]); if (error != nil) { LogNSError("PowerSource WiredPresent read Error", error); @@ -16364,17 +16336,16 @@ class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWiredPresentWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWiredPresentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16404,10 +16375,10 @@ class ReadPowerSourceActiveWiredFaults : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveWiredFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActiveWiredFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); if (error != nil) { LogNSError("PowerSource ActiveWiredFaults read Error", error); @@ -16431,17 +16402,16 @@ class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveWiredFaultsWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveWiredFaultsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16471,10 +16441,10 @@ class ReadPowerSourceBatVoltage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatVoltage response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatVoltage read Error", error); @@ -16498,17 +16468,16 @@ class SubscribeAttributePowerSourceBatVoltage : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatVoltageWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16538,10 +16507,10 @@ class ReadPowerSourceBatPercentRemaining : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatPercentRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatPercentRemainingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatPercentRemaining read Error", error); @@ -16565,17 +16534,16 @@ class SubscribeAttributePowerSourceBatPercentRemaining : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatPercentRemainingWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatPercentRemainingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16605,10 +16573,10 @@ class ReadPowerSourceBatTimeRemaining : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatTimeRemainingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatTimeRemaining read Error", error); @@ -16632,17 +16600,16 @@ class SubscribeAttributePowerSourceBatTimeRemaining : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatTimeRemainingWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatTimeRemainingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16672,10 +16639,10 @@ class ReadPowerSourceBatChargeLevel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatChargeLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatChargeLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatChargeLevel read Error", error); @@ -16699,17 +16666,16 @@ class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatChargeLevelWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatChargeLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16739,10 +16705,10 @@ class ReadPowerSourceBatReplacementNeeded : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatReplacementNeededWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatReplacementNeededWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatReplacementNeeded read Error", error); @@ -16766,17 +16732,16 @@ class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatReplacementNeededWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatReplacementNeededWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16806,10 +16771,10 @@ class ReadPowerSourceBatReplaceability : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatReplaceabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatReplaceabilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplaceability response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatReplaceability read Error", error); @@ -16833,17 +16798,16 @@ class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatReplaceabilityWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatReplaceabilityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16873,10 +16837,10 @@ class ReadPowerSourceBatPresent : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatPresentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPresent response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatPresent read Error", error); @@ -16900,17 +16864,16 @@ class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatPresentWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatPresentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -16940,10 +16903,10 @@ class ReadPowerSourceActiveBatFaults : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveBatFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActiveBatFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); if (error != nil) { LogNSError("PowerSource ActiveBatFaults read Error", error); @@ -16967,17 +16930,16 @@ class SubscribeAttributePowerSourceActiveBatFaults : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveBatFaultsWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveBatFaultsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17007,16 +16969,17 @@ class ReadPowerSourceBatReplacementDescription : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -17034,17 +16997,16 @@ class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatReplacementDescriptionWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatReplacementDescriptionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17074,10 +17036,10 @@ class ReadPowerSourceBatCommonDesignation : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatCommonDesignationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatCommonDesignationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatCommonDesignation read Error", error); @@ -17101,17 +17063,16 @@ class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatCommonDesignationWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatCommonDesignationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17141,10 +17102,10 @@ class ReadPowerSourceBatANSIDesignation : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatANSIDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatANSIDesignationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatANSIDesignation read Error", error); @@ -17168,17 +17129,16 @@ class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatANSIDesignationWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatANSIDesignationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17208,10 +17168,10 @@ class ReadPowerSourceBatIECDesignation : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatIECDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatIECDesignationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatIECDesignation read Error", error); @@ -17235,17 +17195,16 @@ class SubscribeAttributePowerSourceBatIECDesignation : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatIECDesignationWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatIECDesignationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17275,10 +17234,10 @@ class ReadPowerSourceBatApprovedChemistry : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatApprovedChemistryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatApprovedChemistryWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatApprovedChemistry read Error", error); @@ -17302,17 +17261,16 @@ class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatApprovedChemistryWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatApprovedChemistryWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17342,10 +17300,10 @@ class ReadPowerSourceBatCapacity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCapacity response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatCapacity read Error", error); @@ -17369,17 +17327,16 @@ class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatCapacityWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatCapacityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17409,10 +17366,10 @@ class ReadPowerSourceBatQuantity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatQuantityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatQuantity response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatQuantity read Error", error); @@ -17436,17 +17393,16 @@ class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatQuantityWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatQuantityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17476,10 +17432,10 @@ class ReadPowerSourceBatChargeState : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatChargeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatChargeStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeState response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatChargeState read Error", error); @@ -17503,17 +17459,16 @@ class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatChargeStateWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatChargeStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17543,10 +17498,10 @@ class ReadPowerSourceBatTimeToFullCharge : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatTimeToFullChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatTimeToFullChargeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatTimeToFullCharge read Error", error); @@ -17570,17 +17525,16 @@ class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatTimeToFullChargeWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatTimeToFullChargeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17610,16 +17564,17 @@ class ReadPowerSourceBatFunctionalWhileCharging : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -17637,17 +17592,16 @@ class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatFunctionalWhileChargingWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatFunctionalWhileChargingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17677,10 +17631,10 @@ class ReadPowerSourceBatChargingCurrent : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000001D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatChargingCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBatChargingCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatChargingCurrent read Error", error); @@ -17704,17 +17658,16 @@ class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000001D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBatChargingCurrentWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBatChargingCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17744,10 +17697,10 @@ class ReadPowerSourceActiveBatChargeFaults : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000001E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveBatChargeFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActiveBatChargeFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); if (error != nil) { LogNSError("PowerSource ActiveBatChargeFaults read Error", error); @@ -17771,17 +17724,16 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000001E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveBatChargeFaultsWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveBatChargeFaultsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17811,10 +17763,10 @@ class ReadPowerSourceGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("PowerSource GeneratedCommandList read Error", error); @@ -17838,17 +17790,16 @@ class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17878,10 +17829,10 @@ class ReadPowerSourceAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("PowerSource AcceptedCommandList read Error", error); @@ -17905,17 +17856,16 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -17945,10 +17895,10 @@ class ReadPowerSourceAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AttributeList response %@", [value description]); if (error != nil) { LogNSError("PowerSource AttributeList read Error", error); @@ -17972,17 +17922,16 @@ class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18012,10 +17961,10 @@ class ReadPowerSourceFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("PowerSource FeatureMap read Error", error); @@ -18039,17 +17988,16 @@ class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18079,10 +18027,10 @@ class ReadPowerSourceClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("PowerSource ClusterRevision read Error", error); @@ -18106,17 +18054,16 @@ class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18170,9 +18117,9 @@ class GeneralCommissioningArmFailSafe : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -18182,18 +18129,18 @@ class GeneralCommissioningArmFailSafe : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster armFailSafeWithParams:params - completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -18221,9 +18168,9 @@ class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -18237,18 +18184,18 @@ class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand { while (repeatCount--) { [cluster setRegulatoryConfigWithParams:params - completion:^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -18273,9 +18220,9 @@ class GeneralCommissioningCommissioningComplete : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -18283,19 +18230,19 @@ class GeneralCommissioningCommissioningComplete : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster commissioningCompleteWithParams:params - completion:^( - MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -18320,10 +18267,10 @@ class ReadGeneralCommissioningBreadcrumb : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning Breadcrumb read Error", error); @@ -18350,10 +18297,10 @@ class WriteGeneralCommissioningBreadcrumb : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000030) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -18361,12 +18308,12 @@ class WriteGeneralCommissioningBreadcrumb : public WriteAttribute { [cluster writeAttributeBreadcrumbWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("GeneralCommissioning Breadcrumb write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("GeneralCommissioning Breadcrumb write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -18387,17 +18334,16 @@ class SubscribeAttributeGeneralCommissioningBreadcrumb : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBreadcrumbWithParams:params + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBreadcrumbWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18427,10 +18373,10 @@ class ReadGeneralCommissioningBasicCommissioningInfo : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBasicCommissioningInfoWithCompletion:^( + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBasicCommissioningInfoWithCompletionHandler:^( MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); if (error != nil) { @@ -18455,17 +18401,16 @@ class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBasicCommissioningInfoWithParams:params + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBasicCommissioningInfoWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18495,10 +18440,10 @@ class ReadGeneralCommissioningRegulatoryConfig : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRegulatoryConfigWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRegulatoryConfigWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning RegulatoryConfig read Error", error); @@ -18522,17 +18467,16 @@ class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRegulatoryConfigWithParams:params + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRegulatoryConfigWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18562,10 +18506,10 @@ class ReadGeneralCommissioningLocationCapability : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLocationCapabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLocationCapabilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning LocationCapability read Error", error); @@ -18589,17 +18533,16 @@ class SubscribeAttributeGeneralCommissioningLocationCapability : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLocationCapabilityWithParams:params + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLocationCapabilityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18629,10 +18572,11 @@ class ReadGeneralCommissioningSupportsConcurrentConnection : public ReadAttribut ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSupportsConcurrentConnectionWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning SupportsConcurrentConnection read Error", error); @@ -18656,17 +18600,16 @@ class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : publi { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSupportsConcurrentConnectionWithParams:params + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSupportsConcurrentConnectionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18696,10 +18639,10 @@ class ReadGeneralCommissioningGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning GeneratedCommandList read Error", error); @@ -18723,17 +18666,16 @@ class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18763,10 +18705,10 @@ class ReadGeneralCommissioningAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning AcceptedCommandList read Error", error); @@ -18790,17 +18732,16 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18830,10 +18771,10 @@ class ReadGeneralCommissioningAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning AttributeList read Error", error); @@ -18857,17 +18798,16 @@ class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18897,10 +18837,10 @@ class ReadGeneralCommissioningFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning FeatureMap read Error", error); @@ -18924,17 +18864,16 @@ class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -18964,10 +18903,10 @@ class ReadGeneralCommissioningClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning ClusterRevision read Error", error); @@ -18991,17 +18930,16 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19061,9 +18999,9 @@ class NetworkCommissioningScanNetworks : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -19086,18 +19024,18 @@ class NetworkCommissioningScanNetworks : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster scanNetworksWithParams:params - completion:^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -19125,9 +19063,9 @@ class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -19143,18 +19081,18 @@ class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { while (repeatCount--) { [cluster addOrUpdateWiFiNetworkWithParams:params - completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -19181,9 +19119,9 @@ class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -19199,18 +19137,18 @@ class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand { while (repeatCount--) { [cluster addOrUpdateThreadNetworkWithParams:params - completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -19237,9 +19175,9 @@ class NetworkCommissioningRemoveNetwork : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -19253,18 +19191,18 @@ class NetworkCommissioningRemoveNetwork : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster removeNetworkWithParams:params - completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -19291,9 +19229,9 @@ class NetworkCommissioningConnectNetwork : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -19307,18 +19245,18 @@ class NetworkCommissioningConnectNetwork : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster connectNetworkWithParams:params - completion:^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -19346,9 +19284,9 @@ class NetworkCommissioningReorderNetwork : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -19363,18 +19301,18 @@ class NetworkCommissioningReorderNetwork : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster reorderNetworkWithParams:params - completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -19400,10 +19338,10 @@ class ReadNetworkCommissioningMaxNetworks : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxNetworksWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxNetworksWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning MaxNetworks read Error", error); @@ -19427,17 +19365,16 @@ class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxNetworksWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxNetworksWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19467,10 +19404,10 @@ class ReadNetworkCommissioningNetworks : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNetworksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNetworksWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.Networks response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning Networks read Error", error); @@ -19494,17 +19431,16 @@ class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNetworksWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNetworksWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19534,10 +19470,10 @@ class ReadNetworkCommissioningScanMaxTimeSeconds : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScanMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeScanMaxTimeSecondsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning ScanMaxTimeSeconds read Error", error); @@ -19561,17 +19497,16 @@ class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeScanMaxTimeSecondsWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeScanMaxTimeSecondsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19601,10 +19536,10 @@ class ReadNetworkCommissioningConnectMaxTimeSeconds : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeConnectMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeConnectMaxTimeSecondsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning ConnectMaxTimeSeconds read Error", error); @@ -19628,17 +19563,16 @@ class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeConnectMaxTimeSecondsWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeConnectMaxTimeSecondsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19668,10 +19602,10 @@ class ReadNetworkCommissioningInterfaceEnabled : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInterfaceEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInterfaceEnabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning InterfaceEnabled read Error", error); @@ -19698,10 +19632,10 @@ class WriteNetworkCommissioningInterfaceEnabled : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000031) WriteAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -19709,12 +19643,12 @@ class WriteNetworkCommissioningInterfaceEnabled : public WriteAttribute { [cluster writeAttributeInterfaceEnabledWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("NetworkCommissioning InterfaceEnabled write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("NetworkCommissioning InterfaceEnabled write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -19735,17 +19669,16 @@ class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInterfaceEnabledWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInterfaceEnabledWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19775,10 +19708,10 @@ class ReadNetworkCommissioningLastNetworkingStatus : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLastNetworkingStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLastNetworkingStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning LastNetworkingStatus read Error", error); @@ -19802,17 +19735,16 @@ class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLastNetworkingStatusWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLastNetworkingStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19842,10 +19774,10 @@ class ReadNetworkCommissioningLastNetworkID : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLastNetworkIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLastNetworkIDWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning LastNetworkID read Error", error); @@ -19869,17 +19801,16 @@ class SubscribeAttributeNetworkCommissioningLastNetworkID : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLastNetworkIDWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLastNetworkIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19909,10 +19840,10 @@ class ReadNetworkCommissioningLastConnectErrorValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLastConnectErrorValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLastConnectErrorValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning LastConnectErrorValue read Error", error); @@ -19936,17 +19867,16 @@ class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLastConnectErrorValueWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLastConnectErrorValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -19976,10 +19906,10 @@ class ReadNetworkCommissioningGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning GeneratedCommandList read Error", error); @@ -20003,17 +19933,16 @@ class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20043,10 +19972,10 @@ class ReadNetworkCommissioningAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning AcceptedCommandList read Error", error); @@ -20070,17 +19999,16 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20110,10 +20038,10 @@ class ReadNetworkCommissioningAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning AttributeList read Error", error); @@ -20137,17 +20065,16 @@ class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20177,10 +20104,10 @@ class ReadNetworkCommissioningFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning FeatureMap read Error", error); @@ -20204,17 +20131,16 @@ class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20244,10 +20170,10 @@ class ReadNetworkCommissioningClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning ClusterRevision read Error", error); @@ -20271,17 +20197,16 @@ class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20329,9 +20254,9 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000032) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -20343,18 +20268,18 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster retrieveLogsRequestWithParams:params - completion:^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -20380,10 +20305,10 @@ class ReadDiagnosticLogsGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("DiagnosticLogs GeneratedCommandList read Error", error); @@ -20407,17 +20332,16 @@ class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20447,10 +20371,10 @@ class ReadDiagnosticLogsAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("DiagnosticLogs AcceptedCommandList read Error", error); @@ -20474,17 +20398,16 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20514,10 +20437,10 @@ class ReadDiagnosticLogsAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); if (error != nil) { LogNSError("DiagnosticLogs AttributeList read Error", error); @@ -20541,17 +20464,16 @@ class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20581,10 +20503,10 @@ class ReadDiagnosticLogsFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("DiagnosticLogs FeatureMap read Error", error); @@ -20608,17 +20530,16 @@ class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20648,10 +20569,10 @@ class ReadDiagnosticLogsClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("DiagnosticLogs ClusterRevision read Error", error); @@ -20675,17 +20596,16 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20745,9 +20665,9 @@ class GeneralDiagnosticsTestEventTrigger : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000033) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -20757,16 +20677,16 @@ class GeneralDiagnosticsTestEventTrigger : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testEventTriggerWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -20792,10 +20712,10 @@ class ReadGeneralDiagnosticsNetworkInterfaces : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNetworkInterfacesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics NetworkInterfaces read Error", error); @@ -20819,17 +20739,16 @@ class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNetworkInterfacesWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNetworkInterfacesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20859,10 +20778,10 @@ class ReadGeneralDiagnosticsRebootCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRebootCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics RebootCount read Error", error); @@ -20886,17 +20805,16 @@ class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRebootCountWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRebootCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20926,10 +20844,10 @@ class ReadGeneralDiagnosticsUpTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeUpTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics UpTime read Error", error); @@ -20953,17 +20871,16 @@ class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUpTimeWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUpTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -20993,10 +20910,10 @@ class ReadGeneralDiagnosticsTotalOperationalHours : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeTotalOperationalHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics TotalOperationalHours read Error", error); @@ -21020,17 +20937,16 @@ class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTotalOperationalHoursWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTotalOperationalHoursWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21060,10 +20976,10 @@ class ReadGeneralDiagnosticsBootReasons : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBootReasonsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBootReasonsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.BootReasons response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics BootReasons read Error", error); @@ -21087,17 +21003,16 @@ class SubscribeAttributeGeneralDiagnosticsBootReasons : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBootReasonsWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBootReasonsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21127,10 +21042,10 @@ class ReadGeneralDiagnosticsActiveHardwareFaults : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveHardwareFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActiveHardwareFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics ActiveHardwareFaults read Error", error); @@ -21154,17 +21069,16 @@ class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveHardwareFaultsWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveHardwareFaultsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21194,10 +21108,10 @@ class ReadGeneralDiagnosticsActiveRadioFaults : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveRadioFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActiveRadioFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics ActiveRadioFaults read Error", error); @@ -21221,17 +21135,16 @@ class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveRadioFaultsWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveRadioFaultsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21261,10 +21174,10 @@ class ReadGeneralDiagnosticsActiveNetworkFaults : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveNetworkFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActiveNetworkFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics ActiveNetworkFaults read Error", error); @@ -21288,17 +21201,16 @@ class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveNetworkFaultsWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveNetworkFaultsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21328,16 +21240,17 @@ class ReadGeneralDiagnosticsTestEventTriggersEnabled : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -21355,17 +21268,16 @@ class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTestEventTriggersEnabledWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTestEventTriggersEnabledWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21395,10 +21307,10 @@ class ReadGeneralDiagnosticsGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics GeneratedCommandList read Error", error); @@ -21422,17 +21334,16 @@ class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21462,10 +21373,10 @@ class ReadGeneralDiagnosticsAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics AcceptedCommandList read Error", error); @@ -21489,17 +21400,16 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21529,10 +21439,10 @@ class ReadGeneralDiagnosticsAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics AttributeList read Error", error); @@ -21556,17 +21466,16 @@ class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21596,10 +21505,10 @@ class ReadGeneralDiagnosticsFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics FeatureMap read Error", error); @@ -21623,17 +21532,16 @@ class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21663,10 +21571,10 @@ class ReadGeneralDiagnosticsClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics ClusterRevision read Error", error); @@ -21690,17 +21598,16 @@ class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21750,9 +21657,9 @@ class SoftwareDiagnosticsResetWatermarks : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000034) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -21760,16 +21667,16 @@ class SoftwareDiagnosticsResetWatermarks : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster resetWatermarksWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -21794,10 +21701,10 @@ class ReadSoftwareDiagnosticsThreadMetrics : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeThreadMetricsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeThreadMetricsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics ThreadMetrics read Error", error); @@ -21821,17 +21728,16 @@ class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeThreadMetricsWithParams:params + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeThreadMetricsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21861,10 +21767,10 @@ class ReadSoftwareDiagnosticsCurrentHeapFree : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentHeapFreeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentHeapFreeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics CurrentHeapFree read Error", error); @@ -21888,17 +21794,16 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentHeapFreeWithParams:params + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentHeapFreeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21928,10 +21833,10 @@ class ReadSoftwareDiagnosticsCurrentHeapUsed : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentHeapUsedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentHeapUsedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics CurrentHeapUsed read Error", error); @@ -21955,17 +21860,16 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentHeapUsedWithParams:params + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentHeapUsedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -21995,16 +21899,17 @@ class ReadSoftwareDiagnosticsCurrentHeapHighWatermark : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -22022,17 +21927,16 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentHeapHighWatermarkWithParams:params + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22062,10 +21966,10 @@ class ReadSoftwareDiagnosticsGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics GeneratedCommandList read Error", error); @@ -22089,17 +21993,16 @@ class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22129,10 +22032,10 @@ class ReadSoftwareDiagnosticsAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics AcceptedCommandList read Error", error); @@ -22156,17 +22059,16 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22196,10 +22098,10 @@ class ReadSoftwareDiagnosticsAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics AttributeList read Error", error); @@ -22223,17 +22125,16 @@ class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22263,10 +22164,10 @@ class ReadSoftwareDiagnosticsFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics FeatureMap read Error", error); @@ -22290,17 +22191,16 @@ class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22330,10 +22230,10 @@ class ReadSoftwareDiagnosticsClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics ClusterRevision read Error", error); @@ -22357,17 +22257,16 @@ class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22477,9 +22376,8 @@ class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000035) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -22487,16 +22385,16 @@ class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster resetCountsWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -22521,10 +22419,9 @@ class ReadThreadNetworkDiagnosticsChannel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeChannelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeChannelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics Channel read Error", error); @@ -22548,17 +22445,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeChannelWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeChannelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22588,10 +22483,9 @@ class ReadThreadNetworkDiagnosticsRoutingRole : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRoutingRoleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRoutingRoleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RoutingRole read Error", error); @@ -22615,17 +22509,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRoutingRoleWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRoutingRoleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22655,10 +22547,9 @@ class ReadThreadNetworkDiagnosticsNetworkName : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNetworkNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeNetworkNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics NetworkName read Error", error); @@ -22682,17 +22573,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNetworkNameWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNetworkNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22722,10 +22611,9 @@ class ReadThreadNetworkDiagnosticsPanId : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePanIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics PanId read Error", error); @@ -22749,17 +22637,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePanIdWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePanIdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22789,10 +22675,9 @@ class ReadThreadNetworkDiagnosticsExtendedPanId : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeExtendedPanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeExtendedPanIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ExtendedPanId read Error", error); @@ -22816,17 +22701,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeExtendedPanIdWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeExtendedPanIdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22856,10 +22739,9 @@ class ReadThreadNetworkDiagnosticsMeshLocalPrefix : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeshLocalPrefixWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMeshLocalPrefixWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics MeshLocalPrefix read Error", error); @@ -22883,17 +22765,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeshLocalPrefixWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeshLocalPrefixWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22923,10 +22803,9 @@ class ReadThreadNetworkDiagnosticsOverrunCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics OverrunCount read Error", error); @@ -22950,17 +22829,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOverrunCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOverrunCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -22990,10 +22867,9 @@ class ReadThreadNetworkDiagnosticsNeighborTableList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNeighborTableListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeNeighborTableListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NeighborTableList response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics NeighborTableList read Error", error); @@ -23017,17 +22893,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsNeighborTableList : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNeighborTableListWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNeighborTableListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23057,10 +22931,9 @@ class ReadThreadNetworkDiagnosticsRouteTableList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRouteTableListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRouteTableListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouteTableList response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RouteTableList read Error", error); @@ -23084,17 +22957,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouteTableList : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRouteTableListWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRouteTableListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23124,10 +22995,9 @@ class ReadThreadNetworkDiagnosticsPartitionId : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePartitionIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePartitionIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics PartitionId read Error", error); @@ -23151,17 +23021,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePartitionIdWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePartitionIdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23191,10 +23059,9 @@ class ReadThreadNetworkDiagnosticsWeighting : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWeightingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeWeightingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics Weighting read Error", error); @@ -23218,17 +23085,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWeightingWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWeightingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23258,10 +23123,9 @@ class ReadThreadNetworkDiagnosticsDataVersion : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeDataVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics DataVersion read Error", error); @@ -23285,17 +23149,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDataVersionWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDataVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23325,10 +23187,9 @@ class ReadThreadNetworkDiagnosticsStableDataVersion : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStableDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeStableDataVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics StableDataVersion read Error", error); @@ -23352,17 +23213,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStableDataVersionWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStableDataVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23392,10 +23251,9 @@ class ReadThreadNetworkDiagnosticsLeaderRouterId : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLeaderRouterIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeLeaderRouterIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics LeaderRouterId read Error", error); @@ -23419,17 +23277,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLeaderRouterIdWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLeaderRouterIdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23459,10 +23315,9 @@ class ReadThreadNetworkDiagnosticsDetachedRoleCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDetachedRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeDetachedRoleCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics DetachedRoleCount read Error", error); @@ -23486,17 +23341,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDetachedRoleCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDetachedRoleCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23526,10 +23379,9 @@ class ReadThreadNetworkDiagnosticsChildRoleCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeChildRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeChildRoleCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ChildRoleCount read Error", error); @@ -23553,17 +23405,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeChildRoleCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeChildRoleCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23593,10 +23443,9 @@ class ReadThreadNetworkDiagnosticsRouterRoleCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRouterRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRouterRoleCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RouterRoleCount read Error", error); @@ -23620,17 +23469,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRouterRoleCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRouterRoleCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23660,10 +23507,9 @@ class ReadThreadNetworkDiagnosticsLeaderRoleCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLeaderRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeLeaderRoleCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics LeaderRoleCount read Error", error); @@ -23687,17 +23533,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLeaderRoleCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLeaderRoleCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23727,10 +23571,9 @@ class ReadThreadNetworkDiagnosticsAttachAttemptCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttachAttemptCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics AttachAttemptCount read Error", error); @@ -23754,17 +23597,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttachAttemptCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttachAttemptCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23794,10 +23635,9 @@ class ReadThreadNetworkDiagnosticsPartitionIdChangeCount : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePartitionIdChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePartitionIdChangeCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics PartitionIdChangeCount read Error", error); @@ -23821,17 +23661,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePartitionIdChangeCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePartitionIdChangeCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23861,17 +23699,16 @@ class ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public Rea ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -23889,17 +23726,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCoun { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBetterPartitionAttachAttemptCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23929,10 +23764,9 @@ class ReadThreadNetworkDiagnosticsParentChangeCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeParentChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeParentChangeCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ParentChangeCount read Error", error); @@ -23956,17 +23790,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeParentChangeCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeParentChangeCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -23996,10 +23828,9 @@ class ReadThreadNetworkDiagnosticsTxTotalCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxTotalCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxTotalCount read Error", error); @@ -24023,17 +23854,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxTotalCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxTotalCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24063,10 +23892,9 @@ class ReadThreadNetworkDiagnosticsTxUnicastCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxUnicastCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxUnicastCount read Error", error); @@ -24090,17 +23918,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxUnicastCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxUnicastCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24130,10 +23956,9 @@ class ReadThreadNetworkDiagnosticsTxBroadcastCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxBroadcastCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxBroadcastCount read Error", error); @@ -24157,17 +23982,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxBroadcastCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxBroadcastCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24197,10 +24020,9 @@ class ReadThreadNetworkDiagnosticsTxAckRequestedCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxAckRequestedCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxAckRequestedCount read Error", error); @@ -24224,17 +24046,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxAckRequestedCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxAckRequestedCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24264,10 +24084,9 @@ class ReadThreadNetworkDiagnosticsTxAckedCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxAckedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxAckedCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxAckedCount read Error", error); @@ -24291,17 +24110,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxAckedCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxAckedCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24331,10 +24148,9 @@ class ReadThreadNetworkDiagnosticsTxNoAckRequestedCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxNoAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxNoAckRequestedCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxNoAckRequestedCount read Error", error); @@ -24358,17 +24174,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public S { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxNoAckRequestedCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxNoAckRequestedCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24398,10 +24212,9 @@ class ReadThreadNetworkDiagnosticsTxDataCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxDataCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxDataCount read Error", error); @@ -24425,17 +24238,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxDataCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxDataCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24465,10 +24276,9 @@ class ReadThreadNetworkDiagnosticsTxDataPollCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000001D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxDataPollCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxDataPollCount read Error", error); @@ -24492,17 +24302,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000001D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxDataPollCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxDataPollCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24532,10 +24340,9 @@ class ReadThreadNetworkDiagnosticsTxBeaconCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000001E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxBeaconCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxBeaconCount read Error", error); @@ -24559,17 +24366,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000001E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxBeaconCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxBeaconCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24599,10 +24404,9 @@ class ReadThreadNetworkDiagnosticsTxBeaconRequestCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000001F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxBeaconRequestCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxBeaconRequestCount read Error", error); @@ -24626,17 +24430,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public Su { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000001F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxBeaconRequestCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxBeaconRequestCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24666,10 +24468,9 @@ class ReadThreadNetworkDiagnosticsTxOtherCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxOtherCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxOtherCount read Error", error); @@ -24693,17 +24494,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxOtherCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxOtherCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24733,10 +24532,9 @@ class ReadThreadNetworkDiagnosticsTxRetryCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxRetryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxRetryCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxRetryCount read Error", error); @@ -24760,17 +24558,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxRetryCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxRetryCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24800,16 +24596,16 @@ class ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public ReadAttri ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -24827,17 +24623,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : pu { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24867,10 +24661,10 @@ class ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public ReadAtt ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxIndirectMaxRetryExpiryCount read Error", error); @@ -24894,17 +24688,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -24934,10 +24726,9 @@ class ReadThreadNetworkDiagnosticsTxErrCcaCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxErrCcaCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxErrCcaCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxErrCcaCount read Error", error); @@ -24961,17 +24752,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxErrCcaCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxErrCcaCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25001,10 +24790,9 @@ class ReadThreadNetworkDiagnosticsTxErrAbortCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxErrAbortCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxErrAbortCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxErrAbortCount read Error", error); @@ -25028,17 +24816,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxErrAbortCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxErrAbortCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25068,10 +24854,9 @@ class ReadThreadNetworkDiagnosticsTxErrBusyChannelCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxErrBusyChannelCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxErrBusyChannelCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxErrBusyChannelCount read Error", error); @@ -25095,17 +24880,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public S { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxErrBusyChannelCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxErrBusyChannelCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25135,10 +24918,9 @@ class ReadThreadNetworkDiagnosticsRxTotalCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxTotalCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxTotalCount read Error", error); @@ -25162,17 +24944,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxTotalCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxTotalCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25202,10 +24982,9 @@ class ReadThreadNetworkDiagnosticsRxUnicastCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxUnicastCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxUnicastCount read Error", error); @@ -25229,17 +25008,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxUnicastCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxUnicastCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25269,10 +25046,9 @@ class ReadThreadNetworkDiagnosticsRxBroadcastCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxBroadcastCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxBroadcastCount read Error", error); @@ -25296,17 +25072,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxBroadcastCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxBroadcastCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25336,10 +25110,9 @@ class ReadThreadNetworkDiagnosticsRxDataCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxDataCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxDataCount read Error", error); @@ -25363,17 +25136,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxDataCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxDataCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25403,10 +25174,9 @@ class ReadThreadNetworkDiagnosticsRxDataPollCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000002B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxDataPollCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxDataPollCount read Error", error); @@ -25430,17 +25200,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000002B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxDataPollCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxDataPollCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25470,10 +25238,9 @@ class ReadThreadNetworkDiagnosticsRxBeaconCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000002C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxBeaconCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxBeaconCount read Error", error); @@ -25497,17 +25264,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000002C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxBeaconCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxBeaconCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25537,10 +25302,9 @@ class ReadThreadNetworkDiagnosticsRxBeaconRequestCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000002D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxBeaconRequestCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxBeaconRequestCount read Error", error); @@ -25564,17 +25328,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public Su { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000002D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxBeaconRequestCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxBeaconRequestCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25604,10 +25366,9 @@ class ReadThreadNetworkDiagnosticsRxOtherCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000002E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxOtherCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxOtherCount read Error", error); @@ -25631,17 +25392,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000002E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxOtherCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxOtherCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25671,10 +25430,9 @@ class ReadThreadNetworkDiagnosticsRxAddressFilteredCount : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000002F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxAddressFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxAddressFilteredCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxAddressFilteredCount read Error", error); @@ -25698,17 +25456,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000002F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxAddressFilteredCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxAddressFilteredCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25738,16 +25494,16 @@ class ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -25765,17 +25521,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxDestAddrFilteredCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxDestAddrFilteredCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25805,10 +25559,9 @@ class ReadThreadNetworkDiagnosticsRxDuplicatedCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxDuplicatedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxDuplicatedCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxDuplicatedCount read Error", error); @@ -25832,17 +25585,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxDuplicatedCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxDuplicatedCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25872,10 +25623,9 @@ class ReadThreadNetworkDiagnosticsRxErrNoFrameCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxErrNoFrameCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxErrNoFrameCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxErrNoFrameCount read Error", error); @@ -25899,17 +25649,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxErrNoFrameCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxErrNoFrameCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -25939,16 +25687,16 @@ class ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public ReadAttribu ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -25966,17 +25714,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : publ { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxErrUnknownNeighborCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26006,16 +25752,16 @@ class ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public ReadAttribut ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -26033,17 +25779,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : publi { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxErrInvalidSrcAddrCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26073,10 +25817,9 @@ class ReadThreadNetworkDiagnosticsRxErrSecCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxErrSecCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxErrSecCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxErrSecCount read Error", error); @@ -26100,17 +25843,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxErrSecCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxErrSecCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26140,10 +25881,9 @@ class ReadThreadNetworkDiagnosticsRxErrFcsCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxErrFcsCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxErrFcsCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxErrFcsCount read Error", error); @@ -26167,17 +25907,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxErrFcsCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxErrFcsCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26207,10 +25945,9 @@ class ReadThreadNetworkDiagnosticsRxErrOtherCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRxErrOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRxErrOtherCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxErrOtherCount read Error", error); @@ -26234,17 +25971,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRxErrOtherCountWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRxErrOtherCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26274,10 +26009,9 @@ class ReadThreadNetworkDiagnosticsActiveTimestamp : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeActiveTimestampWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ActiveTimestamp read Error", error); @@ -26301,17 +26035,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveTimestampWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveTimestampWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26341,10 +26073,9 @@ class ReadThreadNetworkDiagnosticsPendingTimestamp : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000039) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePendingTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePendingTimestampWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics PendingTimestamp read Error", error); @@ -26368,17 +26099,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000039) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePendingTimestampWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePendingTimestampWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26408,10 +26137,9 @@ class ReadThreadNetworkDiagnosticsDelay : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics Delay read Error", error); @@ -26435,17 +26163,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDelayWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26475,10 +26201,9 @@ class ReadThreadNetworkDiagnosticsSecurityPolicy : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000003B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSecurityPolicyWithCompletion:^( + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeSecurityPolicyWithCompletionHandler:^( MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); if (error != nil) { @@ -26503,17 +26228,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000003B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSecurityPolicyWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSecurityPolicyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26543,10 +26266,9 @@ class ReadThreadNetworkDiagnosticsChannelPage0Mask : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000003C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeChannelPage0MaskWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeChannelPage0MaskWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ChannelPage0Mask read Error", error); @@ -26570,17 +26292,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000003C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeChannelPage0MaskWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeChannelPage0MaskWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26610,10 +26330,9 @@ class ReadThreadNetworkDiagnosticsOperationalDatasetComponents : public ReadAttr ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000003D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOperationalDatasetComponentsWithCompletion:^( + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeOperationalDatasetComponentsWithCompletionHandler:^( MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); if (error != nil) { @@ -26638,17 +26357,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : p { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000003D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOperationalDatasetComponentsWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOperationalDatasetComponentsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26679,10 +26396,9 @@ class ReadThreadNetworkDiagnosticsActiveNetworkFaultsList : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000003E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveNetworkFaultsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeActiveNetworkFaultsListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ActiveNetworkFaultsList read Error", error); @@ -26706,17 +26422,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000003E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveNetworkFaultsListWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveNetworkFaultsListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26746,10 +26460,9 @@ class ReadThreadNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics GeneratedCommandList read Error", error); @@ -26773,17 +26486,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public Su { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26813,10 +26524,9 @@ class ReadThreadNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics AcceptedCommandList read Error", error); @@ -26840,17 +26550,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26880,10 +26588,9 @@ class ReadThreadNetworkDiagnosticsAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics AttributeList read Error", error); @@ -26907,17 +26614,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -26947,10 +26652,9 @@ class ReadThreadNetworkDiagnosticsFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics FeatureMap read Error", error); @@ -26974,17 +26678,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27014,10 +26716,9 @@ class ReadThreadNetworkDiagnosticsClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ClusterRevision read Error", error); @@ -27041,17 +26742,15 @@ class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27112,9 +26811,8 @@ class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000036) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -27122,16 +26820,16 @@ class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster resetCountsWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -27156,10 +26854,9 @@ class ReadWiFiNetworkDiagnosticsBssid : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBssidWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeBssidWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.Bssid response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics Bssid read Error", error); @@ -27183,17 +26880,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBssidWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBssidWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27223,10 +26918,9 @@ class ReadWiFiNetworkDiagnosticsSecurityType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSecurityTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeSecurityTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics SecurityType read Error", error); @@ -27250,17 +26944,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSecurityTypeWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSecurityTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27290,10 +26982,9 @@ class ReadWiFiNetworkDiagnosticsWiFiVersion : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWiFiVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeWiFiVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics WiFiVersion read Error", error); @@ -27317,17 +27008,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWiFiVersionWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWiFiVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27357,10 +27046,9 @@ class ReadWiFiNetworkDiagnosticsChannelNumber : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeChannelNumberWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeChannelNumberWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics ChannelNumber read Error", error); @@ -27384,17 +27072,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeChannelNumberWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeChannelNumberWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27424,10 +27110,9 @@ class ReadWiFiNetworkDiagnosticsRssi : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRssiWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeRssiWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.Rssi response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics Rssi read Error", error); @@ -27451,17 +27136,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRssiWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRssiWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27491,10 +27174,9 @@ class ReadWiFiNetworkDiagnosticsBeaconLostCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeBeaconLostCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics BeaconLostCount read Error", error); @@ -27518,17 +27200,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBeaconLostCountWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBeaconLostCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27558,10 +27238,9 @@ class ReadWiFiNetworkDiagnosticsBeaconRxCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeBeaconRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics BeaconRxCount read Error", error); @@ -27585,17 +27264,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBeaconRxCountWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBeaconRxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27625,10 +27302,9 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastRxCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePacketMulticastRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics PacketMulticastRxCount read Error", error); @@ -27652,17 +27328,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public Su { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePacketMulticastRxCountWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePacketMulticastRxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27692,10 +27366,9 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastTxCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePacketMulticastTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics PacketMulticastTxCount read Error", error); @@ -27719,17 +27392,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public Su { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePacketMulticastTxCountWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePacketMulticastTxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27759,10 +27430,9 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastRxCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePacketUnicastRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics PacketUnicastRxCount read Error", error); @@ -27786,17 +27456,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePacketUnicastRxCountWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePacketUnicastRxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27826,10 +27494,9 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastTxCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePacketUnicastTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics PacketUnicastTxCount read Error", error); @@ -27853,17 +27520,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePacketUnicastTxCountWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePacketUnicastTxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27893,10 +27558,9 @@ class ReadWiFiNetworkDiagnosticsCurrentMaxRate : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentMaxRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeCurrentMaxRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics CurrentMaxRate read Error", error); @@ -27920,17 +27584,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentMaxRateWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentMaxRateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -27960,10 +27622,9 @@ class ReadWiFiNetworkDiagnosticsOverrunCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics OverrunCount read Error", error); @@ -27987,17 +27648,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOverrunCountWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOverrunCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28027,10 +27686,9 @@ class ReadWiFiNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics GeneratedCommandList read Error", error); @@ -28054,17 +27712,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28094,10 +27750,9 @@ class ReadWiFiNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics AcceptedCommandList read Error", error); @@ -28121,17 +27776,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28161,10 +27814,9 @@ class ReadWiFiNetworkDiagnosticsAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics AttributeList read Error", error); @@ -28188,17 +27840,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28228,10 +27878,9 @@ class ReadWiFiNetworkDiagnosticsFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics FeatureMap read Error", error); @@ -28255,17 +27904,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28295,10 +27942,9 @@ class ReadWiFiNetworkDiagnosticsClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics ClusterRevision read Error", error); @@ -28322,17 +27968,15 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28386,9 +28030,8 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000037) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -28396,16 +28039,16 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster resetCountsWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -28430,10 +28073,9 @@ class ReadEthernetNetworkDiagnosticsPHYRate : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics PHYRate read Error", error); @@ -28457,17 +28099,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePHYRateWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePHYRateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28497,10 +28137,9 @@ class ReadEthernetNetworkDiagnosticsFullDuplex : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFullDuplexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFullDuplexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics FullDuplex read Error", error); @@ -28524,17 +28163,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFullDuplexWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFullDuplexWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28564,10 +28201,9 @@ class ReadEthernetNetworkDiagnosticsPacketRxCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics PacketRxCount read Error", error); @@ -28591,17 +28227,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePacketRxCountWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePacketRxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28631,10 +28265,9 @@ class ReadEthernetNetworkDiagnosticsPacketTxCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics PacketTxCount read Error", error); @@ -28658,17 +28291,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePacketTxCountWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePacketTxCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28698,10 +28329,9 @@ class ReadEthernetNetworkDiagnosticsTxErrCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics TxErrCount read Error", error); @@ -28725,17 +28355,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTxErrCountWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTxErrCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28765,10 +28393,9 @@ class ReadEthernetNetworkDiagnosticsCollisionCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics CollisionCount read Error", error); @@ -28792,17 +28419,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCollisionCountWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCollisionCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28832,10 +28457,9 @@ class ReadEthernetNetworkDiagnosticsOverrunCount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics OverrunCount read Error", error); @@ -28859,17 +28483,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOverrunCountWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOverrunCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28899,10 +28521,9 @@ class ReadEthernetNetworkDiagnosticsCarrierDetect : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCarrierDetectWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeCarrierDetectWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics CarrierDetect read Error", error); @@ -28926,17 +28547,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCarrierDetectWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCarrierDetectWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -28966,10 +28585,9 @@ class ReadEthernetNetworkDiagnosticsTimeSinceReset : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTimeSinceResetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTimeSinceResetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics TimeSinceReset read Error", error); @@ -28993,17 +28611,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTimeSinceResetWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTimeSinceResetWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29033,10 +28649,9 @@ class ReadEthernetNetworkDiagnosticsGeneratedCommandList : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics GeneratedCommandList read Error", error); @@ -29060,17 +28675,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29100,10 +28713,9 @@ class ReadEthernetNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics AcceptedCommandList read Error", error); @@ -29127,17 +28739,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public S { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29167,10 +28777,9 @@ class ReadEthernetNetworkDiagnosticsAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics AttributeList read Error", error); @@ -29194,17 +28803,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29234,10 +28841,9 @@ class ReadEthernetNetworkDiagnosticsFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics FeatureMap read Error", error); @@ -29261,17 +28867,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29301,10 +28905,9 @@ class ReadEthernetNetworkDiagnosticsClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics ClusterRevision read Error", error); @@ -29328,17 +28931,15 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29402,10 +29003,10 @@ class ReadBridgedDeviceBasicVendorName : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.VendorName response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic VendorName read Error", error); @@ -29429,17 +29030,16 @@ class SubscribeAttributeBridgedDeviceBasicVendorName : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeVendorNameWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeVendorNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29469,10 +29069,10 @@ class ReadBridgedDeviceBasicVendorID : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.VendorID response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic VendorID read Error", error); @@ -29496,17 +29096,16 @@ class SubscribeAttributeBridgedDeviceBasicVendorID : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeVendorIDWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeVendorIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29536,10 +29135,10 @@ class ReadBridgedDeviceBasicProductName : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeProductNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ProductName response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic ProductName read Error", error); @@ -29563,17 +29162,16 @@ class SubscribeAttributeBridgedDeviceBasicProductName : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeProductNameWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeProductNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29603,10 +29201,10 @@ class ReadBridgedDeviceBasicNodeLabel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.NodeLabel response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic NodeLabel read Error", error); @@ -29633,10 +29231,10 @@ class WriteBridgedDeviceBasicNodeLabel : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000039) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -29646,12 +29244,12 @@ class WriteBridgedDeviceBasicNodeLabel : public WriteAttribute { [cluster writeAttributeNodeLabelWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BridgedDeviceBasic NodeLabel write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BridgedDeviceBasic NodeLabel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -29672,17 +29270,16 @@ class SubscribeAttributeBridgedDeviceBasicNodeLabel : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNodeLabelWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNodeLabelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29712,10 +29309,10 @@ class ReadBridgedDeviceBasicHardwareVersion : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeHardwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.HardwareVersion response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic HardwareVersion read Error", error); @@ -29739,17 +29336,16 @@ class SubscribeAttributeBridgedDeviceBasicHardwareVersion : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeHardwareVersionWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeHardwareVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29779,10 +29375,10 @@ class ReadBridgedDeviceBasicHardwareVersionString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeHardwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.HardwareVersionString response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic HardwareVersionString read Error", error); @@ -29806,17 +29402,16 @@ class SubscribeAttributeBridgedDeviceBasicHardwareVersionString : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeHardwareVersionStringWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeHardwareVersionStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29846,10 +29441,10 @@ class ReadBridgedDeviceBasicSoftwareVersion : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSoftwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.SoftwareVersion response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic SoftwareVersion read Error", error); @@ -29873,17 +29468,16 @@ class SubscribeAttributeBridgedDeviceBasicSoftwareVersion : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSoftwareVersionWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSoftwareVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29913,10 +29507,10 @@ class ReadBridgedDeviceBasicSoftwareVersionString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSoftwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.SoftwareVersionString response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic SoftwareVersionString read Error", error); @@ -29940,17 +29534,16 @@ class SubscribeAttributeBridgedDeviceBasicSoftwareVersionString : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSoftwareVersionStringWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSoftwareVersionStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -29980,10 +29573,10 @@ class ReadBridgedDeviceBasicManufacturingDate : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeManufacturingDateWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ManufacturingDate response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic ManufacturingDate read Error", error); @@ -30007,17 +29600,16 @@ class SubscribeAttributeBridgedDeviceBasicManufacturingDate : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeManufacturingDateWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeManufacturingDateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30047,10 +29639,10 @@ class ReadBridgedDeviceBasicPartNumber : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePartNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.PartNumber response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic PartNumber read Error", error); @@ -30074,17 +29666,16 @@ class SubscribeAttributeBridgedDeviceBasicPartNumber : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePartNumberWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePartNumberWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30114,10 +29705,10 @@ class ReadBridgedDeviceBasicProductURL : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeProductURLWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ProductURL response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic ProductURL read Error", error); @@ -30141,17 +29732,16 @@ class SubscribeAttributeBridgedDeviceBasicProductURL : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeProductURLWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeProductURLWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30181,10 +29771,10 @@ class ReadBridgedDeviceBasicProductLabel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeProductLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ProductLabel response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic ProductLabel read Error", error); @@ -30208,17 +29798,16 @@ class SubscribeAttributeBridgedDeviceBasicProductLabel : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeProductLabelWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeProductLabelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30248,10 +29837,10 @@ class ReadBridgedDeviceBasicSerialNumber : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSerialNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.SerialNumber response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic SerialNumber read Error", error); @@ -30275,17 +29864,16 @@ class SubscribeAttributeBridgedDeviceBasicSerialNumber : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSerialNumberWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSerialNumberWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30315,10 +29903,10 @@ class ReadBridgedDeviceBasicReachable : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeReachableWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.Reachable response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic Reachable read Error", error); @@ -30342,17 +29930,16 @@ class SubscribeAttributeBridgedDeviceBasicReachable : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeReachableWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeReachableWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30382,10 +29969,10 @@ class ReadBridgedDeviceBasicUniqueID : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeUniqueIDWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.UniqueID response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic UniqueID read Error", error); @@ -30409,17 +29996,16 @@ class SubscribeAttributeBridgedDeviceBasicUniqueID : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUniqueIDWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUniqueIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30449,10 +30035,10 @@ class ReadBridgedDeviceBasicGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic GeneratedCommandList read Error", error); @@ -30476,17 +30062,16 @@ class SubscribeAttributeBridgedDeviceBasicGeneratedCommandList : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30516,10 +30101,10 @@ class ReadBridgedDeviceBasicAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic AcceptedCommandList read Error", error); @@ -30543,17 +30128,16 @@ class SubscribeAttributeBridgedDeviceBasicAcceptedCommandList : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30583,10 +30167,10 @@ class ReadBridgedDeviceBasicAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.AttributeList response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic AttributeList read Error", error); @@ -30610,17 +30194,16 @@ class SubscribeAttributeBridgedDeviceBasicAttributeList : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30650,10 +30233,10 @@ class ReadBridgedDeviceBasicFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic FeatureMap read Error", error); @@ -30677,17 +30260,16 @@ class SubscribeAttributeBridgedDeviceBasicFeatureMap : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30717,10 +30299,10 @@ class ReadBridgedDeviceBasicClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic ClusterRevision read Error", error); @@ -30744,17 +30326,16 @@ class SubscribeAttributeBridgedDeviceBasicClusterRevision : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30809,8 +30390,10 @@ class ReadSwitchNumberOfPositions : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPositionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNumberOfPositionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.NumberOfPositions response %@", [value description]); if (error != nil) { LogNSError("Switch NumberOfPositions read Error", error); @@ -30834,15 +30417,16 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfPositionsWithParams:params + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNumberOfPositionsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30872,8 +30456,10 @@ class ReadSwitchCurrentPosition : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentPositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.CurrentPosition response %@", [value description]); if (error != nil) { LogNSError("Switch CurrentPosition read Error", error); @@ -30897,15 +30483,16 @@ class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentPositionWithParams:params + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentPositionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30935,8 +30522,10 @@ class ReadSwitchMultiPressMax : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMultiPressMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMultiPressMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.MultiPressMax response %@", [value description]); if (error != nil) { LogNSError("Switch MultiPressMax read Error", error); @@ -30960,15 +30549,16 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMultiPressMaxWithParams:params + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMultiPressMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -30998,8 +30588,10 @@ class ReadSwitchGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Switch GeneratedCommandList read Error", error); @@ -31023,15 +30615,16 @@ class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31061,8 +30654,10 @@ class ReadSwitchAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Switch AcceptedCommandList read Error", error); @@ -31086,15 +30681,16 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31124,8 +30720,10 @@ class ReadSwitchAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Switch AttributeList read Error", error); @@ -31149,15 +30747,16 @@ class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31187,8 +30786,10 @@ class ReadSwitchFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Switch FeatureMap read Error", error); @@ -31212,15 +30813,16 @@ class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31250,8 +30852,10 @@ class ReadSwitchClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Switch ClusterRevision read Error", error); @@ -31275,15 +30879,16 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31338,9 +30943,8 @@ class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -31353,16 +30957,16 @@ class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster openCommissioningWindowWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -31388,9 +30992,8 @@ class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCom ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -31399,16 +31002,16 @@ class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCom uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -31433,9 +31036,8 @@ class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -31443,16 +31045,16 @@ class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster revokeCommissioningWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -31477,10 +31079,9 @@ class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeWindowStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning WindowStatus read Error", error); @@ -31504,17 +31105,15 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWindowStatusWithParams:params + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWindowStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31544,10 +31143,9 @@ class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning AdminFabricIndex read Error", error); @@ -31571,17 +31169,15 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAdminFabricIndexWithParams:params + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAdminFabricIndexWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31611,10 +31207,9 @@ class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning AdminVendorId read Error", error); @@ -31638,17 +31233,15 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAdminVendorIdWithParams:params + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAdminVendorIdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31678,10 +31271,9 @@ class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning GeneratedCommandList read Error", error); @@ -31705,17 +31297,15 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31745,10 +31335,9 @@ class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning AcceptedCommandList read Error", error); @@ -31772,17 +31361,15 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31812,10 +31399,9 @@ class ReadAdministratorCommissioningAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning AttributeList read Error", error); @@ -31839,17 +31425,15 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31879,10 +31463,9 @@ class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning FeatureMap read Error", error); @@ -31906,17 +31489,15 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -31946,10 +31527,9 @@ class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning ClusterRevision read Error", error); @@ -31973,17 +31553,15 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32042,9 +31620,8 @@ class OperationalCredentialsAttestationRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -32053,18 +31630,18 @@ class OperationalCredentialsAttestationRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster attestationRequestWithParams:params - completion:^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -32090,9 +31667,8 @@ class OperationalCredentialsCertificateChainRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -32101,19 +31677,19 @@ class OperationalCredentialsCertificateChainRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster certificateChainRequestWithParams:params - completion:^( - MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -32140,9 +31716,8 @@ class OperationalCredentialsCSRRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -32156,18 +31731,18 @@ class OperationalCredentialsCSRRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster CSRRequestWithParams:params - completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -32197,9 +31772,8 @@ class OperationalCredentialsAddNOC : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -32216,18 +31790,18 @@ class OperationalCredentialsAddNOC : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster addNOCWithParams:params - completion:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -32254,9 +31828,8 @@ class OperationalCredentialsUpdateNOC : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -32270,18 +31843,18 @@ class OperationalCredentialsUpdateNOC : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster updateNOCWithParams:params - completion:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -32307,9 +31880,8 @@ class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -32320,18 +31892,18 @@ class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster updateFabricLabelWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -32357,9 +31929,8 @@ class OperationalCredentialsRemoveFabric : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -32368,18 +31939,18 @@ class OperationalCredentialsRemoveFabric : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster removeFabricWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -32405,9 +31976,8 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -32416,16 +31986,16 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster addTrustedRootCertificateWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -32451,21 +32021,18 @@ class ReadOperationalCredentialsNOCs : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeNOCsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.NOCs response %@", [value description]); - if (error != nil) { - LogNSError("OperationalCredentials NOCs read Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(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; } }; @@ -32483,17 +32050,15 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNOCsWithParams:params + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNOCsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32523,21 +32088,18 @@ class ReadOperationalCredentialsFabrics : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeFabricsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); - if (error != nil) { - LogNSError("OperationalCredentials Fabrics read Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(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; } }; @@ -32555,17 +32117,15 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFabricsWithParams:params + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFabricsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32595,10 +32155,9 @@ class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeSupportedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials SupportedFabrics read Error", error); @@ -32622,17 +32181,15 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSupportedFabricsWithParams:params + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSupportedFabricsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32662,10 +32219,9 @@ class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeCommissionedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials CommissionedFabrics read Error", error); @@ -32689,17 +32245,15 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCommissionedFabricsWithParams:params + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCommissionedFabricsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32729,10 +32283,9 @@ class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTrustedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeTrustedRootCertificatesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials TrustedRootCertificates read Error", error); @@ -32756,17 +32309,15 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTrustedRootCertificatesWithParams:params + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTrustedRootCertificatesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32796,10 +32347,9 @@ class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials CurrentFabricIndex read Error", error); @@ -32823,17 +32373,15 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentFabricIndexWithParams:params + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentFabricIndexWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32863,10 +32411,9 @@ class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials GeneratedCommandList read Error", error); @@ -32890,17 +32437,15 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32930,10 +32475,9 @@ class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials AcceptedCommandList read Error", error); @@ -32957,17 +32501,15 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -32997,10 +32539,9 @@ class ReadOperationalCredentialsAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials AttributeList read Error", error); @@ -33024,17 +32565,15 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33064,10 +32603,9 @@ class ReadOperationalCredentialsFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials FeatureMap read Error", error); @@ -33091,17 +32629,15 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33131,10 +32667,9 @@ class ReadOperationalCredentialsClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials ClusterRevision read Error", error); @@ -33158,17 +32693,15 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33222,9 +32755,9 @@ class GroupKeyManagementKeySetWrite : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -33269,16 +32802,16 @@ class GroupKeyManagementKeySetWrite : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -33305,9 +32838,9 @@ class GroupKeyManagementKeySetRead : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -33316,18 +32849,18 @@ class GroupKeyManagementKeySetRead : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster keySetReadWithParams:params - completion:^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -33353,9 +32886,9 @@ class GroupKeyManagementKeySetRemove : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -33364,16 +32897,16 @@ class GroupKeyManagementKeySetRemove : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -33400,9 +32933,9 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -33420,18 +32953,18 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { while (repeatCount--) { [cluster keySetReadAllIndicesWithParams:params - completion:^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -33458,21 +32991,19 @@ class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement GroupKeyMap read Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(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; } }; @@ -33494,10 +33025,10 @@ class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -33517,12 +33048,12 @@ class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { [cluster writeAttributeGroupKeyMapWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("GroupKeyManagement GroupKeyMap write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("GroupKeyManagement GroupKeyMap write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -33546,17 +33077,16 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGroupKeyMapWithParams:params + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGroupKeyMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33586,21 +33116,19 @@ class ReadGroupKeyManagementGroupTable : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement GroupTable read Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(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; } }; @@ -33618,17 +33146,16 @@ class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGroupTableWithParams:params + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGroupTableWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33658,10 +33185,10 @@ class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxGroupsPerFabricWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement MaxGroupsPerFabric read Error", error); @@ -33685,17 +33212,16 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxGroupsPerFabricWithParams:params + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxGroupsPerFabricWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33725,10 +33251,10 @@ class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxGroupKeysPerFabricWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement MaxGroupKeysPerFabric read Error", error); @@ -33752,17 +33278,16 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxGroupKeysPerFabricWithParams:params + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33792,10 +33317,10 @@ class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement GeneratedCommandList read Error", error); @@ -33819,17 +33344,16 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33859,10 +33383,10 @@ class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement AcceptedCommandList read Error", error); @@ -33886,17 +33410,16 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33926,10 +33449,10 @@ class ReadGroupKeyManagementAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement AttributeList read Error", error); @@ -33953,17 +33476,16 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -33993,10 +33515,10 @@ class ReadGroupKeyManagementFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement FeatureMap read Error", error); @@ -34020,17 +33542,16 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34060,10 +33581,10 @@ class ReadGroupKeyManagementClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement ClusterRevision read Error", error); @@ -34087,17 +33608,16 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34143,8 +33663,10 @@ class ReadFixedLabelLabelList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.LabelList response %@", [value description]); if (error != nil) { LogNSError("FixedLabel LabelList read Error", error); @@ -34168,15 +33690,16 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLabelListWithParams:params + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLabelListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34206,8 +33729,10 @@ class ReadFixedLabelGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("FixedLabel GeneratedCommandList read Error", error); @@ -34231,15 +33756,16 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34269,8 +33795,10 @@ class ReadFixedLabelAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("FixedLabel AcceptedCommandList read Error", error); @@ -34294,15 +33822,16 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34332,8 +33861,10 @@ class ReadFixedLabelAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AttributeList response %@", [value description]); if (error != nil) { LogNSError("FixedLabel AttributeList read Error", error); @@ -34357,15 +33888,16 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34395,8 +33927,10 @@ class ReadFixedLabelFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("FixedLabel FeatureMap read Error", error); @@ -34420,15 +33954,16 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34458,8 +33993,10 @@ class ReadFixedLabelClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("FixedLabel ClusterRevision read Error", error); @@ -34483,15 +34020,16 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34537,8 +34075,10 @@ class ReadUserLabelLabelList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.LabelList response %@", [value description]); if (error != nil) { LogNSError("UserLabel LabelList read Error", error); @@ -34566,8 +34106,10 @@ class WriteUserLabelLabelList : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000041) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -34590,12 +34132,12 @@ class WriteUserLabelLabelList : public WriteAttribute { [cluster writeAttributeLabelListWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("UserLabel LabelList write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("UserLabel LabelList write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -34617,15 +34159,16 @@ class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLabelListWithParams:params + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLabelListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34655,8 +34198,10 @@ class ReadUserLabelGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("UserLabel GeneratedCommandList read Error", error); @@ -34680,15 +34225,16 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34718,8 +34264,10 @@ class ReadUserLabelAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("UserLabel AcceptedCommandList read Error", error); @@ -34743,15 +34291,16 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34781,8 +34330,10 @@ class ReadUserLabelAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AttributeList response %@", [value description]); if (error != nil) { LogNSError("UserLabel AttributeList read Error", error); @@ -34806,15 +34357,16 @@ class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34844,8 +34396,10 @@ class ReadUserLabelFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("UserLabel FeatureMap read Error", error); @@ -34869,15 +34423,16 @@ class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34907,8 +34462,10 @@ class ReadUserLabelClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("UserLabel ClusterRevision read Error", error); @@ -34932,15 +34489,16 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -34987,10 +34545,10 @@ class ReadBooleanStateStateValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeStateValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.StateValue response %@", [value description]); if (error != nil) { LogNSError("BooleanState StateValue read Error", error); @@ -35014,17 +34572,16 @@ class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStateValueWithParams:params + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStateValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35054,10 +34611,10 @@ class ReadBooleanStateGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("BooleanState GeneratedCommandList read Error", error); @@ -35081,17 +34638,16 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35121,10 +34677,10 @@ class ReadBooleanStateAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("BooleanState AcceptedCommandList read Error", error); @@ -35148,17 +34704,16 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35188,10 +34743,10 @@ class ReadBooleanStateAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AttributeList response %@", [value description]); if (error != nil) { LogNSError("BooleanState AttributeList read Error", error); @@ -35215,17 +34770,16 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35255,10 +34809,10 @@ class ReadBooleanStateFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("BooleanState FeatureMap read Error", error); @@ -35282,17 +34836,16 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35322,10 +34875,10 @@ class ReadBooleanStateClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("BooleanState ClusterRevision read Error", error); @@ -35349,17 +34902,16 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35411,7 +34963,9 @@ class ModeSelectChangeToMode : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -35420,16 +34974,16 @@ class ModeSelectChangeToMode : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -35455,8 +35009,10 @@ class ReadModeSelectDescription : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.Description response %@", [value description]); if (error != nil) { LogNSError("ModeSelect Description read Error", error); @@ -35480,15 +35036,16 @@ class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDescriptionWithParams:params + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDescriptionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35518,8 +35075,10 @@ class ReadModeSelectStandardNamespace : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeStandardNamespaceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); if (error != nil) { LogNSError("ModeSelect StandardNamespace read Error", error); @@ -35543,15 +35102,16 @@ class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStandardNamespaceWithParams:params + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStandardNamespaceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35581,8 +35141,10 @@ class ReadModeSelectSupportedModes : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.SupportedModes response %@", [value description]); if (error != nil) { LogNSError("ModeSelect SupportedModes read Error", error); @@ -35606,15 +35168,16 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSupportedModesWithParams:params + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSupportedModesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35644,8 +35207,10 @@ class ReadModeSelectCurrentMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.CurrentMode response %@", [value description]); if (error != nil) { LogNSError("ModeSelect CurrentMode read Error", error); @@ -35669,15 +35234,16 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentModeWithParams:params + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35707,8 +35273,10 @@ class ReadModeSelectStartUpMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StartUpMode response %@", [value description]); if (error != nil) { LogNSError("ModeSelect StartUpMode read Error", error); @@ -35735,8 +35303,10 @@ class WriteModeSelectStartUpMode : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000050) WriteAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -35744,12 +35314,12 @@ class WriteModeSelectStartUpMode : public WriteAttribute { [cluster writeAttributeStartUpModeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ModeSelect StartUpMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ModeSelect StartUpMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -35770,15 +35340,16 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStartUpModeWithParams:params + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStartUpModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35808,8 +35379,10 @@ class ReadModeSelectOnMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.OnMode response %@", [value description]); if (error != nil) { LogNSError("ModeSelect OnMode read Error", error); @@ -35836,8 +35409,10 @@ class WriteModeSelectOnMode : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000050) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -35845,12 +35420,12 @@ class WriteModeSelectOnMode : public WriteAttribute { [cluster writeAttributeOnModeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ModeSelect OnMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ModeSelect OnMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -35871,15 +35446,16 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOnModeWithParams:params + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOnModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35909,8 +35485,10 @@ class ReadModeSelectGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ModeSelect GeneratedCommandList read Error", error); @@ -35934,15 +35512,16 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -35972,8 +35551,10 @@ class ReadModeSelectAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ModeSelect AcceptedCommandList read Error", error); @@ -35997,15 +35578,16 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -36035,8 +35617,10 @@ class ReadModeSelectAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ModeSelect AttributeList read Error", error); @@ -36060,15 +35644,16 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -36098,8 +35683,10 @@ class ReadModeSelectFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ModeSelect FeatureMap read Error", error); @@ -36123,15 +35710,16 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -36161,8 +35749,10 @@ class ReadModeSelectClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ModeSelect ClusterRevision read Error", error); @@ -36186,15 +35776,16 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -36298,7 +35889,9 @@ class DoorLockLockDoor : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36311,16 +35904,16 @@ class DoorLockLockDoor : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster lockDoorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36346,7 +35939,9 @@ class DoorLockUnlockDoor : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36359,16 +35954,16 @@ class DoorLockUnlockDoor : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36395,7 +35990,9 @@ class DoorLockUnlockWithTimeout : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36409,16 +36006,16 @@ class DoorLockUnlockWithTimeout : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster unlockWithTimeoutWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36450,7 +36047,9 @@ class DoorLockSetWeekDaySchedule : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36465,16 +36064,16 @@ class DoorLockSetWeekDaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36501,7 +36100,9 @@ class DoorLockGetWeekDaySchedule : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36511,18 +36112,18 @@ class DoorLockGetWeekDaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -36549,7 +36150,9 @@ class DoorLockClearWeekDaySchedule : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36559,16 +36162,16 @@ class DoorLockClearWeekDaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster clearWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36597,7 +36200,9 @@ class DoorLockSetYearDaySchedule : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36609,16 +36214,16 @@ class DoorLockSetYearDaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setYearDayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36645,7 +36250,9 @@ class DoorLockGetYearDaySchedule : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36655,18 +36262,18 @@ class DoorLockGetYearDaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -36693,7 +36300,9 @@ class DoorLockClearYearDaySchedule : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36703,16 +36312,16 @@ class DoorLockClearYearDaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster clearYearDayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36741,7 +36350,9 @@ class DoorLockSetHolidaySchedule : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36753,16 +36364,16 @@ class DoorLockSetHolidaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setHolidayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36788,7 +36399,9 @@ class DoorLockGetHolidaySchedule : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36797,18 +36410,18 @@ class DoorLockGetHolidaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -36834,7 +36447,9 @@ class DoorLockClearHolidaySchedule : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36843,16 +36458,16 @@ class DoorLockClearHolidaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster clearHolidayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36884,7 +36499,9 @@ class DoorLockSetUser : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36921,16 +36538,16 @@ class DoorLockSetUser : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setUserWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36956,7 +36573,9 @@ class DoorLockGetUser : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -36965,17 +36584,17 @@ class DoorLockGetUser : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -37001,7 +36620,9 @@ class DoorLockClearUser : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -37010,16 +36631,16 @@ class DoorLockClearUser : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster clearUserWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -37051,7 +36672,9 @@ class DoorLockSetCredential : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -37080,18 +36703,18 @@ class DoorLockSetCredential : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setCredentialWithParams:params - completion:^( - MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -37119,7 +36742,9 @@ class DoorLockGetCredentialStatus : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -37131,18 +36756,18 @@ class DoorLockGetCredentialStatus : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -37170,7 +36795,9 @@ class DoorLockClearCredential : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -37186,16 +36813,16 @@ class DoorLockClearCredential : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -37223,8 +36850,10 @@ class ReadDoorLockLockState : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockState response %@", [value description]); if (error != nil) { LogNSError("DoorLock LockState read Error", error); @@ -37248,15 +36877,16 @@ class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLockStateWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLockStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37286,8 +36916,10 @@ class ReadDoorLockLockType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLockTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockType response %@", [value description]); if (error != nil) { LogNSError("DoorLock LockType read Error", error); @@ -37311,15 +36943,16 @@ class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLockTypeWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLockTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37349,8 +36982,10 @@ class ReadDoorLockActuatorEnabled : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActuatorEnabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); if (error != nil) { LogNSError("DoorLock ActuatorEnabled read Error", error); @@ -37374,15 +37009,16 @@ class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActuatorEnabledWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActuatorEnabledWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37412,8 +37048,10 @@ class ReadDoorLockDoorState : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDoorStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorState response %@", [value description]); if (error != nil) { LogNSError("DoorLock DoorState read Error", error); @@ -37437,15 +37075,16 @@ class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDoorStateWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDoorStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37475,8 +37114,10 @@ class ReadDoorLockDoorOpenEvents : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDoorOpenEventsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); if (error != nil) { LogNSError("DoorLock DoorOpenEvents read Error", error); @@ -37503,8 +37144,10 @@ class WriteDoorLockDoorOpenEvents : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -37512,12 +37155,12 @@ class WriteDoorLockDoorOpenEvents : public WriteAttribute { [cluster writeAttributeDoorOpenEventsWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock DoorOpenEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock DoorOpenEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -37538,15 +37181,16 @@ class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDoorOpenEventsWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDoorOpenEventsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37576,8 +37220,10 @@ class ReadDoorLockDoorClosedEvents : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDoorClosedEventsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); if (error != nil) { LogNSError("DoorLock DoorClosedEvents read Error", error); @@ -37604,8 +37250,10 @@ class WriteDoorLockDoorClosedEvents : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -37613,12 +37261,12 @@ class WriteDoorLockDoorClosedEvents : public WriteAttribute { [cluster writeAttributeDoorClosedEventsWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock DoorClosedEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock DoorClosedEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -37639,15 +37287,16 @@ class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDoorClosedEventsWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDoorClosedEventsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37677,8 +37326,10 @@ class ReadDoorLockOpenPeriod : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOpenPeriodWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OpenPeriod response %@", [value description]); if (error != nil) { LogNSError("DoorLock OpenPeriod read Error", error); @@ -37705,8 +37356,10 @@ class WriteDoorLockOpenPeriod : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -37714,12 +37367,12 @@ class WriteDoorLockOpenPeriod : public WriteAttribute { [cluster writeAttributeOpenPeriodWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock OpenPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock OpenPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -37740,15 +37393,16 @@ class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOpenPeriodWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOpenPeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37778,14 +37432,17 @@ class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -37803,15 +37460,16 @@ class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfTotalUsersSupportedWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37841,14 +37499,17 @@ class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -37866,15 +37527,16 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfPINUsersSupportedWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37904,14 +37566,17 @@ class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -37929,15 +37594,16 @@ class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfRFIDUsersSupportedWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -37967,8 +37633,10 @@ class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribut ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); if (error != nil) { @@ -37993,15 +37661,17 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster + subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38031,8 +37701,10 @@ class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribut ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); if (error != nil) { @@ -38057,15 +37729,17 @@ class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : publi { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster + subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38095,15 +37769,17 @@ class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -38121,15 +37797,16 @@ class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38159,8 +37836,10 @@ class ReadDoorLockMaxPINCodeLength : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxPINCodeLengthWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); if (error != nil) { LogNSError("DoorLock MaxPINCodeLength read Error", error); @@ -38184,15 +37863,16 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxPINCodeLengthWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxPINCodeLengthWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38222,8 +37902,10 @@ class ReadDoorLockMinPINCodeLength : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMinPINCodeLengthWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); if (error != nil) { LogNSError("DoorLock MinPINCodeLength read Error", error); @@ -38247,15 +37929,16 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinPINCodeLengthWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinPINCodeLengthWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38285,8 +37968,10 @@ class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxRFIDCodeLengthWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); if (error != nil) { LogNSError("DoorLock MaxRFIDCodeLength read Error", error); @@ -38310,15 +37995,16 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxRFIDCodeLengthWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxRFIDCodeLengthWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38348,8 +38034,10 @@ class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMinRFIDCodeLengthWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); if (error != nil) { LogNSError("DoorLock MinRFIDCodeLength read Error", error); @@ -38373,15 +38061,16 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinRFIDCodeLengthWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinRFIDCodeLengthWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38411,8 +38100,10 @@ class ReadDoorLockCredentialRulesSupport : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCredentialRulesSupportWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); if (error != nil) { LogNSError("DoorLock CredentialRulesSupport read Error", error); @@ -38436,15 +38127,16 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCredentialRulesSupportWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCredentialRulesSupportWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38474,8 +38166,10 @@ class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^( + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); if (error != nil) { @@ -38500,15 +38194,16 @@ class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38538,8 +38233,10 @@ class ReadDoorLockLanguage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLanguageWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.Language response %@", [value description]); if (error != nil) { LogNSError("DoorLock Language read Error", error); @@ -38566,8 +38263,10 @@ class WriteDoorLockLanguage : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -38577,12 +38276,12 @@ class WriteDoorLockLanguage : public WriteAttribute { [cluster writeAttributeLanguageWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock Language write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock Language write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -38603,15 +38302,16 @@ class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLanguageWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLanguageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38641,8 +38341,10 @@ class ReadDoorLockLEDSettings : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLEDSettingsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LEDSettings response %@", [value description]); if (error != nil) { LogNSError("DoorLock LEDSettings read Error", error); @@ -38669,8 +38371,10 @@ class WriteDoorLockLEDSettings : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -38678,12 +38382,12 @@ class WriteDoorLockLEDSettings : public WriteAttribute { [cluster writeAttributeLEDSettingsWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock LEDSettings write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock LEDSettings write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -38704,15 +38408,16 @@ class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLEDSettingsWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLEDSettingsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38742,8 +38447,10 @@ class ReadDoorLockAutoRelockTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAutoRelockTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); if (error != nil) { LogNSError("DoorLock AutoRelockTime read Error", error); @@ -38770,8 +38477,10 @@ class WriteDoorLockAutoRelockTime : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -38779,12 +38488,12 @@ class WriteDoorLockAutoRelockTime : public WriteAttribute { [cluster writeAttributeAutoRelockTimeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock AutoRelockTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock AutoRelockTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -38805,15 +38514,16 @@ class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAutoRelockTimeWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAutoRelockTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38843,8 +38553,10 @@ class ReadDoorLockSoundVolume : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSoundVolumeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SoundVolume response %@", [value description]); if (error != nil) { LogNSError("DoorLock SoundVolume read Error", error); @@ -38871,8 +38583,10 @@ class WriteDoorLockSoundVolume : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -38880,12 +38594,12 @@ class WriteDoorLockSoundVolume : public WriteAttribute { [cluster writeAttributeSoundVolumeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock SoundVolume write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock SoundVolume write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -38906,15 +38620,16 @@ class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSoundVolumeWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSoundVolumeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -38944,8 +38659,10 @@ class ReadDoorLockOperatingMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOperatingModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OperatingMode response %@", [value description]); if (error != nil) { LogNSError("DoorLock OperatingMode read Error", error); @@ -38972,8 +38689,10 @@ class WriteDoorLockOperatingMode : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -38981,12 +38700,12 @@ class WriteDoorLockOperatingMode : public WriteAttribute { [cluster writeAttributeOperatingModeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock OperatingMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock OperatingMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39007,15 +38726,16 @@ class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOperatingModeWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOperatingModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39045,14 +38765,17 @@ class ReadDoorLockSupportedOperatingModes : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -39070,15 +38793,16 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSupportedOperatingModesWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSupportedOperatingModesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39108,8 +38832,11 @@ class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDefaultConfigurationRegisterWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); if (error != nil) { LogNSError("DoorLock DefaultConfigurationRegister read Error", error); @@ -39133,15 +38860,16 @@ class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDefaultConfigurationRegisterWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDefaultConfigurationRegisterWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39171,8 +38899,10 @@ class ReadDoorLockEnableLocalProgramming : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEnableLocalProgrammingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); if (error != nil) { LogNSError("DoorLock EnableLocalProgramming read Error", error); @@ -39199,8 +38929,10 @@ class WriteDoorLockEnableLocalProgramming : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -39208,12 +38940,12 @@ class WriteDoorLockEnableLocalProgramming : public WriteAttribute { [cluster writeAttributeEnableLocalProgrammingWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableLocalProgramming write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableLocalProgramming write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39234,15 +38966,16 @@ class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEnableLocalProgrammingWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEnableLocalProgrammingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39272,8 +39005,10 @@ class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEnableOneTouchLockingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); if (error != nil) { LogNSError("DoorLock EnableOneTouchLocking read Error", error); @@ -39300,8 +39035,10 @@ class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -39309,12 +39046,12 @@ class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { [cluster writeAttributeEnableOneTouchLockingWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableOneTouchLocking write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableOneTouchLocking write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39335,15 +39072,16 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEnableOneTouchLockingWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEnableOneTouchLockingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39373,8 +39111,10 @@ class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEnableInsideStatusLEDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); if (error != nil) { LogNSError("DoorLock EnableInsideStatusLED read Error", error); @@ -39401,8 +39141,10 @@ class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -39410,12 +39152,12 @@ class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { [cluster writeAttributeEnableInsideStatusLEDWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableInsideStatusLED write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableInsideStatusLED write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39436,15 +39178,16 @@ class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEnableInsideStatusLEDWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEnableInsideStatusLEDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39474,14 +39217,17 @@ class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -39502,8 +39248,10 @@ class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -39511,12 +39259,12 @@ class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { [cluster writeAttributeEnablePrivacyModeButtonWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnablePrivacyModeButton write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnablePrivacyModeButton write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39537,15 +39285,16 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEnablePrivacyModeButtonWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEnablePrivacyModeButtonWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39575,14 +39324,17 @@ class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -39603,8 +39355,10 @@ class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -39612,12 +39366,12 @@ class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { [cluster writeAttributeLocalProgrammingFeaturesWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock LocalProgrammingFeatures write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock LocalProgrammingFeatures write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39638,15 +39392,16 @@ class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLocalProgrammingFeaturesWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLocalProgrammingFeaturesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39676,8 +39431,10 @@ class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeWrongCodeEntryLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); if (error != nil) { LogNSError("DoorLock WrongCodeEntryLimit read Error", error); @@ -39704,8 +39461,10 @@ class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -39713,12 +39472,12 @@ class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { [cluster writeAttributeWrongCodeEntryLimitWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock WrongCodeEntryLimit write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock WrongCodeEntryLimit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39739,15 +39498,16 @@ class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWrongCodeEntryLimitWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWrongCodeEntryLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39777,8 +39537,11 @@ class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); if (error != nil) { LogNSError("DoorLock UserCodeTemporaryDisableTime read Error", error); @@ -39805,22 +39568,23 @@ class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster - writeAttributeUserCodeTemporaryDisableTimeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39841,15 +39605,16 @@ class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUserCodeTemporaryDisableTimeWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39879,8 +39644,10 @@ class ReadDoorLockSendPINOverTheAir : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSendPINOverTheAirWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); if (error != nil) { LogNSError("DoorLock SendPINOverTheAir read Error", error); @@ -39907,8 +39674,10 @@ class WriteDoorLockSendPINOverTheAir : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -39916,12 +39685,12 @@ class WriteDoorLockSendPINOverTheAir : public WriteAttribute { [cluster writeAttributeSendPINOverTheAirWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock SendPINOverTheAir write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock SendPINOverTheAir write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39942,15 +39711,16 @@ class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSendPINOverTheAirWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSendPINOverTheAirWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -39980,8 +39750,11 @@ class ReadDoorLockRequirePINforRemoteOperation : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRequirePINforRemoteOperationWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); if (error != nil) { LogNSError("DoorLock RequirePINforRemoteOperation read Error", error); @@ -40008,22 +39781,23 @@ class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - [cluster - writeAttributeRequirePINforRemoteOperationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeRequirePINforRemoteOperationWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -40044,15 +39818,16 @@ class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRequirePINforRemoteOperationWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRequirePINforRemoteOperationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40082,8 +39857,10 @@ class ReadDoorLockExpiringUserTimeout : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeExpiringUserTimeoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); if (error != nil) { LogNSError("DoorLock ExpiringUserTimeout read Error", error); @@ -40110,8 +39887,10 @@ class WriteDoorLockExpiringUserTimeout : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -40119,12 +39898,12 @@ class WriteDoorLockExpiringUserTimeout : public WriteAttribute { [cluster writeAttributeExpiringUserTimeoutWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock ExpiringUserTimeout write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock ExpiringUserTimeout write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -40145,15 +39924,16 @@ class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeExpiringUserTimeoutWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeExpiringUserTimeoutWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40183,8 +39963,10 @@ class ReadDoorLockGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("DoorLock GeneratedCommandList read Error", error); @@ -40208,15 +39990,16 @@ class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40246,8 +40029,10 @@ class ReadDoorLockAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("DoorLock AcceptedCommandList read Error", error); @@ -40271,15 +40056,16 @@ class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40309,8 +40095,10 @@ class ReadDoorLockAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AttributeList response %@", [value description]); if (error != nil) { LogNSError("DoorLock AttributeList read Error", error); @@ -40334,15 +40122,16 @@ class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40372,8 +40161,10 @@ class ReadDoorLockFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("DoorLock FeatureMap read Error", error); @@ -40397,15 +40188,16 @@ class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40435,8 +40227,10 @@ class ReadDoorLockClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("DoorLock ClusterRevision read Error", error); @@ -40460,15 +40254,16 @@ class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40541,9 +40336,9 @@ class WindowCoveringUpOrOpen : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -40551,16 +40346,16 @@ class WindowCoveringUpOrOpen : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster upOrOpenWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40584,9 +40379,9 @@ class WindowCoveringDownOrClose : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -40594,16 +40389,16 @@ class WindowCoveringDownOrClose : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster downOrCloseWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40627,9 +40422,9 @@ class WindowCoveringStopMotion : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -40637,16 +40432,16 @@ class WindowCoveringStopMotion : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopMotionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40671,9 +40466,9 @@ class WindowCoveringGoToLiftValue : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -40682,16 +40477,16 @@ class WindowCoveringGoToLiftValue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster goToLiftValueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40717,9 +40512,9 @@ class WindowCoveringGoToLiftPercentage : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -40728,16 +40523,16 @@ class WindowCoveringGoToLiftPercentage : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40763,9 +40558,9 @@ class WindowCoveringGoToTiltValue : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -40774,16 +40569,16 @@ class WindowCoveringGoToTiltValue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster goToTiltValueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40809,9 +40604,9 @@ class WindowCoveringGoToTiltPercentage : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -40820,16 +40615,16 @@ class WindowCoveringGoToTiltPercentage : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40855,10 +40650,10 @@ class ReadWindowCoveringType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Type response %@", [value description]); if (error != nil) { LogNSError("WindowCovering Type read Error", error); @@ -40882,17 +40677,16 @@ class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTypeWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40922,16 +40716,17 @@ class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -40949,17 +40744,16 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePhysicalClosedLimitLiftWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePhysicalClosedLimitLiftWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -40989,16 +40783,17 @@ class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -41016,17 +40811,16 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePhysicalClosedLimitTiltWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePhysicalClosedLimitTiltWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41056,10 +40850,10 @@ class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentPositionLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); if (error != nil) { LogNSError("WindowCovering CurrentPositionLift read Error", error); @@ -41083,17 +40877,16 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentPositionLiftWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentPositionLiftWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41123,10 +40916,10 @@ class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentPositionTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); if (error != nil) { LogNSError("WindowCovering CurrentPositionTilt read Error", error); @@ -41150,17 +40943,16 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentPositionTiltWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentPositionTiltWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41190,10 +40982,10 @@ class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNumberOfActuationsLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); if (error != nil) { LogNSError("WindowCovering NumberOfActuationsLift read Error", error); @@ -41217,17 +41009,16 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfActuationsLiftWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNumberOfActuationsLiftWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41257,10 +41048,10 @@ class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNumberOfActuationsTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); if (error != nil) { LogNSError("WindowCovering NumberOfActuationsTilt read Error", error); @@ -41284,17 +41075,16 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfActuationsTiltWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNumberOfActuationsTiltWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41324,10 +41114,10 @@ class ReadWindowCoveringConfigStatus : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); if (error != nil) { LogNSError("WindowCovering ConfigStatus read Error", error); @@ -41351,17 +41141,16 @@ class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeConfigStatusWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeConfigStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41391,10 +41180,11 @@ class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); if (error != nil) { LogNSError("WindowCovering CurrentPositionLiftPercentage read Error", error); @@ -41418,17 +41208,16 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentPositionLiftPercentageWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41458,10 +41247,11 @@ class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); if (error != nil) { LogNSError("WindowCovering CurrentPositionTiltPercentage read Error", error); @@ -41485,17 +41275,16 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentPositionTiltPercentageWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41525,10 +41314,10 @@ class ReadWindowCoveringOperationalStatus : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); if (error != nil) { LogNSError("WindowCovering OperationalStatus read Error", error); @@ -41552,17 +41341,16 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOperationalStatusWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOperationalStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41592,17 +41380,17 @@ class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -41620,17 +41408,16 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public S { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTargetPositionLiftPercent100thsWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41660,17 +41447,17 @@ class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -41688,17 +41475,16 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public S { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTargetPositionTiltPercent100thsWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41728,10 +41514,10 @@ class ReadWindowCoveringEndProductType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEndProductTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.EndProductType response %@", [value description]); if (error != nil) { LogNSError("WindowCovering EndProductType read Error", error); @@ -41755,17 +41541,16 @@ class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEndProductTypeWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEndProductTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41795,17 +41580,17 @@ class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -41823,17 +41608,16 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41863,17 +41647,17 @@ class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -41891,17 +41675,16 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41931,10 +41714,10 @@ class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInstalledOpenLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); if (error != nil) { LogNSError("WindowCovering InstalledOpenLimitLift read Error", error); @@ -41958,17 +41741,16 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInstalledOpenLimitLiftWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInstalledOpenLimitLiftWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -41998,16 +41780,17 @@ class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -42025,17 +41808,16 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInstalledClosedLimitLiftWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInstalledClosedLimitLiftWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42065,10 +41847,10 @@ class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInstalledOpenLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); if (error != nil) { LogNSError("WindowCovering InstalledOpenLimitTilt read Error", error); @@ -42092,17 +41874,16 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInstalledOpenLimitTiltWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInstalledOpenLimitTiltWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42132,16 +41913,17 @@ class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -42159,17 +41941,16 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInstalledClosedLimitTiltWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInstalledClosedLimitTiltWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42199,10 +41980,10 @@ class ReadWindowCoveringMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Mode response %@", [value description]); if (error != nil) { LogNSError("WindowCovering Mode read Error", error); @@ -42229,10 +42010,10 @@ class WriteWindowCoveringMode : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000102) WriteAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -42240,12 +42021,12 @@ class WriteWindowCoveringMode : public WriteAttribute { [cluster writeAttributeModeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("WindowCovering Mode write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("WindowCovering Mode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -42266,17 +42047,16 @@ class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeModeWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42306,10 +42086,10 @@ class ReadWindowCoveringSafetyStatus : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSafetyStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); if (error != nil) { LogNSError("WindowCovering SafetyStatus read Error", error); @@ -42333,17 +42113,16 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSafetyStatusWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSafetyStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42373,10 +42152,10 @@ class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("WindowCovering GeneratedCommandList read Error", error); @@ -42400,17 +42179,16 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42440,10 +42218,10 @@ class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("WindowCovering AcceptedCommandList read Error", error); @@ -42467,17 +42245,16 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42507,10 +42284,10 @@ class ReadWindowCoveringAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AttributeList response %@", [value description]); if (error != nil) { LogNSError("WindowCovering AttributeList read Error", error); @@ -42534,17 +42311,16 @@ class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42574,10 +42350,10 @@ class ReadWindowCoveringFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("WindowCovering FeatureMap read Error", error); @@ -42601,17 +42377,16 @@ class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42641,10 +42416,10 @@ class ReadWindowCoveringClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("WindowCovering ClusterRevision read Error", error); @@ -42668,17 +42443,16 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42735,9 +42509,9 @@ class BarrierControlBarrierControlGoToPercent : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -42746,16 +42520,16 @@ class BarrierControlBarrierControlGoToPercent : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster barrierControlGoToPercentWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -42780,9 +42554,9 @@ class BarrierControlBarrierControlStop : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -42790,16 +42564,16 @@ class BarrierControlBarrierControlStop : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster barrierControlStopWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -42824,10 +42598,10 @@ class ReadBarrierControlBarrierMovingState : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBarrierMovingStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierMovingState read Error", error); @@ -42851,17 +42625,16 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBarrierMovingStateWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBarrierMovingStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42891,10 +42664,10 @@ class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBarrierSafetyStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierSafetyStatus read Error", error); @@ -42918,17 +42691,16 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBarrierSafetyStatusWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBarrierSafetyStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -42958,10 +42730,10 @@ class ReadBarrierControlBarrierCapabilities : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBarrierCapabilitiesWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierCapabilities read Error", error); @@ -42985,17 +42757,16 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBarrierCapabilitiesWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBarrierCapabilitiesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43025,10 +42796,10 @@ class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBarrierOpenEventsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierOpenEvents read Error", error); @@ -43055,10 +42826,10 @@ class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -43066,12 +42837,12 @@ class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { [cluster writeAttributeBarrierOpenEventsWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierOpenEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierOpenEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43092,17 +42863,16 @@ class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBarrierOpenEventsWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBarrierOpenEventsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43132,10 +42902,10 @@ class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBarrierCloseEventsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierCloseEvents read Error", error); @@ -43162,10 +42932,10 @@ class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -43173,12 +42943,12 @@ class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { [cluster writeAttributeBarrierCloseEventsWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCloseEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCloseEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43199,17 +42969,16 @@ class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBarrierCloseEventsWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBarrierCloseEventsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43239,16 +43008,17 @@ class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -43269,24 +43039,23 @@ class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster - writeAttributeBarrierCommandOpenEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeBarrierCommandOpenEventsWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43307,17 +43076,16 @@ class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBarrierCommandOpenEventsWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBarrierCommandOpenEventsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43347,16 +43115,17 @@ class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -43377,24 +43146,23 @@ class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster - writeAttributeBarrierCommandCloseEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeBarrierCommandCloseEventsWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43415,17 +43183,16 @@ class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBarrierCommandCloseEventsWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBarrierCommandCloseEventsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43455,10 +43222,10 @@ class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBarrierOpenPeriodWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierOpenPeriod read Error", error); @@ -43485,10 +43252,10 @@ class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -43496,12 +43263,12 @@ class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { [cluster writeAttributeBarrierOpenPeriodWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierOpenPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierOpenPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43522,17 +43289,16 @@ class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBarrierOpenPeriodWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBarrierOpenPeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43562,10 +43328,10 @@ class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBarrierClosePeriodWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierClosePeriod read Error", error); @@ -43592,10 +43358,10 @@ class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -43603,12 +43369,12 @@ class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { [cluster writeAttributeBarrierClosePeriodWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierClosePeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierClosePeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43629,17 +43395,16 @@ class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBarrierClosePeriodWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBarrierClosePeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43669,10 +43434,10 @@ class ReadBarrierControlBarrierPosition : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBarrierPositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierPosition read Error", error); @@ -43696,17 +43461,16 @@ class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBarrierPositionWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBarrierPositionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43736,10 +43500,10 @@ class ReadBarrierControlGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("BarrierControl GeneratedCommandList read Error", error); @@ -43763,17 +43527,16 @@ class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43803,10 +43566,10 @@ class ReadBarrierControlAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("BarrierControl AcceptedCommandList read Error", error); @@ -43830,17 +43593,16 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43870,10 +43632,10 @@ class ReadBarrierControlAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AttributeList response %@", [value description]); if (error != nil) { LogNSError("BarrierControl AttributeList read Error", error); @@ -43897,17 +43659,16 @@ class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -43937,10 +43698,10 @@ class ReadBarrierControlFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("BarrierControl FeatureMap read Error", error); @@ -43964,17 +43725,16 @@ class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44004,10 +43764,10 @@ class ReadBarrierControlClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("BarrierControl ClusterRevision read Error", error); @@ -44031,17 +43791,16 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44126,10 +43885,9 @@ class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMaxPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxPressure read Error", error); @@ -44153,17 +43911,15 @@ class SubscribeAttributePumpConfigurationAndControlMaxPressure : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxPressureWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxPressureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44193,10 +43949,9 @@ class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMaxSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxSpeed read Error", error); @@ -44220,17 +43975,15 @@ class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxSpeedWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxSpeedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44260,10 +44013,9 @@ class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMaxFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxFlow read Error", error); @@ -44287,17 +44039,15 @@ class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxFlowWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxFlowWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44327,10 +44077,9 @@ class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMinConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MinConstPressure read Error", error); @@ -44354,17 +44103,15 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinConstPressureWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinConstPressureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44394,10 +44141,9 @@ class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMaxConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxConstPressure read Error", error); @@ -44421,17 +44167,15 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxConstPressureWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxConstPressureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44461,10 +44205,9 @@ class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMinCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); @@ -44488,17 +44231,15 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinCompPressureWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinCompPressureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44528,10 +44269,9 @@ class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMaxCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); @@ -44555,17 +44295,15 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxCompPressureWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxCompPressureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44595,10 +44333,9 @@ class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMinConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); @@ -44622,17 +44359,15 @@ class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinConstSpeedWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinConstSpeedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44662,10 +44397,9 @@ class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMaxConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); @@ -44689,17 +44423,15 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxConstSpeedWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxConstSpeedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44729,10 +44461,9 @@ class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMinConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); @@ -44756,17 +44487,15 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinConstFlowWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinConstFlowWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44796,10 +44525,9 @@ class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMaxConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); @@ -44823,17 +44551,15 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxConstFlowWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxConstFlowWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44863,10 +44589,9 @@ class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMinConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); @@ -44890,17 +44615,15 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinConstTempWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinConstTempWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44930,10 +44653,9 @@ class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMaxConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); @@ -44957,17 +44679,15 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxConstTempWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxConstTempWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -44997,10 +44717,9 @@ class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePumpStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); @@ -45024,17 +44743,15 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePumpStatusWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePumpStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45064,10 +44781,9 @@ class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribu ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); @@ -45091,17 +44807,15 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEffectiveOperationModeWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEffectiveOperationModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45131,10 +44845,9 @@ class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); @@ -45158,17 +44871,15 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEffectiveControlModeWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEffectiveControlModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45198,10 +44909,9 @@ class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl Capacity read Error", error); @@ -45225,17 +44935,15 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCapacityWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCapacityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45265,10 +44973,9 @@ class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl Speed read Error", error); @@ -45292,17 +44999,15 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSpeedWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSpeedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45332,10 +45037,9 @@ class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); @@ -45362,24 +45066,23 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - [cluster writeAttributeLifetimeRunningHoursWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", - error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeLifetimeRunningHoursWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -45400,17 +45103,15 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLifetimeRunningHoursWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLifetimeRunningHoursWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45440,10 +45141,9 @@ class ReadPumpConfigurationAndControlPower : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl Power read Error", error); @@ -45467,17 +45167,15 @@ class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePowerWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45507,10 +45205,9 @@ class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribu ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); @@ -45537,10 +45234,9 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -45549,13 +45245,12 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri [cluster writeAttributeLifetimeEnergyConsumedWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -45576,17 +45271,15 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLifetimeEnergyConsumedWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLifetimeEnergyConsumedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45616,10 +45309,9 @@ class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl OperationMode read Error", error); @@ -45646,10 +45338,9 @@ class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -45657,12 +45348,12 @@ class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { [cluster writeAttributeOperationModeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl OperationMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl OperationMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -45683,17 +45374,15 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOperationModeWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOperationModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45723,10 +45412,9 @@ class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl ControlMode read Error", error); @@ -45753,10 +45441,9 @@ class WritePumpConfigurationAndControlControlMode : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -45764,12 +45451,12 @@ class WritePumpConfigurationAndControlControlMode : public WriteAttribute { [cluster writeAttributeControlModeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl ControlMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl ControlMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -45790,17 +45477,15 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeControlModeWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeControlModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45830,10 +45515,9 @@ class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); @@ -45857,17 +45541,15 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45897,10 +45579,9 @@ class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); @@ -45924,17 +45605,15 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -45964,10 +45643,9 @@ class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl AttributeList read Error", error); @@ -45991,17 +45669,15 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46031,10 +45707,9 @@ class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); @@ -46058,17 +45733,15 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46098,10 +45771,9 @@ class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); @@ -46125,17 +45797,15 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46234,7 +45904,9 @@ class ThermostatSetpointRaiseLower : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -46244,16 +45916,16 @@ class ThermostatSetpointRaiseLower : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setpointRaiseLowerWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -46283,7 +45955,9 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -46314,16 +45988,16 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setWeeklyScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -46353,7 +46027,9 @@ class ThermostatGetWeeklySchedule : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -46363,18 +46039,18 @@ class ThermostatGetWeeklySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getWeeklyScheduleWithParams:params - completion:^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -46399,7 +46075,9 @@ class ThermostatClearWeeklySchedule : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -46407,16 +46085,16 @@ class ThermostatClearWeeklySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster clearWeeklyScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -46441,8 +46119,10 @@ class ReadThermostatLocalTemperature : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLocalTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperature response %@", [value description]); if (error != nil) { LogNSError("Thermostat LocalTemperature read Error", error); @@ -46466,15 +46146,16 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLocalTemperatureWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLocalTemperatureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46504,8 +46185,10 @@ class ReadThermostatOutdoorTemperature : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOutdoorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); if (error != nil) { LogNSError("Thermostat OutdoorTemperature read Error", error); @@ -46529,15 +46212,16 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOutdoorTemperatureWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOutdoorTemperatureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46567,8 +46251,10 @@ class ReadThermostatOccupancy : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.Occupancy response %@", [value description]); if (error != nil) { LogNSError("Thermostat Occupancy read Error", error); @@ -46592,15 +46278,16 @@ class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOccupancyWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOccupancyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46630,14 +46317,17 @@ class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -46655,15 +46345,16 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAbsMinHeatSetpointLimitWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46693,14 +46384,17 @@ class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -46718,15 +46412,16 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46756,14 +46451,17 @@ class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -46781,15 +46479,16 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAbsMinCoolSetpointLimitWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46819,14 +46518,17 @@ class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -46844,15 +46546,16 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46882,8 +46585,10 @@ class ReadThermostatPICoolingDemand : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePICoolingDemandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); if (error != nil) { LogNSError("Thermostat PICoolingDemand read Error", error); @@ -46907,15 +46612,16 @@ class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePICoolingDemandWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePICoolingDemandWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -46945,8 +46651,10 @@ class ReadThermostatPIHeatingDemand : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePIHeatingDemandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); if (error != nil) { LogNSError("Thermostat PIHeatingDemand read Error", error); @@ -46970,15 +46678,16 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePIHeatingDemandWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePIHeatingDemandWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47008,14 +46717,17 @@ class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -47036,22 +46748,23 @@ class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster - writeAttributeHVACSystemTypeConfigurationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeHVACSystemTypeConfigurationWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47072,15 +46785,16 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47110,14 +46824,17 @@ class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -47138,22 +46855,23 @@ class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; - [cluster - writeAttributeLocalTemperatureCalibrationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat LocalTemperatureCalibration write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeLocalTemperatureCalibrationWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat LocalTemperatureCalibration write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47174,15 +46892,16 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLocalTemperatureCalibrationWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLocalTemperatureCalibrationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47212,14 +46931,17 @@ class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -47240,8 +46962,10 @@ class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -47249,12 +46973,12 @@ class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { [cluster writeAttributeOccupiedCoolingSetpointWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47275,15 +46999,16 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOccupiedCoolingSetpointWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOccupiedCoolingSetpointWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47313,14 +47038,17 @@ class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -47341,8 +47069,10 @@ class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -47350,12 +47080,12 @@ class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { [cluster writeAttributeOccupiedHeatingSetpointWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47376,15 +47106,16 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOccupiedHeatingSetpointWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOccupiedHeatingSetpointWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47414,14 +47145,17 @@ class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -47442,22 +47176,23 @@ class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - [cluster - writeAttributeUnoccupiedCoolingSetpointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47478,15 +47213,16 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUnoccupiedCoolingSetpointWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47516,14 +47252,17 @@ class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -47544,22 +47283,23 @@ class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - [cluster - writeAttributeUnoccupiedHeatingSetpointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47580,15 +47320,16 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUnoccupiedHeatingSetpointWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47618,8 +47359,10 @@ class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); if (error != nil) { LogNSError("Thermostat MinHeatSetpointLimit read Error", error); @@ -47646,8 +47389,10 @@ class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -47655,12 +47400,12 @@ class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { [cluster writeAttributeMinHeatSetpointLimitWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinHeatSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinHeatSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47681,15 +47426,16 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinHeatSetpointLimitWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinHeatSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47719,8 +47465,10 @@ class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); if (error != nil) { LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); @@ -47747,8 +47495,10 @@ class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -47756,12 +47506,12 @@ class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { [cluster writeAttributeMaxHeatSetpointLimitWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47782,15 +47532,16 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxHeatSetpointLimitWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxHeatSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47820,8 +47571,10 @@ class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); if (error != nil) { LogNSError("Thermostat MinCoolSetpointLimit read Error", error); @@ -47848,8 +47601,10 @@ class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -47857,12 +47612,12 @@ class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { [cluster writeAttributeMinCoolSetpointLimitWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinCoolSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinCoolSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47883,15 +47638,16 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinCoolSetpointLimitWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinCoolSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -47921,8 +47677,10 @@ class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); if (error != nil) { LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); @@ -47949,8 +47707,10 @@ class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -47958,12 +47718,12 @@ class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { [cluster writeAttributeMaxCoolSetpointLimitWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47984,15 +47744,16 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxCoolSetpointLimitWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxCoolSetpointLimitWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48022,8 +47783,10 @@ class ReadThermostatMinSetpointDeadBand : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); if (error != nil) { LogNSError("Thermostat MinSetpointDeadBand read Error", error); @@ -48050,8 +47813,10 @@ class WriteThermostatMinSetpointDeadBand : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -48059,12 +47824,12 @@ class WriteThermostatMinSetpointDeadBand : public WriteAttribute { [cluster writeAttributeMinSetpointDeadBandWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinSetpointDeadBand write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinSetpointDeadBand write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48085,15 +47850,16 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinSetpointDeadBandWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinSetpointDeadBandWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48123,8 +47889,10 @@ class ReadThermostatRemoteSensing : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRemoteSensingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.RemoteSensing response %@", [value description]); if (error != nil) { LogNSError("Thermostat RemoteSensing read Error", error); @@ -48151,8 +47919,10 @@ class WriteThermostatRemoteSensing : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -48160,12 +47930,12 @@ class WriteThermostatRemoteSensing : public WriteAttribute { [cluster writeAttributeRemoteSensingWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat RemoteSensing write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat RemoteSensing write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48186,15 +47956,16 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRemoteSensingWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRemoteSensingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48224,14 +47995,17 @@ class ReadThermostatControlSequenceOfOperation : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -48252,22 +48026,23 @@ class WriteThermostatControlSequenceOfOperation : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster - writeAttributeControlSequenceOfOperationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ControlSequenceOfOperation write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeControlSequenceOfOperationWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ControlSequenceOfOperation write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48288,15 +48063,16 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeControlSequenceOfOperationWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeControlSequenceOfOperationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48326,8 +48102,10 @@ class ReadThermostatSystemMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSystemModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SystemMode response %@", [value description]); if (error != nil) { LogNSError("Thermostat SystemMode read Error", error); @@ -48354,8 +48132,10 @@ class WriteThermostatSystemMode : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -48363,12 +48143,12 @@ class WriteThermostatSystemMode : public WriteAttribute { [cluster writeAttributeSystemModeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat SystemMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat SystemMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48389,15 +48169,16 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSystemModeWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSystemModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48427,8 +48208,10 @@ class ReadThermostatThermostatRunningMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeThermostatRunningModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); if (error != nil) { LogNSError("Thermostat ThermostatRunningMode read Error", error); @@ -48452,15 +48235,16 @@ class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeThermostatRunningModeWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeThermostatRunningModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48490,8 +48274,10 @@ class ReadThermostatStartOfWeek : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeStartOfWeekWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.StartOfWeek response %@", [value description]); if (error != nil) { LogNSError("Thermostat StartOfWeek read Error", error); @@ -48515,15 +48301,16 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStartOfWeekWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStartOfWeekWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48553,14 +48340,17 @@ class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -48578,15 +48368,16 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfWeeklyTransitionsWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48616,14 +48407,17 @@ class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -48641,15 +48435,16 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfDailyTransitionsWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNumberOfDailyTransitionsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48679,14 +48474,17 @@ class ReadThermostatTemperatureSetpointHold : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -48707,8 +48505,10 @@ class WriteThermostatTemperatureSetpointHold : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -48716,12 +48516,12 @@ class WriteThermostatTemperatureSetpointHold : public WriteAttribute { [cluster writeAttributeTemperatureSetpointHoldWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHold write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHold write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48742,15 +48542,16 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTemperatureSetpointHoldWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTemperatureSetpointHoldWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48780,15 +48581,17 @@ class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -48809,23 +48612,24 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster - writeAttributeTemperatureSetpointHoldDurationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", - error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeTemperatureSetpointHoldDurationWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "Thermostat TemperatureSetpointHoldDuration write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48846,15 +48650,16 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTemperatureSetpointHoldDurationWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48884,15 +48689,17 @@ class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -48913,8 +48720,10 @@ class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -48923,14 +48732,13 @@ class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute [cluster writeAttributeThermostatProgrammingOperationModeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "Thermostat ThermostatProgrammingOperationMode write Error", - error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "Thermostat ThermostatProgrammingOperationMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48951,15 +48759,16 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeThermostatProgrammingOperationModeWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -48989,8 +48798,10 @@ class ReadThermostatThermostatRunningState : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeThermostatRunningStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); if (error != nil) { LogNSError("Thermostat ThermostatRunningState read Error", error); @@ -49014,15 +48825,16 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeThermostatRunningStateWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeThermostatRunningStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49052,8 +48864,10 @@ class ReadThermostatSetpointChangeSource : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSetpointChangeSourceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); if (error != nil) { LogNSError("Thermostat SetpointChangeSource read Error", error); @@ -49077,15 +48891,16 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSetpointChangeSourceWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSetpointChangeSourceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49115,8 +48930,10 @@ class ReadThermostatSetpointChangeAmount : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSetpointChangeAmountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); if (error != nil) { LogNSError("Thermostat SetpointChangeAmount read Error", error); @@ -49140,15 +48957,16 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSetpointChangeAmountWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSetpointChangeAmountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49178,8 +48996,11 @@ class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSetpointChangeSourceTimestampWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); if (error != nil) { LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); @@ -49203,15 +49024,16 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSetpointChangeSourceTimestampWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49241,8 +49063,10 @@ class ReadThermostatOccupiedSetback : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOccupiedSetbackWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); if (error != nil) { LogNSError("Thermostat OccupiedSetback read Error", error); @@ -49269,8 +49093,10 @@ class WriteThermostatOccupiedSetback : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -49278,12 +49104,12 @@ class WriteThermostatOccupiedSetback : public WriteAttribute { [cluster writeAttributeOccupiedSetbackWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedSetback write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedSetback write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -49304,15 +49130,16 @@ class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOccupiedSetbackWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOccupiedSetbackWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49342,8 +49169,10 @@ class ReadThermostatOccupiedSetbackMin : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOccupiedSetbackMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); if (error != nil) { LogNSError("Thermostat OccupiedSetbackMin read Error", error); @@ -49367,15 +49196,16 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOccupiedSetbackMinWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOccupiedSetbackMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49405,8 +49235,10 @@ class ReadThermostatOccupiedSetbackMax : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOccupiedSetbackMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); if (error != nil) { LogNSError("Thermostat OccupiedSetbackMax read Error", error); @@ -49430,15 +49262,16 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOccupiedSetbackMaxWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOccupiedSetbackMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49468,8 +49301,10 @@ class ReadThermostatUnoccupiedSetback : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeUnoccupiedSetbackWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); if (error != nil) { LogNSError("Thermostat UnoccupiedSetback read Error", error); @@ -49496,8 +49331,10 @@ class WriteThermostatUnoccupiedSetback : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -49505,12 +49342,12 @@ class WriteThermostatUnoccupiedSetback : public WriteAttribute { [cluster writeAttributeUnoccupiedSetbackWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedSetback write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedSetback write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -49531,15 +49368,16 @@ class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUnoccupiedSetbackWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUnoccupiedSetbackWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49569,8 +49407,10 @@ class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeUnoccupiedSetbackMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); if (error != nil) { LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); @@ -49594,15 +49434,16 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUnoccupiedSetbackMinWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUnoccupiedSetbackMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49632,8 +49473,10 @@ class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000039) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeUnoccupiedSetbackMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); if (error != nil) { LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); @@ -49657,15 +49500,16 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000039) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUnoccupiedSetbackMaxWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49695,8 +49539,10 @@ class ReadThermostatEmergencyHeatDelta : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEmergencyHeatDeltaWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); if (error != nil) { LogNSError("Thermostat EmergencyHeatDelta read Error", error); @@ -49723,8 +49569,10 @@ class WriteThermostatEmergencyHeatDelta : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -49732,12 +49580,12 @@ class WriteThermostatEmergencyHeatDelta : public WriteAttribute { [cluster writeAttributeEmergencyHeatDeltaWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat EmergencyHeatDelta write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat EmergencyHeatDelta write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -49758,15 +49606,16 @@ class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEmergencyHeatDeltaWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEmergencyHeatDeltaWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49796,8 +49645,10 @@ class ReadThermostatACType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000040) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeACTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACType response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACType read Error", error); @@ -49824,8 +49675,10 @@ class WriteThermostatACType : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000040) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -49833,12 +49686,12 @@ class WriteThermostatACType : public WriteAttribute { [cluster writeAttributeACTypeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACType write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACType write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -49859,15 +49712,16 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000040) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeACTypeWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeACTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49897,8 +49751,10 @@ class ReadThermostatACCapacity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000041) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeACCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacity response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACCapacity read Error", error); @@ -49925,8 +49781,10 @@ class WriteThermostatACCapacity : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000041) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -49934,12 +49792,12 @@ class WriteThermostatACCapacity : public WriteAttribute { [cluster writeAttributeACCapacityWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCapacity write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCapacity write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -49960,15 +49818,16 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000041) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeACCapacityWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeACCapacityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -49998,8 +49857,10 @@ class ReadThermostatACRefrigerantType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000042) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeACRefrigerantTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACRefrigerantType read Error", error); @@ -50026,8 +49887,10 @@ class WriteThermostatACRefrigerantType : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000042) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -50035,12 +49898,12 @@ class WriteThermostatACRefrigerantType : public WriteAttribute { [cluster writeAttributeACRefrigerantTypeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACRefrigerantType write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACRefrigerantType write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -50061,15 +49924,16 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000042) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeACRefrigerantTypeWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeACRefrigerantTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50099,8 +49963,10 @@ class ReadThermostatACCompressorType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000043) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeACCompressorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCompressorType response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACCompressorType read Error", error); @@ -50127,8 +49993,10 @@ class WriteThermostatACCompressorType : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000043) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -50136,12 +50004,12 @@ class WriteThermostatACCompressorType : public WriteAttribute { [cluster writeAttributeACCompressorTypeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCompressorType write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCompressorType write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -50162,15 +50030,16 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000043) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeACCompressorTypeWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeACCompressorTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50200,8 +50069,10 @@ class ReadThermostatACErrorCode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000044) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeACErrorCodeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACErrorCode response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACErrorCode read Error", error); @@ -50228,8 +50099,10 @@ class WriteThermostatACErrorCode : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000044) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -50237,12 +50110,12 @@ class WriteThermostatACErrorCode : public WriteAttribute { [cluster writeAttributeACErrorCodeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACErrorCode write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACErrorCode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -50263,15 +50136,16 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000044) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeACErrorCodeWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeACErrorCodeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50301,8 +50175,10 @@ class ReadThermostatACLouverPosition : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000045) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeACLouverPositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACLouverPosition read Error", error); @@ -50329,8 +50205,10 @@ class WriteThermostatACLouverPosition : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000045) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -50338,12 +50216,12 @@ class WriteThermostatACLouverPosition : public WriteAttribute { [cluster writeAttributeACLouverPositionWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACLouverPosition write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACLouverPosition write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -50364,15 +50242,16 @@ class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000045) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeACLouverPositionWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeACLouverPositionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50402,8 +50281,10 @@ class ReadThermostatACCoilTemperature : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000046) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeACCoilTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACCoilTemperature read Error", error); @@ -50427,15 +50308,16 @@ class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000046) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeACCoilTemperatureWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeACCoilTemperatureWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50465,8 +50347,10 @@ class ReadThermostatACCapacityformat : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000047) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeACCapacityformatWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACCapacityformat read Error", error); @@ -50493,8 +50377,10 @@ class WriteThermostatACCapacityformat : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000047) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -50502,12 +50388,12 @@ class WriteThermostatACCapacityformat : public WriteAttribute { [cluster writeAttributeACCapacityformatWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCapacityformat write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCapacityformat write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -50528,15 +50414,16 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000047) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeACCapacityformatWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeACCapacityformatWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50566,8 +50453,10 @@ class ReadThermostatGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Thermostat GeneratedCommandList read Error", error); @@ -50591,15 +50480,16 @@ class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50629,8 +50519,10 @@ class ReadThermostatAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Thermostat AcceptedCommandList read Error", error); @@ -50654,15 +50546,16 @@ class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50692,8 +50585,10 @@ class ReadThermostatAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Thermostat AttributeList read Error", error); @@ -50717,15 +50612,16 @@ class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50755,8 +50651,10 @@ class ReadThermostatFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Thermostat FeatureMap read Error", error); @@ -50780,15 +50678,16 @@ class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50818,8 +50717,10 @@ class ReadThermostatClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Thermostat ClusterRevision read Error", error); @@ -50843,15 +50744,16 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -50907,8 +50809,10 @@ class ReadFanControlFanMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFanModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanMode response %@", [value description]); if (error != nil) { LogNSError("FanControl FanMode read Error", error); @@ -50935,8 +50839,10 @@ class WriteFanControlFanMode : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -50944,12 +50850,12 @@ class WriteFanControlFanMode : public WriteAttribute { [cluster writeAttributeFanModeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl FanMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl FanMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -50970,15 +50876,16 @@ class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFanModeWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFanModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51008,8 +50915,10 @@ class ReadFanControlFanModeSequence : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFanModeSequenceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanModeSequence response %@", [value description]); if (error != nil) { LogNSError("FanControl FanModeSequence read Error", error); @@ -51036,8 +50945,10 @@ class WriteFanControlFanModeSequence : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -51045,12 +50956,12 @@ class WriteFanControlFanModeSequence : public WriteAttribute { [cluster writeAttributeFanModeSequenceWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl FanModeSequence write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl FanModeSequence write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -51071,15 +50982,16 @@ class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFanModeSequenceWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFanModeSequenceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51109,8 +51021,10 @@ class ReadFanControlPercentSetting : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentSetting response %@", [value description]); if (error != nil) { LogNSError("FanControl PercentSetting read Error", error); @@ -51137,8 +51051,10 @@ class WriteFanControlPercentSetting : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -51146,12 +51062,12 @@ class WriteFanControlPercentSetting : public WriteAttribute { [cluster writeAttributePercentSettingWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl PercentSetting write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl PercentSetting write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -51172,15 +51088,16 @@ class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePercentSettingWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePercentSettingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51210,8 +51127,10 @@ class ReadFanControlPercentCurrent : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePercentCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentCurrent response %@", [value description]); if (error != nil) { LogNSError("FanControl PercentCurrent read Error", error); @@ -51235,15 +51154,16 @@ class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePercentCurrentWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePercentCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51273,8 +51193,10 @@ class ReadFanControlSpeedMax : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSpeedMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedMax response %@", [value description]); if (error != nil) { LogNSError("FanControl SpeedMax read Error", error); @@ -51298,15 +51220,16 @@ class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSpeedMaxWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSpeedMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51336,8 +51259,10 @@ class ReadFanControlSpeedSetting : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedSetting response %@", [value description]); if (error != nil) { LogNSError("FanControl SpeedSetting read Error", error); @@ -51364,8 +51289,10 @@ class WriteFanControlSpeedSetting : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -51373,12 +51300,12 @@ class WriteFanControlSpeedSetting : public WriteAttribute { [cluster writeAttributeSpeedSettingWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl SpeedSetting write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl SpeedSetting write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -51399,15 +51326,16 @@ class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSpeedSettingWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSpeedSettingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51437,8 +51365,10 @@ class ReadFanControlSpeedCurrent : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSpeedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedCurrent response %@", [value description]); if (error != nil) { LogNSError("FanControl SpeedCurrent read Error", error); @@ -51462,15 +51392,16 @@ class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSpeedCurrentWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSpeedCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51500,8 +51431,10 @@ class ReadFanControlRockSupport : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRockSupportWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSupport response %@", [value description]); if (error != nil) { LogNSError("FanControl RockSupport read Error", error); @@ -51525,15 +51458,16 @@ class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRockSupportWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRockSupportWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51563,8 +51497,10 @@ class ReadFanControlRockSetting : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRockSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSetting response %@", [value description]); if (error != nil) { LogNSError("FanControl RockSetting read Error", error); @@ -51591,8 +51527,10 @@ class WriteFanControlRockSetting : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -51600,12 +51538,12 @@ class WriteFanControlRockSetting : public WriteAttribute { [cluster writeAttributeRockSettingWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl RockSetting write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl RockSetting write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -51626,15 +51564,16 @@ class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRockSettingWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRockSettingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51664,8 +51603,10 @@ class ReadFanControlWindSupport : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeWindSupportWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSupport response %@", [value description]); if (error != nil) { LogNSError("FanControl WindSupport read Error", error); @@ -51689,15 +51630,16 @@ class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWindSupportWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWindSupportWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51727,8 +51669,10 @@ class ReadFanControlWindSetting : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeWindSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSetting response %@", [value description]); if (error != nil) { LogNSError("FanControl WindSetting read Error", error); @@ -51755,8 +51699,10 @@ class WriteFanControlWindSetting : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -51764,12 +51710,12 @@ class WriteFanControlWindSetting : public WriteAttribute { [cluster writeAttributeWindSettingWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl WindSetting write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl WindSetting write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -51790,15 +51736,16 @@ class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWindSettingWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWindSettingWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51828,8 +51775,10 @@ class ReadFanControlGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("FanControl GeneratedCommandList read Error", error); @@ -51853,15 +51802,16 @@ class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51891,8 +51841,10 @@ class ReadFanControlAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("FanControl AcceptedCommandList read Error", error); @@ -51916,15 +51868,16 @@ class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -51954,8 +51907,10 @@ class ReadFanControlAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AttributeList response %@", [value description]); if (error != nil) { LogNSError("FanControl AttributeList read Error", error); @@ -51979,15 +51934,16 @@ class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52017,8 +51973,10 @@ class ReadFanControlFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("FanControl FeatureMap read Error", error); @@ -52042,15 +52000,16 @@ class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52080,8 +52039,10 @@ class ReadFanControlClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("FanControl ClusterRevision read Error", error); @@ -52105,15 +52066,16 @@ class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52161,10 +52123,11 @@ class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public Re ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode read Error", error); @@ -52191,10 +52154,11 @@ class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public W { ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -52202,14 +52166,14 @@ class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public W [cluster writeAttributeTemperatureDisplayModeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration " - "TemperatureDisplayMode write Error", - error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ThermostatUserInterfaceConfiguration TemperatureDisplayMode write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -52230,17 +52194,17 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMo { ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTemperatureDisplayModeWithParams:params + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTemperatureDisplayModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52270,10 +52234,11 @@ class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribu ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout read Error", error); @@ -52300,24 +52265,24 @@ class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster - writeAttributeKeypadLockoutWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeKeypadLockoutWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -52338,17 +52303,17 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : publ { ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeKeypadLockoutWithParams:params + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeKeypadLockoutWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52378,10 +52343,12 @@ class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : pu ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility read Error", error); @@ -52408,10 +52375,11 @@ class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : p { ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -52419,14 +52387,14 @@ class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : p [cluster writeAttributeScheduleProgrammingVisibilityWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration " - "ScheduleProgrammingVisibility write Error", - error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration " + "ScheduleProgrammingVisibility write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -52447,17 +52415,17 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingV { ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeScheduleProgrammingVisibilityWithParams:params + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52487,10 +52455,11 @@ class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public Read ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration GeneratedCommandList read Error", error); @@ -52514,17 +52483,17 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList { ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52554,10 +52523,11 @@ class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadA ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration AcceptedCommandList read Error", error); @@ -52581,17 +52551,17 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList { ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52621,10 +52591,11 @@ class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribu ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration AttributeList read Error", error); @@ -52648,17 +52619,17 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : publ { ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52688,10 +52659,11 @@ class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration FeatureMap read Error", error); @@ -52715,17 +52687,17 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public { ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52755,10 +52727,11 @@ class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttri ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration ClusterRevision read Error", error); @@ -52782,17 +52755,17 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : pu { ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -52912,9 +52885,9 @@ class ColorControlMoveToHue : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -52927,16 +52900,16 @@ class ColorControlMoveToHue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -52965,9 +52938,9 @@ class ColorControlMoveHue : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -52979,16 +52952,16 @@ class ColorControlMoveHue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53018,9 +52991,9 @@ class ColorControlStepHue : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53033,16 +53006,16 @@ class ColorControlStepHue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stepHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53071,9 +53044,9 @@ class ColorControlMoveToSaturation : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53085,16 +53058,16 @@ class ColorControlMoveToSaturation : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53123,9 +53096,9 @@ class ColorControlMoveSaturation : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53137,16 +53110,16 @@ class ColorControlMoveSaturation : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53176,9 +53149,9 @@ class ColorControlStepSaturation : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53191,16 +53164,16 @@ class ColorControlStepSaturation : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stepSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53230,9 +53203,9 @@ class ColorControlMoveToHueAndSaturation : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53245,16 +53218,16 @@ class ColorControlMoveToHueAndSaturation : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToHueAndSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53284,9 +53257,9 @@ class ColorControlMoveToColor : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53299,16 +53272,16 @@ class ColorControlMoveToColor : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53337,9 +53310,9 @@ class ColorControlMoveColor : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53351,16 +53324,16 @@ class ColorControlMoveColor : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53390,9 +53363,9 @@ class ColorControlStepColor : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53405,16 +53378,16 @@ class ColorControlStepColor : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stepColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53443,9 +53416,9 @@ class ColorControlMoveToColorTemperature : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53457,16 +53430,16 @@ class ColorControlMoveToColorTemperature : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToColorTemperatureWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53496,9 +53469,9 @@ class ColorControlEnhancedMoveToHue : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53511,16 +53484,16 @@ class ColorControlEnhancedMoveToHue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enhancedMoveToHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53549,9 +53522,9 @@ class ColorControlEnhancedMoveHue : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53563,16 +53536,16 @@ class ColorControlEnhancedMoveHue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enhancedMoveHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53602,9 +53575,9 @@ class ColorControlEnhancedStepHue : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53617,16 +53590,16 @@ class ColorControlEnhancedStepHue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enhancedStepHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53656,9 +53629,9 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53671,16 +53644,16 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enhancedMoveToHueAndSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53712,9 +53685,9 @@ class ColorControlColorLoopSet : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterColorLoopSetParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53729,16 +53702,16 @@ class ColorControlColorLoopSet : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster colorLoopSetWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53765,9 +53738,9 @@ class ColorControlStopMoveStep : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53777,16 +53750,16 @@ class ColorControlStopMoveStep : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopMoveStepWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53817,9 +53790,9 @@ class ColorControlMoveColorTemperature : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53833,16 +53806,16 @@ class ColorControlMoveColorTemperature : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveColorTemperatureWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53874,9 +53847,9 @@ class ColorControlStepColorTemperature : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -53891,16 +53864,16 @@ class ColorControlStepColorTemperature : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stepColorTemperatureWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53926,10 +53899,10 @@ class ReadColorControlCurrentHue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentHue response %@", [value description]); if (error != nil) { LogNSError("ColorControl CurrentHue read Error", error); @@ -53953,17 +53926,16 @@ class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentHueWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentHueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -53993,10 +53965,10 @@ class ReadColorControlCurrentSaturation : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); if (error != nil) { LogNSError("ColorControl CurrentSaturation read Error", error); @@ -54020,17 +53992,16 @@ class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentSaturationWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentSaturationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54060,10 +54031,10 @@ class ReadColorControlRemainingTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.RemainingTime response %@", [value description]); if (error != nil) { LogNSError("ColorControl RemainingTime read Error", error); @@ -54087,17 +54058,16 @@ class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRemainingTimeWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRemainingTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54127,10 +54097,10 @@ class ReadColorControlCurrentX : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentX response %@", [value description]); if (error != nil) { LogNSError("ColorControl CurrentX read Error", error); @@ -54154,17 +54124,16 @@ class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentXWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentXWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54194,10 +54163,10 @@ class ReadColorControlCurrentY : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentY response %@", [value description]); if (error != nil) { LogNSError("ColorControl CurrentY read Error", error); @@ -54221,17 +54190,16 @@ class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentYWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentYWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54261,10 +54229,10 @@ class ReadColorControlDriftCompensation : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDriftCompensationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.DriftCompensation response %@", [value description]); if (error != nil) { LogNSError("ColorControl DriftCompensation read Error", error); @@ -54288,17 +54256,16 @@ class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDriftCompensationWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDriftCompensationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54328,10 +54295,10 @@ class ReadColorControlCompensationText : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCompensationTextWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CompensationText response %@", [value description]); if (error != nil) { LogNSError("ColorControl CompensationText read Error", error); @@ -54355,17 +54322,16 @@ class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCompensationTextWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCompensationTextWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54395,10 +54361,10 @@ class ReadColorControlColorTemperatureMireds : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorTemperatureMireds read Error", error); @@ -54422,17 +54388,16 @@ class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorTemperatureMiredsWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorTemperatureMiredsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54462,10 +54427,10 @@ class ReadColorControlColorMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorMode response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorMode read Error", error); @@ -54489,17 +54454,16 @@ class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorModeWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54529,10 +54493,10 @@ class ReadColorControlOptions : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Options response %@", [value description]); if (error != nil) { LogNSError("ColorControl Options read Error", error); @@ -54559,10 +54523,10 @@ class WriteColorControlOptions : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -54570,12 +54534,12 @@ class WriteColorControlOptions : public WriteAttribute { [cluster writeAttributeOptionsWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl Options write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl Options write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -54596,17 +54560,16 @@ class SubscribeAttributeColorControlOptions : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOptionsWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOptionsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54636,10 +54599,10 @@ class ReadColorControlNumberOfPrimaries : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNumberOfPrimariesWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); if (error != nil) { LogNSError("ColorControl NumberOfPrimaries read Error", error); @@ -54663,17 +54626,16 @@ class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNumberOfPrimariesWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNumberOfPrimariesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54703,10 +54665,10 @@ class ReadColorControlPrimary1X : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary1XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1X response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary1X read Error", error); @@ -54730,17 +54692,16 @@ class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary1XWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary1XWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54770,10 +54731,10 @@ class ReadColorControlPrimary1Y : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary1YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Y response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary1Y read Error", error); @@ -54797,17 +54758,16 @@ class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary1YWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary1YWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54837,10 +54797,10 @@ class ReadColorControlPrimary1Intensity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary1IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary1Intensity read Error", error); @@ -54864,17 +54824,16 @@ class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary1IntensityWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary1IntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54904,10 +54863,10 @@ class ReadColorControlPrimary2X : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary2XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2X response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary2X read Error", error); @@ -54931,17 +54890,16 @@ class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary2XWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary2XWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -54971,10 +54929,10 @@ class ReadColorControlPrimary2Y : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary2YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Y response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary2Y read Error", error); @@ -54998,17 +54956,16 @@ class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary2YWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary2YWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55038,10 +54995,10 @@ class ReadColorControlPrimary2Intensity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary2IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary2Intensity read Error", error); @@ -55065,17 +55022,16 @@ class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary2IntensityWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary2IntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55105,10 +55061,10 @@ class ReadColorControlPrimary3X : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary3XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3X response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary3X read Error", error); @@ -55132,17 +55088,16 @@ class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary3XWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary3XWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55172,10 +55127,10 @@ class ReadColorControlPrimary3Y : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary3YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Y response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary3Y read Error", error); @@ -55199,17 +55154,16 @@ class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary3YWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary3YWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55239,10 +55193,10 @@ class ReadColorControlPrimary3Intensity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary3IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary3Intensity read Error", error); @@ -55266,17 +55220,16 @@ class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary3IntensityWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary3IntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55306,10 +55259,10 @@ class ReadColorControlPrimary4X : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary4XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4X response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary4X read Error", error); @@ -55333,17 +55286,16 @@ class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary4XWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary4XWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55373,10 +55325,10 @@ class ReadColorControlPrimary4Y : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary4YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Y response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary4Y read Error", error); @@ -55400,17 +55352,16 @@ class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary4YWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary4YWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55440,10 +55391,10 @@ class ReadColorControlPrimary4Intensity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary4IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary4Intensity read Error", error); @@ -55467,17 +55418,16 @@ class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary4IntensityWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary4IntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55507,10 +55457,10 @@ class ReadColorControlPrimary5X : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary5XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5X response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary5X read Error", error); @@ -55534,17 +55484,16 @@ class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary5XWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary5XWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55574,10 +55523,10 @@ class ReadColorControlPrimary5Y : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary5YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Y response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary5Y read Error", error); @@ -55601,17 +55550,16 @@ class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary5YWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary5YWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55641,10 +55589,10 @@ class ReadColorControlPrimary5Intensity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary5IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary5Intensity read Error", error); @@ -55668,17 +55616,16 @@ class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary5IntensityWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary5IntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55708,10 +55655,10 @@ class ReadColorControlPrimary6X : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary6XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6X response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary6X read Error", error); @@ -55735,17 +55682,16 @@ class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary6XWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary6XWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55775,10 +55721,10 @@ class ReadColorControlPrimary6Y : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary6YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Y response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary6Y read Error", error); @@ -55802,17 +55748,16 @@ class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary6YWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary6YWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55842,10 +55787,10 @@ class ReadColorControlPrimary6Intensity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePrimary6IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary6Intensity read Error", error); @@ -55869,17 +55814,16 @@ class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePrimary6IntensityWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePrimary6IntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -55909,10 +55853,10 @@ class ReadColorControlWhitePointX : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeWhitePointXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointX response %@", [value description]); if (error != nil) { LogNSError("ColorControl WhitePointX read Error", error); @@ -55939,10 +55883,10 @@ class WriteColorControlWhitePointX : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -55950,12 +55894,12 @@ class WriteColorControlWhitePointX : public WriteAttribute { [cluster writeAttributeWhitePointXWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl WhitePointX write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl WhitePointX write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -55976,17 +55920,16 @@ class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWhitePointXWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWhitePointXWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56016,10 +55959,10 @@ class ReadColorControlWhitePointY : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeWhitePointYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointY response %@", [value description]); if (error != nil) { LogNSError("ColorControl WhitePointY read Error", error); @@ -56046,10 +55989,10 @@ class WriteColorControlWhitePointY : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -56057,12 +56000,12 @@ class WriteColorControlWhitePointY : public WriteAttribute { [cluster writeAttributeWhitePointYWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl WhitePointY write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl WhitePointY write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56083,17 +56026,16 @@ class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWhitePointYWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWhitePointYWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56123,10 +56065,10 @@ class ReadColorControlColorPointRX : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorPointRXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRX response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointRX read Error", error); @@ -56153,10 +56095,10 @@ class WriteColorControlColorPointRX : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -56164,12 +56106,12 @@ class WriteColorControlColorPointRX : public WriteAttribute { [cluster writeAttributeColorPointRXWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRX write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRX write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56190,17 +56132,16 @@ class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorPointRXWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorPointRXWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56230,10 +56171,10 @@ class ReadColorControlColorPointRY : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorPointRYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRY response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointRY read Error", error); @@ -56260,10 +56201,10 @@ class WriteColorControlColorPointRY : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -56271,12 +56212,12 @@ class WriteColorControlColorPointRY : public WriteAttribute { [cluster writeAttributeColorPointRYWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRY write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRY write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56297,17 +56238,16 @@ class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorPointRYWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorPointRYWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56337,10 +56277,10 @@ class ReadColorControlColorPointRIntensity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorPointRIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointRIntensity read Error", error); @@ -56367,10 +56307,10 @@ class WriteColorControlColorPointRIntensity : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -56378,12 +56318,12 @@ class WriteColorControlColorPointRIntensity : public WriteAttribute { [cluster writeAttributeColorPointRIntensityWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRIntensity write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRIntensity write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56404,17 +56344,16 @@ class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorPointRIntensityWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorPointRIntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56444,10 +56383,10 @@ class ReadColorControlColorPointGX : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorPointGXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGX response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointGX read Error", error); @@ -56474,10 +56413,10 @@ class WriteColorControlColorPointGX : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -56485,12 +56424,12 @@ class WriteColorControlColorPointGX : public WriteAttribute { [cluster writeAttributeColorPointGXWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGX write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGX write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56511,17 +56450,16 @@ class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorPointGXWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorPointGXWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56551,10 +56489,10 @@ class ReadColorControlColorPointGY : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorPointGYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGY response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointGY read Error", error); @@ -56581,10 +56519,10 @@ class WriteColorControlColorPointGY : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -56592,12 +56530,12 @@ class WriteColorControlColorPointGY : public WriteAttribute { [cluster writeAttributeColorPointGYWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGY write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGY write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56618,17 +56556,16 @@ class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorPointGYWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorPointGYWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56658,10 +56595,10 @@ class ReadColorControlColorPointGIntensity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorPointGIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointGIntensity read Error", error); @@ -56688,10 +56625,10 @@ class WriteColorControlColorPointGIntensity : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -56699,12 +56636,12 @@ class WriteColorControlColorPointGIntensity : public WriteAttribute { [cluster writeAttributeColorPointGIntensityWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGIntensity write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGIntensity write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56725,17 +56662,16 @@ class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorPointGIntensityWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorPointGIntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56765,10 +56701,10 @@ class ReadColorControlColorPointBX : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorPointBXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBX response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointBX read Error", error); @@ -56795,10 +56731,10 @@ class WriteColorControlColorPointBX : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -56806,12 +56742,12 @@ class WriteColorControlColorPointBX : public WriteAttribute { [cluster writeAttributeColorPointBXWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBX write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBX write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56832,17 +56768,16 @@ class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorPointBXWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorPointBXWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56872,10 +56807,10 @@ class ReadColorControlColorPointBY : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorPointBYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBY response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointBY read Error", error); @@ -56902,10 +56837,10 @@ class WriteColorControlColorPointBY : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -56913,12 +56848,12 @@ class WriteColorControlColorPointBY : public WriteAttribute { [cluster writeAttributeColorPointBYWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBY write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBY write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56939,17 +56874,16 @@ class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorPointBYWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorPointBYWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -56979,10 +56913,10 @@ class ReadColorControlColorPointBIntensity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorPointBIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointBIntensity read Error", error); @@ -57009,10 +56943,10 @@ class WriteColorControlColorPointBIntensity : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -57020,12 +56954,12 @@ class WriteColorControlColorPointBIntensity : public WriteAttribute { [cluster writeAttributeColorPointBIntensityWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBIntensity write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBIntensity write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -57046,17 +56980,16 @@ class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorPointBIntensityWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorPointBIntensityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57086,10 +57019,10 @@ class ReadColorControlEnhancedCurrentHue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); if (error != nil) { LogNSError("ColorControl EnhancedCurrentHue read Error", error); @@ -57113,17 +57046,16 @@ class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEnhancedCurrentHueWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEnhancedCurrentHueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57153,10 +57085,10 @@ class ReadColorControlEnhancedColorMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); if (error != nil) { LogNSError("ColorControl EnhancedColorMode read Error", error); @@ -57180,17 +57112,16 @@ class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEnhancedColorModeWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEnhancedColorModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57220,10 +57151,10 @@ class ReadColorControlColorLoopActive : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorLoopActive read Error", error); @@ -57247,17 +57178,16 @@ class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorLoopActiveWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorLoopActiveWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57287,10 +57217,10 @@ class ReadColorControlColorLoopDirection : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorLoopDirectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorLoopDirection read Error", error); @@ -57314,17 +57244,16 @@ class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorLoopDirectionWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorLoopDirectionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57354,10 +57283,10 @@ class ReadColorControlColorLoopTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorLoopTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorLoopTime read Error", error); @@ -57381,17 +57310,16 @@ class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorLoopTimeWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorLoopTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57421,16 +57349,17 @@ class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -57448,17 +57377,16 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorLoopStartEnhancedHueWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57488,16 +57416,17 @@ class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -57515,17 +57444,16 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorLoopStoredEnhancedHueWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57555,10 +57483,10 @@ class ReadColorControlColorCapabilities : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeColorCapabilitiesWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorCapabilities read Error", error); @@ -57582,17 +57510,16 @@ class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorCapabilitiesWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorCapabilitiesWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57622,16 +57549,17 @@ class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -57649,17 +57577,16 @@ class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorTempPhysicalMinMiredsWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57689,16 +57616,17 @@ class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -57716,17 +57644,16 @@ class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeColorTempPhysicalMaxMiredsWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57756,17 +57683,17 @@ class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -57784,17 +57711,16 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57824,10 +57750,11 @@ class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); if (error != nil) { LogNSError("ColorControl StartUpColorTemperatureMireds read Error", error); @@ -57854,10 +57781,10 @@ class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00004010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -57866,13 +57793,12 @@ class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { [cluster writeAttributeStartUpColorTemperatureMiredsWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ColorControl StartUpColorTemperatureMireds write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl StartUpColorTemperatureMireds write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -57893,17 +57819,16 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStartUpColorTemperatureMiredsWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -57933,10 +57858,10 @@ class ReadColorControlGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ColorControl GeneratedCommandList read Error", error); @@ -57960,17 +57885,16 @@ class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58000,10 +57924,10 @@ class ReadColorControlAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ColorControl AcceptedCommandList read Error", error); @@ -58027,17 +57951,16 @@ class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58067,10 +57990,10 @@ class ReadColorControlAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ColorControl AttributeList read Error", error); @@ -58094,17 +58017,16 @@ class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58134,10 +58056,10 @@ class ReadColorControlFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ColorControl FeatureMap read Error", error); @@ -58161,17 +58083,16 @@ class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58201,10 +58122,10 @@ class ReadColorControlClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ColorControl ClusterRevision read Error", error); @@ -58228,17 +58149,16 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58297,10 +58217,10 @@ class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePhysicalMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration PhysicalMinLevel read Error", error); @@ -58324,17 +58244,16 @@ class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePhysicalMinLevelWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePhysicalMinLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58364,10 +58283,10 @@ class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePhysicalMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration PhysicalMaxLevel read Error", error); @@ -58391,17 +58310,16 @@ class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePhysicalMaxLevelWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePhysicalMaxLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58431,10 +58349,10 @@ class ReadBallastConfigurationBallastStatus : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBallastStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration BallastStatus read Error", error); @@ -58458,17 +58376,16 @@ class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBallastStatusWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBallastStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58498,10 +58415,10 @@ class ReadBallastConfigurationMinLevel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration MinLevel read Error", error); @@ -58528,10 +58445,10 @@ class WriteBallastConfigurationMinLevel : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -58539,12 +58456,12 @@ class WriteBallastConfigurationMinLevel : public WriteAttribute { [cluster writeAttributeMinLevelWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration MinLevel write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration MinLevel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -58565,17 +58482,16 @@ class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinLevelWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58605,10 +58521,10 @@ class ReadBallastConfigurationMaxLevel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration MaxLevel read Error", error); @@ -58635,10 +58551,10 @@ class WriteBallastConfigurationMaxLevel : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -58646,12 +58562,12 @@ class WriteBallastConfigurationMaxLevel : public WriteAttribute { [cluster writeAttributeMaxLevelWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration MaxLevel write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration MaxLevel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -58672,17 +58588,16 @@ class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxLevelWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxLevelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58712,10 +58627,10 @@ class ReadBallastConfigurationIntrinsicBalanceFactor : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeIntrinsicBalanceFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeIntrinsicBalanceFactorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.IntrinsicBalanceFactor response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration IntrinsicBalanceFactor read Error", error); @@ -58742,24 +58657,23 @@ class WriteBallastConfigurationIntrinsicBalanceFactor : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster - writeAttributeIntrinsicBalanceFactorWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration IntrinsicBalanceFactor write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeIntrinsicBalanceFactorWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration IntrinsicBalanceFactor write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -58780,17 +58694,16 @@ class SubscribeAttributeBallastConfigurationIntrinsicBalanceFactor : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeIntrinsicBalanceFactorWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeIntrinsicBalanceFactorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58820,16 +58733,17 @@ class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -58850,10 +58764,10 @@ class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -58861,13 +58775,12 @@ class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { [cluster writeAttributeBallastFactorAdjustmentWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "BallastConfiguration BallastFactorAdjustment write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration BallastFactorAdjustment write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -58888,17 +58801,16 @@ class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBallastFactorAdjustmentWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBallastFactorAdjustmentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58928,10 +58840,10 @@ class ReadBallastConfigurationLampQuantity : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLampQuantityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampQuantity read Error", error); @@ -58955,17 +58867,16 @@ class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLampQuantityWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLampQuantityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -58995,10 +58906,10 @@ class ReadBallastConfigurationLampType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLampTypeWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampType response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampType read Error", error); @@ -59025,10 +58936,10 @@ class WriteBallastConfigurationLampType : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -59038,12 +58949,12 @@ class WriteBallastConfigurationLampType : public WriteAttribute { [cluster writeAttributeLampTypeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampType write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampType write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59064,17 +58975,16 @@ class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLampTypeWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLampTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59104,10 +59014,10 @@ class ReadBallastConfigurationLampManufacturer : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLampManufacturerWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampManufacturer read Error", error); @@ -59134,10 +59044,10 @@ class WriteBallastConfigurationLampManufacturer : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -59147,12 +59057,12 @@ class WriteBallastConfigurationLampManufacturer : public WriteAttribute { [cluster writeAttributeLampManufacturerWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampManufacturer write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampManufacturer write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59173,17 +59083,16 @@ class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLampManufacturerWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLampManufacturerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59213,10 +59122,10 @@ class ReadBallastConfigurationLampRatedHours : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLampRatedHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampRatedHours read Error", error); @@ -59243,10 +59152,10 @@ class WriteBallastConfigurationLampRatedHours : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -59254,12 +59163,12 @@ class WriteBallastConfigurationLampRatedHours : public WriteAttribute { [cluster writeAttributeLampRatedHoursWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampRatedHours write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampRatedHours write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59280,17 +59189,16 @@ class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLampRatedHoursWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLampRatedHoursWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59320,10 +59228,10 @@ class ReadBallastConfigurationLampBurnHours : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLampBurnHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampBurnHours read Error", error); @@ -59350,10 +59258,10 @@ class WriteBallastConfigurationLampBurnHours : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -59361,12 +59269,12 @@ class WriteBallastConfigurationLampBurnHours : public WriteAttribute { [cluster writeAttributeLampBurnHoursWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampBurnHours write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampBurnHours write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59387,17 +59295,16 @@ class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLampBurnHoursWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLampBurnHoursWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59427,10 +59334,10 @@ class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLampAlarmModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampAlarmMode read Error", error); @@ -59457,10 +59364,10 @@ class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -59468,12 +59375,12 @@ class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { [cluster writeAttributeLampAlarmModeWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampAlarmMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampAlarmMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59494,17 +59401,16 @@ class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLampAlarmModeWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLampAlarmModeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59534,10 +59440,10 @@ class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLampBurnHoursTripPointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampBurnHoursTripPoint read Error", error); @@ -59564,24 +59470,23 @@ class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - [cluster - writeAttributeLampBurnHoursTripPointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeLampBurnHoursTripPointWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59602,17 +59507,16 @@ class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLampBurnHoursTripPointWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLampBurnHoursTripPointWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59642,10 +59546,10 @@ class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration GeneratedCommandList read Error", error); @@ -59669,17 +59573,16 @@ class SubscribeAttributeBallastConfigurationGeneratedCommandList : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59709,10 +59612,10 @@ class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration AcceptedCommandList read Error", error); @@ -59736,17 +59639,16 @@ class SubscribeAttributeBallastConfigurationAcceptedCommandList : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59776,10 +59678,10 @@ class ReadBallastConfigurationAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration AttributeList read Error", error); @@ -59803,17 +59705,16 @@ class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59843,10 +59744,10 @@ class ReadBallastConfigurationFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration FeatureMap read Error", error); @@ -59870,17 +59771,16 @@ class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59910,10 +59810,10 @@ class ReadBallastConfigurationClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration ClusterRevision read Error", error); @@ -59937,17 +59837,16 @@ class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -59997,10 +59896,9 @@ class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement MeasuredValue read Error", error); @@ -60024,17 +59922,15 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasuredValueWithParams:params + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60064,10 +59960,9 @@ class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement MinMeasuredValue read Error", error); @@ -60091,17 +59986,15 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60131,10 +60024,9 @@ class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement MaxMeasuredValue read Error", error); @@ -60158,17 +60050,15 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60198,10 +60088,9 @@ class ReadIlluminanceMeasurementTolerance : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement Tolerance read Error", error); @@ -60225,17 +60114,15 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeToleranceWithParams:params + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeToleranceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60265,10 +60152,9 @@ class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeLightSensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement LightSensorType read Error", error); @@ -60292,17 +60178,15 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLightSensorTypeWithParams:params + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLightSensorTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60332,10 +60216,9 @@ class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement GeneratedCommandList read Error", error); @@ -60359,17 +60242,15 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60399,10 +60280,9 @@ class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement AcceptedCommandList read Error", error); @@ -60426,17 +60306,15 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60466,10 +60344,9 @@ class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement AttributeList read Error", error); @@ -60493,17 +60370,15 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60533,10 +60408,9 @@ class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement FeatureMap read Error", error); @@ -60560,17 +60434,15 @@ class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60600,10 +60472,9 @@ class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement ClusterRevision read Error", error); @@ -60627,17 +60498,15 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60686,10 +60555,9 @@ class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement MeasuredValue read Error", error); @@ -60713,17 +60581,15 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasuredValueWithParams:params + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60753,10 +60619,9 @@ class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement MinMeasuredValue read Error", error); @@ -60780,17 +60645,15 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60820,10 +60683,9 @@ class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement MaxMeasuredValue read Error", error); @@ -60847,17 +60709,15 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60887,10 +60747,9 @@ class ReadTemperatureMeasurementTolerance : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement Tolerance read Error", error); @@ -60914,17 +60773,15 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeToleranceWithParams:params + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeToleranceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -60954,10 +60811,9 @@ class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement GeneratedCommandList read Error", error); @@ -60981,17 +60837,15 @@ class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61021,10 +60875,9 @@ class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement AcceptedCommandList read Error", error); @@ -61048,17 +60901,15 @@ class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61088,10 +60939,9 @@ class ReadTemperatureMeasurementAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement AttributeList read Error", error); @@ -61115,17 +60965,15 @@ class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61155,10 +61003,9 @@ class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement FeatureMap read Error", error); @@ -61182,17 +61029,15 @@ class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61222,10 +61067,9 @@ class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement ClusterRevision read Error", error); @@ -61249,17 +61093,15 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61313,10 +61155,10 @@ class ReadPressureMeasurementMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement MeasuredValue read Error", error); @@ -61340,17 +61182,16 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasuredValueWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61380,10 +61221,10 @@ class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement MinMeasuredValue read Error", error); @@ -61407,17 +61248,16 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61447,10 +61287,10 @@ class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement MaxMeasuredValue read Error", error); @@ -61474,17 +61314,16 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61514,10 +61353,10 @@ class ReadPressureMeasurementTolerance : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement Tolerance read Error", error); @@ -61541,17 +61380,16 @@ class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeToleranceWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeToleranceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61581,10 +61419,10 @@ class ReadPressureMeasurementScaledValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement ScaledValue read Error", error); @@ -61608,17 +61446,16 @@ class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeScaledValueWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeScaledValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61648,10 +61485,10 @@ class ReadPressureMeasurementMinScaledValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMinScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement MinScaledValue read Error", error); @@ -61675,17 +61512,16 @@ class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinScaledValueWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinScaledValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61715,10 +61551,10 @@ class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement MaxScaledValue read Error", error); @@ -61742,17 +61578,16 @@ class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxScaledValueWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxScaledValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61782,10 +61617,10 @@ class ReadPressureMeasurementScaledTolerance : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeScaledToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement ScaledTolerance read Error", error); @@ -61809,17 +61644,16 @@ class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeScaledToleranceWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeScaledToleranceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61849,10 +61683,10 @@ class ReadPressureMeasurementScale : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeScaleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Scale response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement Scale read Error", error); @@ -61876,17 +61710,16 @@ class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeScaleWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeScaleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61916,10 +61749,10 @@ class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement GeneratedCommandList read Error", error); @@ -61943,17 +61776,16 @@ class SubscribeAttributePressureMeasurementGeneratedCommandList : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -61983,10 +61815,10 @@ class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement AcceptedCommandList read Error", error); @@ -62010,17 +61842,16 @@ class SubscribeAttributePressureMeasurementAcceptedCommandList : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62050,10 +61881,10 @@ class ReadPressureMeasurementAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement AttributeList read Error", error); @@ -62077,17 +61908,16 @@ class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62117,10 +61947,10 @@ class ReadPressureMeasurementFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement FeatureMap read Error", error); @@ -62144,17 +61974,16 @@ class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62184,10 +62013,10 @@ class ReadPressureMeasurementClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement ClusterRevision read Error", error); @@ -62211,17 +62040,16 @@ class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62270,10 +62098,10 @@ class ReadFlowMeasurementMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement MeasuredValue read Error", error); @@ -62297,17 +62125,16 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasuredValueWithParams:params + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62337,10 +62164,10 @@ class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement MinMeasuredValue read Error", error); @@ -62364,17 +62191,16 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62404,10 +62230,10 @@ class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement MaxMeasuredValue read Error", error); @@ -62431,17 +62257,16 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62471,10 +62296,10 @@ class ReadFlowMeasurementTolerance : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement Tolerance read Error", error); @@ -62498,17 +62323,16 @@ class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeToleranceWithParams:params + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeToleranceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62538,10 +62362,10 @@ class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement GeneratedCommandList read Error", error); @@ -62565,17 +62389,16 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62605,10 +62428,10 @@ class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement AcceptedCommandList read Error", error); @@ -62632,17 +62455,16 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62672,10 +62494,10 @@ class ReadFlowMeasurementAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement AttributeList read Error", error); @@ -62699,17 +62521,16 @@ class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62739,10 +62560,10 @@ class ReadFlowMeasurementFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement FeatureMap read Error", error); @@ -62766,17 +62587,16 @@ class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62806,10 +62626,10 @@ class ReadFlowMeasurementClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement ClusterRevision read Error", error); @@ -62833,17 +62653,16 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62892,10 +62711,9 @@ class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement MeasuredValue read Error", error); @@ -62919,17 +62737,15 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasuredValueWithParams:params + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -62959,10 +62775,9 @@ class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement MinMeasuredValue read Error", error); @@ -62986,17 +62801,15 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMinMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63026,10 +62839,9 @@ class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement MaxMeasuredValue read Error", error); @@ -63053,17 +62865,15 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMaxMeasuredValueWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63093,10 +62903,9 @@ class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement Tolerance read Error", error); @@ -63120,17 +62929,15 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeToleranceWithParams:params + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeToleranceWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63160,10 +62967,9 @@ class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement GeneratedCommandList read Error", error); @@ -63187,17 +62993,15 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63227,10 +63031,9 @@ class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement AcceptedCommandList read Error", error); @@ -63254,17 +63057,15 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63294,10 +63095,9 @@ class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement AttributeList read Error", error); @@ -63321,17 +63121,15 @@ class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63361,10 +63159,9 @@ class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement FeatureMap read Error", error); @@ -63388,17 +63185,15 @@ class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63428,10 +63223,9 @@ class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement ClusterRevision read Error", error); @@ -63455,17 +63249,15 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63522,10 +63314,10 @@ class ReadOccupancySensingOccupancy : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.Occupancy response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing Occupancy read Error", error); @@ -63549,17 +63341,16 @@ class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOccupancyWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOccupancyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63589,10 +63380,10 @@ class ReadOccupancySensingOccupancySensorType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing OccupancySensorType read Error", error); @@ -63616,17 +63407,16 @@ class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOccupancySensorTypeWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOccupancySensorTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63656,16 +63446,17 @@ class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -63683,17 +63474,16 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOccupancySensorTypeBitmapWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -63723,13 +63513,14 @@ class ReadOccupancySensingPirOccupiedToUnoccupiedDelay : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PirOccupiedToUnoccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay read Error", error); + LogNSError("OccupancySensing PirOccupiedToUnoccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -63753,25 +63544,24 @@ class WriteOccupancySensingPirOccupiedToUnoccupiedDelay : public WriteAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster - writeAttributePIROccupiedToUnoccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributePirOccupiedToUnoccupiedDelayWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing PirOccupiedToUnoccupiedDelay write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -63792,22 +63582,21 @@ class SubscribeAttributeOccupancySensingPirOccupiedToUnoccupiedDelay : public Su { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); + NSLog(@"OccupancySensing.PirOccupiedToUnoccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63832,13 +63621,14 @@ class ReadOccupancySensingPirUnoccupiedToOccupiedDelay : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PirUnoccupiedToOccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay read Error", error); + LogNSError("OccupancySensing PirUnoccupiedToOccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -63862,25 +63652,24 @@ class WriteOccupancySensingPirUnoccupiedToOccupiedDelay : public WriteAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster - writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributePirUnoccupiedToOccupiedDelayWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing PirUnoccupiedToOccupiedDelay write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -63901,22 +63690,21 @@ class SubscribeAttributeOccupancySensingPirUnoccupiedToOccupiedDelay : public Su { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); + NSLog(@"OccupancySensing.PirUnoccupiedToOccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63941,17 +63729,17 @@ class ReadOccupancySensingPirUnoccupiedToOccupiedThreshold : public ReadAttribut ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -63972,25 +63760,25 @@ class WriteOccupancySensingPirUnoccupiedToOccupiedThreshold : public WriteAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value + [cluster writeAttributePirUnoccupiedToOccupiedThresholdWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "PIRUnoccupiedToOccupiedThreshold write Error", - error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing PirUnoccupiedToOccupiedThreshold write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64011,22 +63799,21 @@ class SubscribeAttributeOccupancySensingPirUnoccupiedToOccupiedThreshold : publi { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); + NSLog(@"OccupancySensing.PirUnoccupiedToOccupiedThreshold response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64051,10 +63838,10 @@ class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttri ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^( + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); if (error != nil) { @@ -64082,10 +63869,10 @@ class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -64094,14 +63881,14 @@ class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAtt [cluster writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "UltrasonicOccupiedToUnoccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing UltrasonicOccupiedToUnoccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64122,17 +63909,16 @@ class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : pu { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64162,10 +63948,10 @@ class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttri ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^( + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); if (error != nil) { @@ -64193,10 +63979,10 @@ class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -64205,14 +63991,14 @@ class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAtt [cluster writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "UltrasonicUnoccupiedToOccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing UltrasonicUnoccupiedToOccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64233,17 +64019,16 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : pu { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64273,10 +64058,10 @@ class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadA ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); if (error != nil) { @@ -64304,10 +64089,10 @@ class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public Writ { ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -64316,15 +64101,14 @@ class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public Writ [cluster writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing " + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " "UltrasonicUnoccupiedToOccupiedThreshold write Error", - error); - } - SetCommandExitStatus(error); - }]; + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64345,17 +64129,17 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster + subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64385,10 +64169,10 @@ class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Read ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); if (error != nil) { @@ -64416,10 +64200,10 @@ class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Wri { ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -64428,15 +64212,14 @@ class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Wri [cluster writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing " + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " "PhysicalContactOccupiedToUnoccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64457,17 +64240,17 @@ class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster + subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64497,10 +64280,10 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Read ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); if (error != nil) { @@ -64528,10 +64311,10 @@ class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Wri { ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -64540,15 +64323,14 @@ class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Wri [cluster writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing " + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " "PhysicalContactUnoccupiedToOccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64569,17 +64351,17 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster + subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64609,10 +64391,10 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); if (error != nil) { @@ -64640,10 +64422,10 @@ class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public { ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -64651,15 +64433,15 @@ class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public [cluster writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "PhysicalContactUnoccupiedToOccupiedTh" - "reshold write Error", - error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "PhysicalContactUnoccupiedToOccupiedThreshold" + " write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64680,17 +64462,18 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThres { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster + subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:[NSNumber + numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64720,10 +64503,10 @@ class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing GeneratedCommandList read Error", error); @@ -64747,17 +64530,16 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64787,10 +64569,10 @@ class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing AcceptedCommandList read Error", error); @@ -64814,17 +64596,16 @@ class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64854,10 +64635,10 @@ class ReadOccupancySensingAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AttributeList response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing AttributeList read Error", error); @@ -64881,17 +64662,16 @@ class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64921,10 +64701,10 @@ class ReadOccupancySensingFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing FeatureMap read Error", error); @@ -64948,17 +64728,16 @@ class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -64988,10 +64767,10 @@ class ReadOccupancySensingClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing ClusterRevision read Error", error); @@ -65015,17 +64794,16 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65071,11 +64849,13 @@ class ReadWakeOnLanMACAddress : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMACAddressWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLan.MACAddress response %@", [value description]); if (error != nil) { - LogNSError("WakeOnLAN MACAddress read Error", error); + LogNSError("WakeOnLan MACAddress read Error", error); } SetCommandExitStatus(error); }]; @@ -65096,20 +64876,21 @@ class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMACAddressWithParams:params + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMACAddressWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); + NSLog(@"WakeOnLan.MACAddress response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65134,11 +64915,13 @@ class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLan.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("WakeOnLAN GeneratedCommandList read Error", error); + LogNSError("WakeOnLan GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -65159,20 +64942,21 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); + NSLog(@"WakeOnLan.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65197,11 +64981,13 @@ class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLan.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("WakeOnLAN AcceptedCommandList read Error", error); + LogNSError("WakeOnLan AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -65222,20 +65008,21 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); + NSLog(@"WakeOnLan.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65260,11 +65047,13 @@ class ReadWakeOnLanAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLan.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("WakeOnLAN AttributeList read Error", error); + LogNSError("WakeOnLan AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -65285,20 +65074,21 @@ class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); + NSLog(@"WakeOnLan.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65323,11 +65113,13 @@ class ReadWakeOnLanFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLan.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("WakeOnLAN FeatureMap read Error", error); + LogNSError("WakeOnLan FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -65348,20 +65140,21 @@ class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); + NSLog(@"WakeOnLan.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65386,11 +65179,13 @@ class ReadWakeOnLanClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLan.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("WakeOnLAN ClusterRevision read Error", error); + LogNSError("WakeOnLan ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -65411,20 +65206,21 @@ class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); + NSLog(@"WakeOnLan.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65470,7 +65266,9 @@ class ChannelChangeChannel : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRChannelClusterChangeChannelParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -65481,18 +65279,18 @@ class ChannelChangeChannel : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeChannelWithParams:params - completion:^( - MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -65519,7 +65317,9 @@ class ChannelChangeChannelByNumber : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -65529,16 +65329,16 @@ class ChannelChangeChannelByNumber : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeChannelByNumberWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -65564,7 +65364,9 @@ class ChannelSkipChannel : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -65573,16 +65375,16 @@ class ChannelSkipChannel : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster skipChannelWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -65608,8 +65410,10 @@ class ReadChannelChannelList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ChannelList response %@", [value description]); if (error != nil) { LogNSError("Channel ChannelList read Error", error); @@ -65633,15 +65437,16 @@ class SubscribeAttributeChannelChannelList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeChannelListWithParams:params + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeChannelListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65671,14 +65476,17 @@ class ReadChannelLineup : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -65696,15 +65504,16 @@ class SubscribeAttributeChannelLineup : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLineupWithParams:params + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLineupWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65734,15 +65543,17 @@ class ReadChannelCurrentChannel : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [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); - }]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -65760,15 +65571,16 @@ class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentChannelWithParams:params + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentChannelWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65798,8 +65610,10 @@ class ReadChannelGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Channel GeneratedCommandList read Error", error); @@ -65823,15 +65637,16 @@ class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65861,8 +65676,10 @@ class ReadChannelAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Channel AcceptedCommandList read Error", error); @@ -65886,15 +65703,16 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65924,8 +65742,10 @@ class ReadChannelAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Channel AttributeList read Error", error); @@ -65949,15 +65769,16 @@ class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -65987,8 +65808,10 @@ class ReadChannelFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Channel FeatureMap read Error", error); @@ -66012,15 +65835,16 @@ class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66050,8 +65874,10 @@ class ReadChannelClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Channel ClusterRevision read Error", error); @@ -66075,15 +65901,16 @@ class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66132,9 +65959,9 @@ class TargetNavigatorNavigateTarget : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000505) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -66150,18 +65977,18 @@ class TargetNavigatorNavigateTarget : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster navigateTargetWithParams:params - completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -66187,10 +66014,10 @@ class ReadTargetNavigatorTargetList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.TargetList response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator TargetList read Error", error); @@ -66214,17 +66041,16 @@ class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTargetListWithParams:params + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTargetListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66254,10 +66080,10 @@ class ReadTargetNavigatorCurrentTarget : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator CurrentTarget read Error", error); @@ -66281,17 +66107,16 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentTargetWithParams:params + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentTargetWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66321,10 +66146,10 @@ class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator GeneratedCommandList read Error", error); @@ -66348,17 +66173,16 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66388,10 +66212,10 @@ class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator AcceptedCommandList read Error", error); @@ -66415,17 +66239,16 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66455,10 +66278,10 @@ class ReadTargetNavigatorAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AttributeList response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator AttributeList read Error", error); @@ -66482,17 +66305,16 @@ class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66522,10 +66344,10 @@ class ReadTargetNavigatorFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator FeatureMap read Error", error); @@ -66549,17 +66371,16 @@ class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66589,10 +66410,10 @@ class ReadTargetNavigatorClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator ClusterRevision read Error", error); @@ -66616,17 +66437,16 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -66688,9 +66508,9 @@ class MediaPlaybackPlay : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaPlaybackClusterPlayParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -66698,17 +66518,17 @@ class MediaPlaybackPlay : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster playWithParams: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); - } - }]; + completionHandler:^(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; } @@ -66732,9 +66552,9 @@ class MediaPlaybackPause : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaPlaybackClusterPauseParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -66742,18 +66562,18 @@ class MediaPlaybackPause : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster - 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); - } - }]; + 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); + } + }]; } return CHIP_NO_ERROR; } @@ -66777,9 +66597,9 @@ class MediaPlaybackStopPlayback : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaPlaybackClusterStopPlaybackParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -66787,18 +66607,18 @@ class MediaPlaybackStopPlayback : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopPlaybackWithParams: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); - } - }]; + completionHandler:^( + 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; } @@ -66822,9 +66642,9 @@ class MediaPlaybackStartOver : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -66833,17 +66653,17 @@ class MediaPlaybackStartOver : public ClusterCommand { while (repeatCount--) { [cluster startOverWithParams: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); - } - }]; + completionHandler:^(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; } @@ -66867,9 +66687,9 @@ class MediaPlaybackPrevious : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -66878,17 +66698,17 @@ class MediaPlaybackPrevious : public ClusterCommand { while (repeatCount--) { [cluster previousWithParams: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); - } - }]; + completionHandler:^(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; } @@ -66912,9 +66732,9 @@ class MediaPlaybackNext : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaPlaybackClusterNextParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -66922,17 +66742,17 @@ class MediaPlaybackNext : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster nextWithParams: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); - } - }]; + completionHandler:^(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; } @@ -66956,9 +66776,9 @@ class MediaPlaybackRewind : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaPlaybackClusterRewindParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -66966,18 +66786,18 @@ class MediaPlaybackRewind : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster - 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); - } - }]; + 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); + } + }]; } return CHIP_NO_ERROR; } @@ -67001,9 +66821,9 @@ class MediaPlaybackFastForward : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -67011,18 +66831,18 @@ class MediaPlaybackFastForward : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster fastForwardWithParams: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); - } - }]; + completionHandler:^( + 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; } @@ -67047,9 +66867,9 @@ class MediaPlaybackSkipForward : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -67058,18 +66878,18 @@ class MediaPlaybackSkipForward : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster skipForwardWithParams: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); - } - }]; + completionHandler:^( + 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; } @@ -67095,9 +66915,9 @@ class MediaPlaybackSkipBackward : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -67106,18 +66926,18 @@ class MediaPlaybackSkipBackward : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster skipBackwardWithParams: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); - } - }]; + completionHandler:^( + 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; } @@ -67143,9 +66963,9 @@ class MediaPlaybackSeek : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -67154,17 +66974,17 @@ class MediaPlaybackSeek : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster seekWithParams: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); - } - }]; + completionHandler:^(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; } @@ -67190,10 +67010,10 @@ class ReadMediaPlaybackCurrentState : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.CurrentState response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback CurrentState read Error", error); @@ -67217,17 +67037,16 @@ class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentStateWithParams:params + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentStateWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67257,10 +67076,10 @@ class ReadMediaPlaybackStartTime : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeStartTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.StartTime response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback StartTime read Error", error); @@ -67284,17 +67103,16 @@ class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStartTimeWithParams:params + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStartTimeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67324,10 +67142,10 @@ class ReadMediaPlaybackDuration : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDurationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.Duration response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback Duration read Error", error); @@ -67351,17 +67169,16 @@ class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDurationWithParams:params + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDurationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67391,10 +67208,10 @@ class ReadMediaPlaybackSampledPosition : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSampledPositionWithCompletion:^( + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSampledPositionWithCompletionHandler:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); if (error != nil) { @@ -67419,17 +67236,16 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSampledPositionWithParams:params + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSampledPositionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67459,10 +67275,10 @@ class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback PlaybackSpeed read Error", error); @@ -67486,17 +67302,16 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePlaybackSpeedWithParams:params + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePlaybackSpeedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67526,10 +67341,10 @@ class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSeekRangeEndWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback SeekRangeEnd read Error", error); @@ -67553,17 +67368,16 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSeekRangeEndWithParams:params + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSeekRangeEndWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67593,10 +67407,10 @@ class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeSeekRangeStartWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback SeekRangeStart read Error", error); @@ -67620,17 +67434,16 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSeekRangeStartWithParams:params + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSeekRangeStartWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67660,10 +67473,10 @@ class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback GeneratedCommandList read Error", error); @@ -67687,17 +67500,16 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67727,10 +67539,10 @@ class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback AcceptedCommandList read Error", error); @@ -67754,17 +67566,16 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67794,10 +67605,10 @@ class ReadMediaPlaybackAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AttributeList response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback AttributeList read Error", error); @@ -67821,17 +67632,16 @@ class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67861,10 +67671,10 @@ class ReadMediaPlaybackFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback FeatureMap read Error", error); @@ -67888,17 +67698,16 @@ class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -67928,10 +67737,10 @@ class ReadMediaPlaybackClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback ClusterRevision read Error", error); @@ -67955,17 +67764,16 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68016,7 +67824,9 @@ class MediaInputSelectInput : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -68025,16 +67835,16 @@ class MediaInputSelectInput : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster selectInputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68059,7 +67869,9 @@ class MediaInputShowInputStatus : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -68067,16 +67879,16 @@ class MediaInputShowInputStatus : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster showInputStatusWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68100,7 +67912,9 @@ class MediaInputHideInputStatus : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -68108,16 +67922,16 @@ class MediaInputHideInputStatus : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster hideInputStatusWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68143,7 +67957,9 @@ class MediaInputRenameInput : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -68155,16 +67971,16 @@ class MediaInputRenameInput : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster renameInputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68190,8 +68006,10 @@ class ReadMediaInputInputList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.InputList response %@", [value description]); if (error != nil) { LogNSError("MediaInput InputList read Error", error); @@ -68215,15 +68033,16 @@ class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInputListWithParams:params + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInputListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68253,8 +68072,10 @@ class ReadMediaInputCurrentInput : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentInputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.CurrentInput response %@", [value description]); if (error != nil) { LogNSError("MediaInput CurrentInput read Error", error); @@ -68278,15 +68099,16 @@ class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentInputWithParams:params + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentInputWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68316,8 +68138,10 @@ class ReadMediaInputGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("MediaInput GeneratedCommandList read Error", error); @@ -68341,15 +68165,16 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68379,8 +68204,10 @@ class ReadMediaInputAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("MediaInput AcceptedCommandList read Error", error); @@ -68404,15 +68231,16 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68442,8 +68270,10 @@ class ReadMediaInputAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AttributeList response %@", [value description]); if (error != nil) { LogNSError("MediaInput AttributeList read Error", error); @@ -68467,15 +68297,16 @@ class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68505,8 +68336,10 @@ class ReadMediaInputFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("MediaInput FeatureMap read Error", error); @@ -68530,15 +68363,16 @@ class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68568,8 +68402,10 @@ class ReadMediaInputClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("MediaInput ClusterRevision read Error", error); @@ -68593,15 +68429,16 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68646,7 +68483,9 @@ class LowPowerSleep : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000508) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRLowPowerClusterSleepParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -68654,16 +68493,16 @@ class LowPowerSleep : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster sleepWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68688,8 +68527,10 @@ class ReadLowPowerGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("LowPower GeneratedCommandList read Error", error); @@ -68713,15 +68554,16 @@ class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68751,8 +68593,10 @@ class ReadLowPowerAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("LowPower AcceptedCommandList read Error", error); @@ -68776,15 +68620,16 @@ class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68814,8 +68659,10 @@ class ReadLowPowerAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AttributeList response %@", [value description]); if (error != nil) { LogNSError("LowPower AttributeList read Error", error); @@ -68839,15 +68686,16 @@ class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68877,8 +68725,10 @@ class ReadLowPowerFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("LowPower FeatureMap read Error", error); @@ -68902,15 +68752,16 @@ class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -68940,8 +68791,10 @@ class ReadLowPowerClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("LowPower ClusterRevision read Error", error); @@ -68965,15 +68818,16 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69019,9 +68873,9 @@ class KeypadInputSendKey : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000509) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -69030,17 +68884,17 @@ class KeypadInputSendKey : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -69066,10 +68920,10 @@ class ReadKeypadInputGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("KeypadInput GeneratedCommandList read Error", error); @@ -69093,17 +68947,16 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69133,10 +68986,10 @@ class ReadKeypadInputAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("KeypadInput AcceptedCommandList read Error", error); @@ -69160,17 +69013,16 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69200,10 +69052,10 @@ class ReadKeypadInputAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AttributeList response %@", [value description]); if (error != nil) { LogNSError("KeypadInput AttributeList read Error", error); @@ -69227,17 +69079,16 @@ class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69267,10 +69118,10 @@ class ReadKeypadInputFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("KeypadInput FeatureMap read Error", error); @@ -69294,17 +69145,16 @@ class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69334,10 +69184,10 @@ class ReadKeypadInputClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("KeypadInput ClusterRevision read Error", error); @@ -69361,17 +69211,16 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69423,9 +69272,9 @@ class ContentLauncherLaunchContent : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -69474,18 +69323,18 @@ class ContentLauncherLaunchContent : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster launchContentWithParams:params - completion:^( - MTRContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -69515,9 +69364,9 @@ class ContentLauncherLaunchURL : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -69710,17 +69559,17 @@ class ContentLauncherLaunchURL : public ClusterCommand { while (repeatCount--) { [cluster launchURLWithParams:params - completion:^(MTRContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -69748,10 +69597,10 @@ class ReadContentLauncherAcceptHeader : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptHeaderWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); if (error != nil) { LogNSError("ContentLauncher AcceptHeader read Error", error); @@ -69775,17 +69624,16 @@ class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptHeaderWithParams:params + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptHeaderWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69815,16 +69663,17 @@ class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -69845,10 +69694,10 @@ class WriteContentLauncherSupportedStreamingProtocols : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -69857,13 +69706,12 @@ class WriteContentLauncherSupportedStreamingProtocols : public WriteAttribute { [cluster writeAttributeSupportedStreamingProtocolsWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ContentLauncher SupportedStreamingProtocols write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ContentLauncher SupportedStreamingProtocols write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -69884,17 +69732,16 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeSupportedStreamingProtocolsWithParams:params + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeSupportedStreamingProtocolsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69924,10 +69771,10 @@ class ReadContentLauncherGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ContentLauncher GeneratedCommandList read Error", error); @@ -69951,17 +69798,16 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -69991,10 +69837,10 @@ class ReadContentLauncherAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ContentLauncher AcceptedCommandList read Error", error); @@ -70018,17 +69864,16 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70058,10 +69903,10 @@ class ReadContentLauncherAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ContentLauncher AttributeList read Error", error); @@ -70085,17 +69930,16 @@ class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70125,10 +69969,10 @@ class ReadContentLauncherFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ContentLauncher FeatureMap read Error", error); @@ -70152,17 +69996,16 @@ class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70192,10 +70035,10 @@ class ReadContentLauncherClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ContentLauncher ClusterRevision read Error", error); @@ -70219,17 +70062,16 @@ class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70278,9 +70120,9 @@ class AudioOutputSelectOutput : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -70289,16 +70131,16 @@ class AudioOutputSelectOutput : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster selectOutputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -70325,9 +70167,9 @@ class AudioOutputRenameOutput : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -70339,16 +70181,16 @@ class AudioOutputRenameOutput : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster renameOutputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -70374,10 +70216,10 @@ class ReadAudioOutputOutputList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.OutputList response %@", [value description]); if (error != nil) { LogNSError("AudioOutput OutputList read Error", error); @@ -70401,17 +70243,16 @@ class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOutputListWithParams:params + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOutputListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70441,10 +70282,10 @@ class ReadAudioOutputCurrentOutput : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentOutputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); if (error != nil) { LogNSError("AudioOutput CurrentOutput read Error", error); @@ -70468,17 +70309,16 @@ class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentOutputWithParams:params + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentOutputWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70508,10 +70348,10 @@ class ReadAudioOutputGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("AudioOutput GeneratedCommandList read Error", error); @@ -70535,17 +70375,16 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70575,10 +70414,10 @@ class ReadAudioOutputAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("AudioOutput AcceptedCommandList read Error", error); @@ -70602,17 +70441,16 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70642,10 +70480,10 @@ class ReadAudioOutputAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AttributeList response %@", [value description]); if (error != nil) { LogNSError("AudioOutput AttributeList read Error", error); @@ -70669,17 +70507,16 @@ class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70709,10 +70546,10 @@ class ReadAudioOutputFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("AudioOutput FeatureMap read Error", error); @@ -70736,17 +70573,16 @@ class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70776,10 +70612,10 @@ class ReadAudioOutputClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("AudioOutput ClusterRevision read Error", error); @@ -70803,17 +70639,16 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -70865,9 +70700,9 @@ class ApplicationLauncherLaunchApp : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -70885,18 +70720,18 @@ class ApplicationLauncherLaunchApp : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster launchAppWithParams:params - completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -70924,9 +70759,9 @@ class ApplicationLauncherStopApp : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -70939,18 +70774,18 @@ class ApplicationLauncherStopApp : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopAppWithParams:params - completion:^( - MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -70978,9 +70813,9 @@ class ApplicationLauncherHideApp : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -70993,18 +70828,18 @@ class ApplicationLauncherHideApp : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster hideAppWithParams:params - completion:^( - MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -71031,10 +70866,10 @@ class ReadApplicationLauncherCatalogList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCatalogListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); if (error != nil) { LogNSError("ApplicationLauncher CatalogList read Error", error); @@ -71058,17 +70893,16 @@ class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCatalogListWithParams:params + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCatalogListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71098,10 +70932,10 @@ class ReadApplicationLauncherCurrentApp : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentAppWithCompletion:^( + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentAppWithCompletionHandler:^( MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); if (error != nil) { @@ -71130,10 +70964,10 @@ class WriteApplicationLauncherCurrentApp : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -71156,12 +70990,12 @@ class WriteApplicationLauncherCurrentApp : public WriteAttribute { [cluster writeAttributeCurrentAppWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ApplicationLauncher CurrentApp write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ApplicationLauncher CurrentApp write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -71184,17 +71018,16 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentAppWithParams:params + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentAppWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71224,10 +71057,10 @@ class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ApplicationLauncher GeneratedCommandList read Error", error); @@ -71251,17 +71084,16 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71291,10 +71123,10 @@ class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ApplicationLauncher AcceptedCommandList read Error", error); @@ -71318,17 +71150,16 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71358,10 +71189,10 @@ class ReadApplicationLauncherAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ApplicationLauncher AttributeList read Error", error); @@ -71385,17 +71216,16 @@ class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71425,10 +71255,10 @@ class ReadApplicationLauncherFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ApplicationLauncher FeatureMap read Error", error); @@ -71452,17 +71282,16 @@ class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71492,10 +71321,10 @@ class ReadApplicationLauncherClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ApplicationLauncher ClusterRevision read Error", error); @@ -71519,17 +71348,16 @@ class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71582,10 +71410,10 @@ class ReadApplicationBasicVendorName : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorName response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic VendorName read Error", error); @@ -71609,17 +71437,16 @@ class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeVendorNameWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeVendorNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71649,10 +71476,10 @@ class ReadApplicationBasicVendorID : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorID response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic VendorID read Error", error); @@ -71676,17 +71503,16 @@ class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeVendorIDWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeVendorIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71716,10 +71542,10 @@ class ReadApplicationBasicApplicationName : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeApplicationNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic ApplicationName read Error", error); @@ -71743,17 +71569,16 @@ class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeApplicationNameWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeApplicationNameWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71783,10 +71608,10 @@ class ReadApplicationBasicProductID : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ProductID response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic ProductID read Error", error); @@ -71810,17 +71635,16 @@ class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeProductIDWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeProductIDWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71850,10 +71674,10 @@ class ReadApplicationBasicApplication : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeApplicationWithCompletion:^( + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeApplicationWithCompletionHandler:^( MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Application response %@", [value description]); if (error != nil) { @@ -71878,17 +71702,16 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeApplicationWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeApplicationWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71918,10 +71741,10 @@ class ReadApplicationBasicStatus : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Status response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic Status read Error", error); @@ -71945,17 +71768,16 @@ class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStatusWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStatusWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -71985,10 +71807,10 @@ class ReadApplicationBasicApplicationVersion : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeApplicationVersionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic ApplicationVersion read Error", error); @@ -72012,17 +71834,16 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeApplicationVersionWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeApplicationVersionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72052,10 +71873,10 @@ class ReadApplicationBasicAllowedVendorList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAllowedVendorListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic AllowedVendorList read Error", error); @@ -72079,17 +71900,16 @@ class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAllowedVendorListWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAllowedVendorListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72119,10 +71939,10 @@ class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic GeneratedCommandList read Error", error); @@ -72146,17 +71966,16 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72186,10 +72005,10 @@ class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic AcceptedCommandList read Error", error); @@ -72213,17 +72032,16 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72253,10 +72071,10 @@ class ReadApplicationBasicAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic AttributeList read Error", error); @@ -72280,17 +72098,16 @@ class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72320,10 +72137,10 @@ class ReadApplicationBasicFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic FeatureMap read Error", error); @@ -72347,17 +72164,16 @@ class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72387,10 +72203,10 @@ class ReadApplicationBasicClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic ClusterRevision read Error", error); @@ -72414,17 +72230,16 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72472,9 +72287,9 @@ class AccountLoginGetSetupPIN : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -72485,18 +72300,18 @@ class AccountLoginGetSetupPIN : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getSetupPINWithParams:params - completion:^( - MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -72523,9 +72338,9 @@ class AccountLoginLogin : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -72539,16 +72354,16 @@ class AccountLoginLogin : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster loginWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -72573,9 +72388,9 @@ class AccountLoginLogout : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRAccountLoginClusterLogoutParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -72583,16 +72398,16 @@ class AccountLoginLogout : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster logoutWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -72617,10 +72432,10 @@ class ReadAccountLoginGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("AccountLogin GeneratedCommandList read Error", error); @@ -72644,17 +72459,16 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72684,10 +72498,10 @@ class ReadAccountLoginAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("AccountLogin AcceptedCommandList read Error", error); @@ -72711,17 +72525,16 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72751,10 +72564,10 @@ class ReadAccountLoginAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AttributeList response %@", [value description]); if (error != nil) { LogNSError("AccountLogin AttributeList read Error", error); @@ -72778,17 +72591,16 @@ class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72818,10 +72630,10 @@ class ReadAccountLoginFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("AccountLogin FeatureMap read Error", error); @@ -72845,17 +72657,16 @@ class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -72885,10 +72696,10 @@ class ReadAccountLoginClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("AccountLogin ClusterRevision read Error", error); @@ -72912,17 +72723,16 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73096,9 +72906,9 @@ class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -73106,16 +72916,16 @@ class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getProfileInfoCommandWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -73142,9 +72952,9 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -73155,16 +72965,16 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getMeasurementProfileCommandWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -73190,10 +73000,10 @@ class ReadElectricalMeasurementMeasurementType : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeMeasurementTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement MeasurementType read Error", error); @@ -73217,17 +73027,16 @@ class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasurementTypeWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasurementTypeWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73257,10 +73066,10 @@ class ReadElectricalMeasurementDcVoltage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000100) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcVoltage read Error", error); @@ -73284,17 +73093,16 @@ class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000100) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcVoltageWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73324,10 +73132,10 @@ class ReadElectricalMeasurementDcVoltageMin : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000101) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcVoltageMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcVoltageMin read Error", error); @@ -73351,17 +73159,16 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000101) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcVoltageMinWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcVoltageMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73391,10 +73198,10 @@ class ReadElectricalMeasurementDcVoltageMax : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000102) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcVoltageMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcVoltageMax read Error", error); @@ -73418,17 +73225,16 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000102) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcVoltageMaxWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcVoltageMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73458,10 +73264,10 @@ class ReadElectricalMeasurementDcCurrent : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000103) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcCurrent read Error", error); @@ -73485,17 +73291,16 @@ class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000103) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73525,10 +73330,10 @@ class ReadElectricalMeasurementDcCurrentMin : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000104) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcCurrentMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcCurrentMin read Error", error); @@ -73552,17 +73357,16 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000104) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcCurrentMinWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcCurrentMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73592,10 +73396,10 @@ class ReadElectricalMeasurementDcCurrentMax : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000105) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcCurrentMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcCurrentMax read Error", error); @@ -73619,17 +73423,16 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000105) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcCurrentMaxWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcCurrentMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73659,10 +73462,10 @@ class ReadElectricalMeasurementDcPower : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000106) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcPowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcPower read Error", error); @@ -73686,17 +73489,16 @@ class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000106) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcPowerWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcPowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73726,10 +73528,10 @@ class ReadElectricalMeasurementDcPowerMin : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000107) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcPowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcPowerMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcPowerMin read Error", error); @@ -73753,17 +73555,16 @@ class SubscribeAttributeElectricalMeasurementDcPowerMin : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000107) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcPowerMinWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcPowerMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73793,10 +73594,10 @@ class ReadElectricalMeasurementDcPowerMax : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000108) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcPowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcPowerMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcPowerMax read Error", error); @@ -73820,17 +73621,16 @@ class SubscribeAttributeElectricalMeasurementDcPowerMax : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000108) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcPowerMaxWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcPowerMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73860,10 +73660,10 @@ class ReadElectricalMeasurementDcVoltageMultiplier : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000200) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcVoltageMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcVoltageMultiplier read Error", error); @@ -73887,17 +73687,16 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000200) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcVoltageMultiplierWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcVoltageMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73927,10 +73726,10 @@ class ReadElectricalMeasurementDcVoltageDivisor : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000201) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcVoltageDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcVoltageDivisor read Error", error); @@ -73954,17 +73753,16 @@ class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000201) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcVoltageDivisorWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcVoltageDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -73994,10 +73792,10 @@ class ReadElectricalMeasurementDcCurrentMultiplier : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000202) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcCurrentMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcCurrentMultiplier read Error", error); @@ -74021,17 +73819,16 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000202) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcCurrentMultiplierWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcCurrentMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74061,10 +73858,10 @@ class ReadElectricalMeasurementDcCurrentDivisor : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000203) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcCurrentDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcCurrentDivisor read Error", error); @@ -74088,17 +73885,16 @@ class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000203) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcCurrentDivisorWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcCurrentDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74128,10 +73924,10 @@ class ReadElectricalMeasurementDcPowerMultiplier : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000204) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcPowerMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcPowerMultiplier read Error", error); @@ -74155,17 +73951,16 @@ class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000204) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcPowerMultiplierWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcPowerMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74195,10 +73990,10 @@ class ReadElectricalMeasurementDcPowerDivisor : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000205) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeDcPowerDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcPowerDivisor read Error", error); @@ -74222,17 +74017,16 @@ class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000205) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeDcPowerDivisorWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeDcPowerDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74262,10 +74056,10 @@ class ReadElectricalMeasurementAcFrequency : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000300) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcFrequency read Error", error); @@ -74289,17 +74083,16 @@ class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000300) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcFrequencyWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcFrequencyWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74329,10 +74122,10 @@ class ReadElectricalMeasurementAcFrequencyMin : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000301) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcFrequencyMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcFrequencyMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcFrequencyMin read Error", error); @@ -74356,17 +74149,16 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000301) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcFrequencyMinWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcFrequencyMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74396,10 +74188,10 @@ class ReadElectricalMeasurementAcFrequencyMax : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000302) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcFrequencyMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcFrequencyMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcFrequencyMax read Error", error); @@ -74423,17 +74215,16 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000302) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcFrequencyMaxWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcFrequencyMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74463,10 +74254,10 @@ class ReadElectricalMeasurementNeutralCurrent : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000303) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNeutralCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNeutralCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement NeutralCurrent read Error", error); @@ -74490,17 +74281,16 @@ class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000303) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNeutralCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNeutralCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74530,10 +74320,10 @@ class ReadElectricalMeasurementTotalActivePower : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000304) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTotalActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeTotalActivePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement TotalActivePower read Error", error); @@ -74557,17 +74347,16 @@ class SubscribeAttributeElectricalMeasurementTotalActivePower : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000304) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTotalActivePowerWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTotalActivePowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74597,10 +74386,10 @@ class ReadElectricalMeasurementTotalReactivePower : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000305) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTotalReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeTotalReactivePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement TotalReactivePower read Error", error); @@ -74624,17 +74413,16 @@ class SubscribeAttributeElectricalMeasurementTotalReactivePower : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000305) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTotalReactivePowerWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTotalReactivePowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74664,10 +74452,10 @@ class ReadElectricalMeasurementTotalApparentPower : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000306) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTotalApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeTotalApparentPowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement TotalApparentPower read Error", error); @@ -74691,17 +74479,16 @@ class SubscribeAttributeElectricalMeasurementTotalApparentPower : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000306) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTotalApparentPowerWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTotalApparentPowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74731,16 +74518,17 @@ class ReadElectricalMeasurementMeasured1stHarmonicCurrent : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000307) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -74758,17 +74546,16 @@ class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000307) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasured1stHarmonicCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74798,16 +74585,17 @@ class ReadElectricalMeasurementMeasured3rdHarmonicCurrent : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000308) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -74825,17 +74613,16 @@ class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000308) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasured3rdHarmonicCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74865,16 +74652,17 @@ class ReadElectricalMeasurementMeasured5thHarmonicCurrent : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000309) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -74892,17 +74680,16 @@ class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000309) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasured5thHarmonicCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74932,16 +74719,17 @@ class ReadElectricalMeasurementMeasured7thHarmonicCurrent : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -74959,17 +74747,16 @@ class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasured7thHarmonicCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -74999,16 +74786,17 @@ class ReadElectricalMeasurementMeasured9thHarmonicCurrent : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -75026,17 +74814,16 @@ class SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent : public { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasured9thHarmonicCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75066,16 +74853,17 @@ class ReadElectricalMeasurementMeasured11thHarmonicCurrent : public ReadAttribut ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -75093,17 +74881,16 @@ class SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent : publi { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasured11thHarmonicCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75133,17 +74920,17 @@ class ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public ReadAttr ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -75161,17 +74948,16 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : p { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75201,17 +74987,17 @@ class ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : public ReadAttr ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -75229,17 +75015,16 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : p { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75269,17 +75054,17 @@ class ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent : public ReadAttr ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -75297,17 +75082,16 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : p { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75337,17 +75121,17 @@ class ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent : public ReadAttr ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000310) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -75365,17 +75149,16 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : p { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000310) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75405,17 +75188,17 @@ class ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent : public ReadAttr ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000311) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -75433,17 +75216,16 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : p { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000311) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75473,17 +75255,17 @@ class ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent : public ReadAtt ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000312) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -75501,17 +75283,16 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000312) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75541,10 +75322,10 @@ class ReadElectricalMeasurementAcFrequencyMultiplier : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000400) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcFrequencyMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcFrequencyMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcFrequencyMultiplier read Error", error); @@ -75568,17 +75349,16 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000400) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcFrequencyMultiplierWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcFrequencyMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75608,10 +75388,10 @@ class ReadElectricalMeasurementAcFrequencyDivisor : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000401) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcFrequencyDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcFrequencyDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcFrequencyDivisor read Error", error); @@ -75635,17 +75415,16 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000401) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcFrequencyDivisorWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcFrequencyDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75675,10 +75454,10 @@ class ReadElectricalMeasurementPowerMultiplier : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000402) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePowerMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement PowerMultiplier read Error", error); @@ -75702,17 +75481,16 @@ class SubscribeAttributeElectricalMeasurementPowerMultiplier : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000402) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePowerMultiplierWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePowerMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75742,10 +75520,10 @@ class ReadElectricalMeasurementPowerDivisor : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000403) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePowerDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement PowerDivisor read Error", error); @@ -75769,17 +75547,16 @@ class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000403) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePowerDivisorWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePowerDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75809,16 +75586,17 @@ class ReadElectricalMeasurementHarmonicCurrentMultiplier : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000404) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -75836,17 +75614,16 @@ class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000404) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeHarmonicCurrentMultiplierWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75876,17 +75653,17 @@ class ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier : public ReadAttri ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000405) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -75904,17 +75681,16 @@ class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : pu { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000405) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -75944,10 +75720,10 @@ class ReadElectricalMeasurementInstantaneousVoltage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000500) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstantaneousVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInstantaneousVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement InstantaneousVoltage read Error", error); @@ -75971,17 +75747,16 @@ class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000500) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInstantaneousVoltageWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInstantaneousVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76011,16 +75786,17 @@ class ReadElectricalMeasurementInstantaneousLineCurrent : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000501) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -76038,17 +75814,16 @@ class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public S { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000501) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInstantaneousLineCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInstantaneousLineCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76078,16 +75853,17 @@ class ReadElectricalMeasurementInstantaneousActiveCurrent : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000502) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -76105,17 +75881,16 @@ class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000502) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInstantaneousActiveCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInstantaneousActiveCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76145,10 +75920,11 @@ class ReadElectricalMeasurementInstantaneousReactiveCurrent : public ReadAttribu ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000503) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstantaneousReactiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInstantaneousReactiveCurrentWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement InstantaneousReactiveCurrent read Error", error); @@ -76172,17 +75948,16 @@ class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : publ { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000503) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInstantaneousReactiveCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76212,10 +75987,10 @@ class ReadElectricalMeasurementInstantaneousPower : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000504) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstantaneousPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInstantaneousPowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement InstantaneousPower read Error", error); @@ -76239,17 +76014,16 @@ class SubscribeAttributeElectricalMeasurementInstantaneousPower : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000504) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInstantaneousPowerWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInstantaneousPowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76279,10 +76053,10 @@ class ReadElectricalMeasurementRmsVoltage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000505) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltage read Error", error); @@ -76306,17 +76080,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltage : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000505) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76346,10 +76119,10 @@ class ReadElectricalMeasurementRmsVoltageMin : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000506) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltageMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageMin read Error", error); @@ -76373,17 +76146,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000506) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageMinWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76413,10 +76185,10 @@ class ReadElectricalMeasurementRmsVoltageMax : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000507) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltageMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageMax read Error", error); @@ -76440,17 +76212,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000507) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageMaxWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76480,10 +76251,10 @@ class ReadElectricalMeasurementRmsCurrent : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000508) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrent read Error", error); @@ -76507,17 +76278,16 @@ class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000508) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsCurrentWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsCurrentWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76547,10 +76317,10 @@ class ReadElectricalMeasurementRmsCurrentMin : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000509) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsCurrentMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentMin read Error", error); @@ -76574,17 +76344,16 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMin : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000509) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsCurrentMinWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsCurrentMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76614,10 +76383,10 @@ class ReadElectricalMeasurementRmsCurrentMax : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsCurrentMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentMax read Error", error); @@ -76641,17 +76410,16 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsCurrentMaxWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsCurrentMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76681,10 +76449,10 @@ class ReadElectricalMeasurementActivePower : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActivePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePower read Error", error); @@ -76708,17 +76476,16 @@ class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActivePowerWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActivePowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76748,10 +76515,10 @@ class ReadElectricalMeasurementActivePowerMin : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActivePowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActivePowerMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerMin read Error", error); @@ -76775,17 +76542,16 @@ class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActivePowerMinWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActivePowerMinWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76815,10 +76581,10 @@ class ReadElectricalMeasurementActivePowerMax : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActivePowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActivePowerMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerMax read Error", error); @@ -76842,17 +76608,16 @@ class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActivePowerMaxWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActivePowerMaxWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76882,10 +76647,10 @@ class ReadElectricalMeasurementReactivePower : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeReactivePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ReactivePower read Error", error); @@ -76909,17 +76674,16 @@ class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeReactivePowerWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeReactivePowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -76949,10 +76713,10 @@ class ReadElectricalMeasurementApparentPower : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeApparentPowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ApparentPower read Error", error); @@ -76976,17 +76740,16 @@ class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeApparentPowerWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeApparentPowerWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77016,10 +76779,10 @@ class ReadElectricalMeasurementPowerFactor : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000510) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePowerFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePowerFactorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement PowerFactor read Error", error); @@ -77043,17 +76806,16 @@ class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000510) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePowerFactorWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePowerFactorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77083,17 +76845,17 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public ReadA ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000511) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -77114,10 +76876,10 @@ class WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public Writ { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000511) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -77125,14 +76887,14 @@ class WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public Writ [cluster writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement " - "AverageRmsVoltageMeasurementPeriod write Error", - error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement " + "AverageRmsVoltageMeasurementPeriod write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -77153,17 +76915,16 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000511) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77193,10 +76954,11 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounter : public ReadAttrib ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000513) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounter read Error", error); @@ -77223,10 +76985,10 @@ class WriteElectricalMeasurementAverageRmsUnderVoltageCounter : public WriteAttr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000513) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -77235,14 +76997,13 @@ class WriteElectricalMeasurementAverageRmsUnderVoltageCounter : public WriteAttr [cluster writeAttributeAverageRmsUnderVoltageCounterWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ElectricalMeasurement AverageRmsUnderVoltageCounter write Error", - error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounter write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -77263,17 +77024,16 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : pub { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000513) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAverageRmsUnderVoltageCounterWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77303,16 +77063,17 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriod : public ReadAttribut ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000514) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -77333,10 +77094,10 @@ class WriteElectricalMeasurementRmsExtremeOverVoltagePeriod : public WriteAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000514) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -77345,14 +77106,13 @@ class WriteElectricalMeasurementRmsExtremeOverVoltagePeriod : public WriteAttrib [cluster writeAttributeRmsExtremeOverVoltagePeriodWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ElectricalMeasurement RmsExtremeOverVoltagePeriod write Error", - error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ElectricalMeasurement RmsExtremeOverVoltagePeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -77373,17 +77133,16 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : publi { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000514) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77413,10 +77172,11 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod : public ReadAttribu ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000515) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriod read Error", error); @@ -77443,10 +77203,10 @@ class WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod : public WriteAttri { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000515) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -77455,14 +77215,13 @@ class WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod : public WriteAttri [cluster writeAttributeRmsExtremeUnderVoltagePeriodWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ElectricalMeasurement RmsExtremeUnderVoltagePeriod write Error", - error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ElectricalMeasurement RmsExtremeUnderVoltagePeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -77483,17 +77242,16 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : publ { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000515) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77523,10 +77281,10 @@ class ReadElectricalMeasurementRmsVoltageSagPeriod : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000516) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageSagPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltageSagPeriodWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageSagPeriod read Error", error); @@ -77553,10 +77311,10 @@ class WriteElectricalMeasurementRmsVoltageSagPeriod : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000516) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -77564,12 +77322,12 @@ class WriteElectricalMeasurementRmsVoltageSagPeriod : public WriteAttribute { [cluster writeAttributeRmsVoltageSagPeriodWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSagPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement RmsVoltageSagPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -77590,17 +77348,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000516) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageSagPeriodWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageSagPeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77630,10 +77387,10 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriod : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000517) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageSwellPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltageSwellPeriodWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod read Error", error); @@ -77660,24 +77417,23 @@ class WriteElectricalMeasurementRmsVoltageSwellPeriod : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000517) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster - writeAttributeRmsVoltageSwellPeriodWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeRmsVoltageSwellPeriodWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -77698,17 +77454,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000517) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageSwellPeriodWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77738,10 +77493,10 @@ class ReadElectricalMeasurementAcVoltageMultiplier : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000600) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcVoltageMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcVoltageMultiplier read Error", error); @@ -77765,17 +77520,16 @@ class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000600) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcVoltageMultiplierWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcVoltageMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77805,10 +77559,10 @@ class ReadElectricalMeasurementAcVoltageDivisor : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000601) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcVoltageDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcVoltageDivisor read Error", error); @@ -77832,17 +77586,16 @@ class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000601) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcVoltageDivisorWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcVoltageDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77872,10 +77625,10 @@ class ReadElectricalMeasurementAcCurrentMultiplier : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000602) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcCurrentMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcCurrentMultiplier read Error", error); @@ -77899,17 +77652,16 @@ class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000602) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcCurrentMultiplierWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcCurrentMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -77939,10 +77691,10 @@ class ReadElectricalMeasurementAcCurrentDivisor : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000603) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcCurrentDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcCurrentDivisor read Error", error); @@ -77966,17 +77718,16 @@ class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000603) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcCurrentDivisorWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcCurrentDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78006,10 +77757,10 @@ class ReadElectricalMeasurementAcPowerMultiplier : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000604) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcPowerMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcPowerMultiplier read Error", error); @@ -78033,17 +77784,16 @@ class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000604) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcPowerMultiplierWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcPowerMultiplierWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78073,10 +77823,10 @@ class ReadElectricalMeasurementAcPowerDivisor : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000605) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcPowerDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcPowerDivisor read Error", error); @@ -78100,17 +77850,16 @@ class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000605) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcPowerDivisorWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcPowerDivisorWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78140,10 +77889,10 @@ class ReadElectricalMeasurementOverloadAlarmsMask : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000700) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOverloadAlarmsMaskWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement OverloadAlarmsMask read Error", error); @@ -78170,10 +77919,10 @@ class WriteElectricalMeasurementOverloadAlarmsMask : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000700) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -78181,12 +77930,12 @@ class WriteElectricalMeasurementOverloadAlarmsMask : public WriteAttribute { [cluster writeAttributeOverloadAlarmsMaskWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement OverloadAlarmsMask write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement OverloadAlarmsMask write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -78207,17 +77956,16 @@ class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000700) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOverloadAlarmsMaskWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOverloadAlarmsMaskWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78247,10 +77995,10 @@ class ReadElectricalMeasurementVoltageOverload : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000701) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeVoltageOverloadWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement VoltageOverload read Error", error); @@ -78274,17 +78022,16 @@ class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000701) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeVoltageOverloadWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeVoltageOverloadWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78314,10 +78061,10 @@ class ReadElectricalMeasurementCurrentOverload : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000702) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCurrentOverloadWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement CurrentOverload read Error", error); @@ -78341,17 +78088,16 @@ class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000702) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCurrentOverloadWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCurrentOverloadWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78381,10 +78127,10 @@ class ReadElectricalMeasurementAcOverloadAlarmsMask : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000800) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcOverloadAlarmsMaskWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcOverloadAlarmsMask read Error", error); @@ -78411,24 +78157,23 @@ class WriteElectricalMeasurementAcOverloadAlarmsMask : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000800) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster - writeAttributeAcOverloadAlarmsMaskWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement AcOverloadAlarmsMask write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeAcOverloadAlarmsMaskWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement AcOverloadAlarmsMask write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -78449,17 +78194,16 @@ class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000800) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcOverloadAlarmsMaskWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78489,10 +78233,10 @@ class ReadElectricalMeasurementAcVoltageOverload : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000801) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcVoltageOverloadWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcVoltageOverload read Error", error); @@ -78516,17 +78260,16 @@ class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000801) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcVoltageOverloadWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcVoltageOverloadWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78556,10 +78299,10 @@ class ReadElectricalMeasurementAcCurrentOverload : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000802) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcCurrentOverloadWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcCurrentOverload read Error", error); @@ -78583,17 +78326,16 @@ class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000802) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcCurrentOverloadWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcCurrentOverloadWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78623,10 +78365,10 @@ class ReadElectricalMeasurementAcActivePowerOverload : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000803) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcActivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcActivePowerOverloadWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcActivePowerOverload read Error", error); @@ -78650,17 +78392,16 @@ class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000803) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcActivePowerOverloadWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcActivePowerOverloadWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78690,16 +78431,17 @@ class ReadElectricalMeasurementAcReactivePowerOverload : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000804) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -78717,17 +78459,16 @@ class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public Su { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000804) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcReactivePowerOverloadWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcReactivePowerOverloadWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78757,10 +78498,10 @@ class ReadElectricalMeasurementAverageRmsOverVoltage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000805) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageRmsOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAverageRmsOverVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AverageRmsOverVoltage read Error", error); @@ -78784,17 +78525,16 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000805) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAverageRmsOverVoltageWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAverageRmsOverVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78824,10 +78564,10 @@ class ReadElectricalMeasurementAverageRmsUnderVoltage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000806) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAverageRmsUnderVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AverageRmsUnderVoltage read Error", error); @@ -78851,17 +78591,16 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000806) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAverageRmsUnderVoltageWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAverageRmsUnderVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78891,10 +78630,10 @@ class ReadElectricalMeasurementRmsExtremeOverVoltage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000807) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsExtremeOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsExtremeOverVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsExtremeOverVoltage read Error", error); @@ -78918,17 +78657,16 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000807) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsExtremeOverVoltageWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsExtremeOverVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -78958,10 +78696,10 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltage : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000808) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsExtremeUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsExtremeUnderVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsExtremeUnderVoltage read Error", error); @@ -78985,17 +78723,16 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public Sub { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000808) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsExtremeUnderVoltageWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79025,10 +78762,10 @@ class ReadElectricalMeasurementRmsVoltageSag : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000809) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageSagWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltageSagWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageSag read Error", error); @@ -79052,17 +78789,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000809) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageSagWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageSagWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79092,10 +78828,10 @@ class ReadElectricalMeasurementRmsVoltageSwell : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000080A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageSwellWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltageSwellWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageSwell read Error", error); @@ -79119,17 +78855,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000080A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageSwellWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageSwellWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79159,10 +78894,10 @@ class ReadElectricalMeasurementLineCurrentPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000901) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLineCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLineCurrentPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement LineCurrentPhaseB read Error", error); @@ -79186,17 +78921,16 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000901) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLineCurrentPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLineCurrentPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79226,10 +78960,10 @@ class ReadElectricalMeasurementActiveCurrentPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000902) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActiveCurrentPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActiveCurrentPhaseB read Error", error); @@ -79253,17 +78987,16 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000902) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveCurrentPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveCurrentPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79293,10 +79026,10 @@ class ReadElectricalMeasurementReactiveCurrentPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000903) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeReactiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeReactiveCurrentPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ReactiveCurrentPhaseB read Error", error); @@ -79320,17 +79053,16 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000903) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeReactiveCurrentPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeReactiveCurrentPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79360,10 +79092,10 @@ class ReadElectricalMeasurementRmsVoltagePhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000905) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltagePhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltagePhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltagePhaseB read Error", error); @@ -79387,17 +79119,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000905) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltagePhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltagePhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79427,10 +79158,10 @@ class ReadElectricalMeasurementRmsVoltageMinPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000906) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltageMinPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageMinPhaseB read Error", error); @@ -79454,17 +79185,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000906) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageMinPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79494,10 +79224,10 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000907) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseB read Error", error); @@ -79521,17 +79251,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000907) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageMaxPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79561,10 +79290,10 @@ class ReadElectricalMeasurementRmsCurrentPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000908) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsCurrentPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentPhaseB read Error", error); @@ -79588,17 +79317,16 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000908) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsCurrentPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsCurrentPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79628,10 +79356,10 @@ class ReadElectricalMeasurementRmsCurrentMinPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000909) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsCurrentMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsCurrentMinPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentMinPhaseB read Error", error); @@ -79655,17 +79383,16 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000909) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsCurrentMinPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79695,10 +79422,10 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsCurrentMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseB read Error", error); @@ -79722,17 +79449,16 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsCurrentMaxPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79762,10 +79488,10 @@ class ReadElectricalMeasurementActivePowerPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActivePowerPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerPhaseB read Error", error); @@ -79789,17 +79515,16 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActivePowerPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActivePowerPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79829,10 +79554,10 @@ class ReadElectricalMeasurementActivePowerMinPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActivePowerMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActivePowerMinPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerMinPhaseB read Error", error); @@ -79856,17 +79581,16 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActivePowerMinPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActivePowerMinPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79896,10 +79620,10 @@ class ReadElectricalMeasurementActivePowerMaxPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActivePowerMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActivePowerMaxPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerMaxPhaseB read Error", error); @@ -79923,17 +79647,16 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActivePowerMaxPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActivePowerMaxPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -79963,10 +79686,10 @@ class ReadElectricalMeasurementReactivePowerPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeReactivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeReactivePowerPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ReactivePowerPhaseB read Error", error); @@ -79990,17 +79713,16 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseB : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeReactivePowerPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeReactivePowerPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80030,10 +79752,10 @@ class ReadElectricalMeasurementApparentPowerPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeApparentPowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeApparentPowerPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ApparentPowerPhaseB read Error", error); @@ -80057,17 +79779,16 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseB : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeApparentPowerPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeApparentPowerPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80097,10 +79818,10 @@ class ReadElectricalMeasurementPowerFactorPhaseB : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000910) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePowerFactorPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePowerFactorPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement PowerFactorPhaseB read Error", error); @@ -80124,17 +79845,16 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000910) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePowerFactorPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePowerFactorPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80164,10 +79884,10 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000911) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:^( + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); if (error != nil) { @@ -80192,17 +79912,17 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000911) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster + subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80232,17 +79952,17 @@ class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB : public ReadA ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000912) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -80260,17 +79980,16 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000912) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80300,10 +80019,10 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public Read ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000913) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:^( + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); if (error != nil) { @@ -80328,17 +80047,16 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000913) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80368,17 +80086,17 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : public ReadAt ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000914) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -80396,17 +80114,16 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000914) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80436,17 +80153,17 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB : public ReadA ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000915) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -80464,17 +80181,16 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000915) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80504,16 +80220,17 @@ class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000916) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -80531,17 +80248,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000916) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80571,16 +80287,17 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public ReadAttribut ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000917) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -80598,17 +80315,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : publi { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000917) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80638,10 +80354,10 @@ class ReadElectricalMeasurementLineCurrentPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A01) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLineCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLineCurrentPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement LineCurrentPhaseC read Error", error); @@ -80665,17 +80381,16 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A01) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLineCurrentPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLineCurrentPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80705,10 +80420,10 @@ class ReadElectricalMeasurementActiveCurrentPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A02) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActiveCurrentPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActiveCurrentPhaseC read Error", error); @@ -80732,17 +80447,16 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A02) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActiveCurrentPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActiveCurrentPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80772,10 +80486,10 @@ class ReadElectricalMeasurementReactiveCurrentPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A03) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeReactiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeReactiveCurrentPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ReactiveCurrentPhaseC read Error", error); @@ -80799,17 +80513,16 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public Subs { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A03) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeReactiveCurrentPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeReactiveCurrentPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80839,10 +80552,10 @@ class ReadElectricalMeasurementRmsVoltagePhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A05) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltagePhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltagePhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltagePhaseC read Error", error); @@ -80866,17 +80579,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A05) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltagePhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltagePhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80906,10 +80618,10 @@ class ReadElectricalMeasurementRmsVoltageMinPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A06) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltageMinPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageMinPhaseC read Error", error); @@ -80933,17 +80645,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A06) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageMinPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -80973,10 +80684,10 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A07) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseC read Error", error); @@ -81000,17 +80711,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A07) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageMaxPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81040,10 +80750,10 @@ class ReadElectricalMeasurementRmsCurrentPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A08) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsCurrentPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentPhaseC read Error", error); @@ -81067,17 +80777,16 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public Subscribe { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A08) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsCurrentPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsCurrentPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81107,10 +80816,10 @@ class ReadElectricalMeasurementRmsCurrentMinPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A09) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsCurrentMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsCurrentMinPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentMinPhaseC read Error", error); @@ -81134,17 +80843,16 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A09) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsCurrentMinPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81174,10 +80882,10 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsCurrentMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseC read Error", error); @@ -81201,17 +80909,16 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsCurrentMaxPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81241,10 +80948,10 @@ class ReadElectricalMeasurementActivePowerPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActivePowerPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerPhaseC read Error", error); @@ -81268,17 +80975,16 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActivePowerPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActivePowerPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81308,10 +81014,10 @@ class ReadElectricalMeasurementActivePowerMinPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActivePowerMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActivePowerMinPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerMinPhaseC read Error", error); @@ -81335,17 +81041,16 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActivePowerMinPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActivePowerMinPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81375,10 +81080,10 @@ class ReadElectricalMeasurementActivePowerMaxPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeActivePowerMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeActivePowerMaxPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerMaxPhaseC read Error", error); @@ -81402,17 +81107,16 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeActivePowerMaxPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeActivePowerMaxPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81442,10 +81146,10 @@ class ReadElectricalMeasurementReactivePowerPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeReactivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeReactivePowerPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ReactivePowerPhaseC read Error", error); @@ -81469,17 +81173,16 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeReactivePowerPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeReactivePowerPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81509,10 +81212,10 @@ class ReadElectricalMeasurementApparentPowerPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeApparentPowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeApparentPowerPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ApparentPowerPhaseC read Error", error); @@ -81536,17 +81239,16 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeApparentPowerPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeApparentPowerPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81576,10 +81278,10 @@ class ReadElectricalMeasurementPowerFactorPhaseC : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A10) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePowerFactorPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributePowerFactorPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement PowerFactorPhaseC read Error", error); @@ -81603,17 +81305,16 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public Subscrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A10) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributePowerFactorPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributePowerFactorPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81643,10 +81344,10 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A11) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:^( + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); if (error != nil) { @@ -81671,17 +81372,17 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A11) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster + subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81711,17 +81412,17 @@ class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC : public ReadA ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A12) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -81739,17 +81440,16 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A12) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81779,10 +81479,10 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public Read ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A13) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:^( + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); if (error != nil) { @@ -81807,17 +81507,16 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A13) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81847,17 +81546,17 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : public ReadAt ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A14) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -81875,17 +81574,16 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A14) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81915,17 +81613,17 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC : public ReadA ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A15) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -81943,17 +81641,16 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A15) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -81983,16 +81680,17 @@ class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC : public ReadAttribute ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A16) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -82010,17 +81708,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC : public { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A16) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -82050,16 +81747,17 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public ReadAttribut ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A17) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -82077,17 +81775,16 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : publi { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A17) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -82117,10 +81814,10 @@ class ReadElectricalMeasurementGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement GeneratedCommandList read Error", error); @@ -82144,17 +81841,16 @@ class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public Subsc { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -82184,10 +81880,10 @@ class ReadElectricalMeasurementAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcceptedCommandList read Error", error); @@ -82211,17 +81907,16 @@ class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -82251,10 +81946,10 @@ class ReadElectricalMeasurementAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AttributeList read Error", error); @@ -82278,17 +81973,16 @@ class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAtt { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -82318,10 +82012,10 @@ class ReadElectricalMeasurementFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement FeatureMap read Error", error); @@ -82345,17 +82039,16 @@ class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -82385,10 +82078,10 @@ class ReadElectricalMeasurementClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ClusterRevision read Error", error); @@ -82412,17 +82105,16 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA { ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -82572,9 +82264,9 @@ class TestClusterTest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -82582,16 +82274,16 @@ class TestClusterTest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -82615,9 +82307,9 @@ class TestClusterTestNotHandled : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestNotHandledParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -82625,16 +82317,16 @@ class TestClusterTestNotHandled : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testNotHandledWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -82658,9 +82350,9 @@ class TestClusterTestSpecific : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestSpecificParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -82668,18 +82360,18 @@ class TestClusterTestSpecific : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testSpecificWithParams:params - completion:^(MTRTestClusterClusterTestSpecificResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -82703,9 +82395,9 @@ class TestClusterTestUnknownCommand : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestUnknownCommandParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -82713,16 +82405,16 @@ class TestClusterTestUnknownCommand : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testUnknownCommandWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -82748,9 +82440,9 @@ class TestClusterTestAddArguments : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -82760,18 +82452,18 @@ class TestClusterTestAddArguments : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testAddArgumentsWithParams:params - completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -82797,9 +82489,9 @@ class TestClusterTestSimpleArgumentRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestSimpleArgumentRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -82808,18 +82500,18 @@ class TestClusterTestSimpleArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testSimpleArgumentRequestWithParams:params - completion:^(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -82854,9 +82546,9 @@ class TestClusterTestStructArrayArgumentRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestStructArrayArgumentRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -82970,21 +82662,20 @@ class TestClusterTestStructArrayArgumentRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [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); - } - }]; + [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); + } + }]; } return CHIP_NO_ERROR; } @@ -83017,9 +82708,9 @@ class TestClusterTestStructArgumentRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestStructArgumentRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -83038,18 +82729,18 @@ class TestClusterTestStructArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testStructArgumentRequestWithParams:params - completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -83077,9 +82768,9 @@ class TestClusterTestNestedStructArgumentRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestNestedStructArgumentRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -83101,18 +82792,18 @@ class TestClusterTestNestedStructArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testNestedStructArgumentRequestWithParams:params - completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -83140,9 +82831,9 @@ class TestClusterTestListStructArgumentRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestListStructArgumentRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -83169,18 +82860,18 @@ class TestClusterTestListStructArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testListStructArgumentRequestWithParams:params - completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -83209,9 +82900,9 @@ class TestClusterTestListInt8UArgumentRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestListInt8UArgumentRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -83228,18 +82919,18 @@ class TestClusterTestListInt8UArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testListInt8UArgumentRequestWithParams:params - completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -83267,9 +82958,9 @@ class TestClusterTestNestedStructListArgumentRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -83337,18 +83028,18 @@ class TestClusterTestNestedStructListArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testNestedStructListArgumentRequestWithParams:params - completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -83376,9 +83067,9 @@ class TestClusterTestListNestedStructListArgumentRequest : public ClusterCommand ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -83455,18 +83146,18 @@ class TestClusterTestListNestedStructListArgumentRequest : public ClusterCommand while (repeatCount--) { [cluster testListNestedStructListArgumentRequestWithParams:params - completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -83495,9 +83186,9 @@ class TestClusterTestListInt8UReverseRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestListInt8UReverseRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -83515,18 +83206,18 @@ class TestClusterTestListInt8UReverseRequest : public ClusterCommand { while (repeatCount--) { [cluster testListInt8UReverseRequestWithParams:params - completion:^(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -83554,9 +83245,9 @@ class TestClusterTestEnumsRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestEnumsRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -83566,18 +83257,18 @@ class TestClusterTestEnumsRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testEnumsRequestWithParams:params - completion:^(MTRTestClusterClusterTestEnumsResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -83603,9 +83294,9 @@ class TestClusterTestNullableOptionalRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -83623,18 +83314,18 @@ class TestClusterTestNullableOptionalRequest : public ClusterCommand { while (repeatCount--) { [cluster testNullableOptionalRequestWithParams:params - completion:^(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -83677,9 +83368,9 @@ class TestClusterTestComplexNullableOptionalRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestComplexNullableOptionalRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -83832,19 +83523,19 @@ class TestClusterTestComplexNullableOptionalRequest : public ClusterCommand { while (repeatCount--) { [cluster testComplexNullableOptionalRequestWithParams:params - completion:^( - MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -83885,9 +83576,9 @@ class TestClusterSimpleStructEchoRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterSimpleStructEchoRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -83906,18 +83597,18 @@ class TestClusterSimpleStructEchoRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster simpleStructEchoRequestWithParams:params - completion:^(MTRTestClusterClusterSimpleStructResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -83943,9 +83634,9 @@ class TestClusterTimedInvokeRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTimedInvokeRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -83953,16 +83644,16 @@ class TestClusterTimedInvokeRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster timedInvokeRequestWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83987,9 +83678,9 @@ class TestClusterTestSimpleOptionalArgumentRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -84002,16 +83693,16 @@ class TestClusterTestSimpleOptionalArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testSimpleOptionalArgumentRequestWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -84039,9 +83730,9 @@ class TestClusterTestEmitTestEventRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestEmitTestEventRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -84052,18 +83743,18 @@ class TestClusterTestEmitTestEventRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testEmitTestEventRequestWithParams:params - completion:^(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^(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; } @@ -84089,9 +83780,9 @@ class TestClusterTestEmitTestFabricScopedEventRequest : public ClusterCommand { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; __auto_type * params = [[MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -84101,19 +83792,19 @@ class TestClusterTestEmitTestFabricScopedEventRequest : public ClusterCommand { while (repeatCount--) { [cluster testEmitTestFabricScopedEventRequestWithParams:params - completion:^( - MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completionHandler:^( + 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; } @@ -84139,10 +83830,10 @@ class ReadTestClusterBoolean : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Boolean response %@", [value description]); if (error != nil) { LogNSError("TestCluster Boolean read Error", error); @@ -84169,10 +83860,10 @@ class WriteTestClusterBoolean : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -84180,12 +83871,12 @@ class WriteTestClusterBoolean : public WriteAttribute { [cluster writeAttributeBooleanWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Boolean write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Boolean write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84206,17 +83897,16 @@ class SubscribeAttributeTestClusterBoolean : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBooleanWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBooleanWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84246,10 +83936,10 @@ class ReadTestClusterBitmap8 : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap8 response %@", [value description]); if (error != nil) { LogNSError("TestCluster Bitmap8 read Error", error); @@ -84276,10 +83966,10 @@ class WriteTestClusterBitmap8 : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -84287,12 +83977,12 @@ class WriteTestClusterBitmap8 : public WriteAttribute { [cluster writeAttributeBitmap8WithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Bitmap8 write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Bitmap8 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84313,17 +84003,16 @@ class SubscribeAttributeTestClusterBitmap8 : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBitmap8WithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBitmap8WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84353,10 +84042,10 @@ class ReadTestClusterBitmap16 : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap16 response %@", [value description]); if (error != nil) { LogNSError("TestCluster Bitmap16 read Error", error); @@ -84383,10 +84072,10 @@ class WriteTestClusterBitmap16 : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -84394,12 +84083,12 @@ class WriteTestClusterBitmap16 : public WriteAttribute { [cluster writeAttributeBitmap16WithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Bitmap16 write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Bitmap16 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84420,17 +84109,16 @@ class SubscribeAttributeTestClusterBitmap16 : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBitmap16WithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBitmap16WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84460,10 +84148,10 @@ class ReadTestClusterBitmap32 : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap32 response %@", [value description]); if (error != nil) { LogNSError("TestCluster Bitmap32 read Error", error); @@ -84490,10 +84178,10 @@ class WriteTestClusterBitmap32 : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -84501,12 +84189,12 @@ class WriteTestClusterBitmap32 : public WriteAttribute { [cluster writeAttributeBitmap32WithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Bitmap32 write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Bitmap32 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84527,17 +84215,16 @@ class SubscribeAttributeTestClusterBitmap32 : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBitmap32WithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBitmap32WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84567,10 +84254,10 @@ class ReadTestClusterBitmap64 : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap64 response %@", [value description]); if (error != nil) { LogNSError("TestCluster Bitmap64 read Error", error); @@ -84597,10 +84284,10 @@ class WriteTestClusterBitmap64 : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -84608,12 +84295,12 @@ class WriteTestClusterBitmap64 : public WriteAttribute { [cluster writeAttributeBitmap64WithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Bitmap64 write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Bitmap64 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84634,17 +84321,16 @@ class SubscribeAttributeTestClusterBitmap64 : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeBitmap64WithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeBitmap64WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84674,10 +84360,10 @@ class ReadTestClusterInt8u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int8u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int8u read Error", error); @@ -84704,10 +84390,10 @@ class WriteTestClusterInt8u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -84715,12 +84401,12 @@ class WriteTestClusterInt8u : public WriteAttribute { [cluster writeAttributeInt8uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int8u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int8u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84741,17 +84427,16 @@ class SubscribeAttributeTestClusterInt8u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt8uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84781,10 +84466,10 @@ class ReadTestClusterInt16u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int16u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int16u read Error", error); @@ -84811,10 +84496,10 @@ class WriteTestClusterInt16u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -84822,12 +84507,12 @@ class WriteTestClusterInt16u : public WriteAttribute { [cluster writeAttributeInt16uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int16u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int16u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84848,17 +84533,16 @@ class SubscribeAttributeTestClusterInt16u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt16uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt16uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84888,10 +84572,10 @@ class ReadTestClusterInt24u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt24uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt24uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int24u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int24u read Error", error); @@ -84918,10 +84602,10 @@ class WriteTestClusterInt24u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -84929,12 +84613,12 @@ class WriteTestClusterInt24u : public WriteAttribute { [cluster writeAttributeInt24uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int24u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int24u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84955,17 +84639,16 @@ class SubscribeAttributeTestClusterInt24u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt24uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt24uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -84995,10 +84678,10 @@ class ReadTestClusterInt32u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int32u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int32u read Error", error); @@ -85025,10 +84708,10 @@ class WriteTestClusterInt32u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -85036,12 +84719,12 @@ class WriteTestClusterInt32u : public WriteAttribute { [cluster writeAttributeInt32uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int32u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int32u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85062,17 +84745,16 @@ class SubscribeAttributeTestClusterInt32u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt32uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt32uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85102,10 +84784,10 @@ class ReadTestClusterInt40u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt40uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt40uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int40u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int40u read Error", error); @@ -85132,10 +84814,10 @@ class WriteTestClusterInt40u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -85143,12 +84825,12 @@ class WriteTestClusterInt40u : public WriteAttribute { [cluster writeAttributeInt40uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int40u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int40u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85169,17 +84851,16 @@ class SubscribeAttributeTestClusterInt40u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt40uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt40uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85209,10 +84890,10 @@ class ReadTestClusterInt48u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt48uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt48uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int48u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int48u read Error", error); @@ -85239,10 +84920,10 @@ class WriteTestClusterInt48u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -85250,12 +84931,12 @@ class WriteTestClusterInt48u : public WriteAttribute { [cluster writeAttributeInt48uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int48u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int48u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85276,17 +84957,16 @@ class SubscribeAttributeTestClusterInt48u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt48uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt48uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85316,10 +84996,10 @@ class ReadTestClusterInt56u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt56uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt56uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int56u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int56u read Error", error); @@ -85346,10 +85026,10 @@ class WriteTestClusterInt56u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -85357,12 +85037,12 @@ class WriteTestClusterInt56u : public WriteAttribute { [cluster writeAttributeInt56uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int56u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int56u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85383,17 +85063,16 @@ class SubscribeAttributeTestClusterInt56u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt56uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt56uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85423,10 +85102,10 @@ class ReadTestClusterInt64u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int64u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int64u read Error", error); @@ -85453,10 +85132,10 @@ class WriteTestClusterInt64u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -85464,12 +85143,12 @@ class WriteTestClusterInt64u : public WriteAttribute { [cluster writeAttributeInt64uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int64u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int64u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85490,17 +85169,16 @@ class SubscribeAttributeTestClusterInt64u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt64uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt64uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85530,10 +85208,10 @@ class ReadTestClusterInt8s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int8s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int8s read Error", error); @@ -85560,10 +85238,10 @@ class WriteTestClusterInt8s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -85571,12 +85249,12 @@ class WriteTestClusterInt8s : public WriteAttribute { [cluster writeAttributeInt8sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int8s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int8s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85597,17 +85275,16 @@ class SubscribeAttributeTestClusterInt8s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt8sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt8sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85637,10 +85314,10 @@ class ReadTestClusterInt16s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int16s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int16s read Error", error); @@ -85667,10 +85344,10 @@ class WriteTestClusterInt16s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -85678,12 +85355,12 @@ class WriteTestClusterInt16s : public WriteAttribute { [cluster writeAttributeInt16sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int16s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int16s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85704,17 +85381,16 @@ class SubscribeAttributeTestClusterInt16s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt16sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt16sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85744,10 +85420,10 @@ class ReadTestClusterInt24s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt24sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt24sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int24s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int24s read Error", error); @@ -85774,10 +85450,10 @@ class WriteTestClusterInt24s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -85785,12 +85461,12 @@ class WriteTestClusterInt24s : public WriteAttribute { [cluster writeAttributeInt24sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int24s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int24s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85811,17 +85487,16 @@ class SubscribeAttributeTestClusterInt24s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt24sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt24sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85851,10 +85526,10 @@ class ReadTestClusterInt32s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int32s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int32s read Error", error); @@ -85881,10 +85556,10 @@ class WriteTestClusterInt32s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -85892,12 +85567,12 @@ class WriteTestClusterInt32s : public WriteAttribute { [cluster writeAttributeInt32sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int32s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int32s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85918,17 +85593,16 @@ class SubscribeAttributeTestClusterInt32s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt32sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt32sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -85958,10 +85632,10 @@ class ReadTestClusterInt40s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt40sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt40sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int40s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int40s read Error", error); @@ -85988,10 +85662,10 @@ class WriteTestClusterInt40s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -85999,12 +85673,12 @@ class WriteTestClusterInt40s : public WriteAttribute { [cluster writeAttributeInt40sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int40s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int40s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86025,17 +85699,16 @@ class SubscribeAttributeTestClusterInt40s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt40sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt40sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86065,10 +85738,10 @@ class ReadTestClusterInt48s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt48sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt48sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int48s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int48s read Error", error); @@ -86095,10 +85768,10 @@ class WriteTestClusterInt48s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -86106,12 +85779,12 @@ class WriteTestClusterInt48s : public WriteAttribute { [cluster writeAttributeInt48sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int48s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int48s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86132,17 +85805,16 @@ class SubscribeAttributeTestClusterInt48s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt48sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt48sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86172,10 +85844,10 @@ class ReadTestClusterInt56s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt56sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt56sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int56s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int56s read Error", error); @@ -86202,10 +85874,10 @@ class WriteTestClusterInt56s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -86213,12 +85885,12 @@ class WriteTestClusterInt56s : public WriteAttribute { [cluster writeAttributeInt56sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int56s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int56s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86239,17 +85911,16 @@ class SubscribeAttributeTestClusterInt56s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt56sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt56sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86279,10 +85950,10 @@ class ReadTestClusterInt64s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int64s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int64s read Error", error); @@ -86309,10 +85980,10 @@ class WriteTestClusterInt64s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -86320,12 +85991,12 @@ class WriteTestClusterInt64s : public WriteAttribute { [cluster writeAttributeInt64sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int64s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int64s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86346,17 +86017,16 @@ class SubscribeAttributeTestClusterInt64s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeInt64sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeInt64sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86386,10 +86056,10 @@ class ReadTestClusterEnum8 : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Enum8 response %@", [value description]); if (error != nil) { LogNSError("TestCluster Enum8 read Error", error); @@ -86416,10 +86086,10 @@ class WriteTestClusterEnum8 : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -86427,12 +86097,12 @@ class WriteTestClusterEnum8 : public WriteAttribute { [cluster writeAttributeEnum8WithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Enum8 write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Enum8 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86453,17 +86123,16 @@ class SubscribeAttributeTestClusterEnum8 : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEnum8WithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEnum8WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86493,10 +86162,10 @@ class ReadTestClusterEnum16 : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Enum16 response %@", [value description]); if (error != nil) { LogNSError("TestCluster Enum16 read Error", error); @@ -86523,10 +86192,10 @@ class WriteTestClusterEnum16 : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -86534,12 +86203,12 @@ class WriteTestClusterEnum16 : public WriteAttribute { [cluster writeAttributeEnum16WithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Enum16 write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Enum16 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86560,17 +86229,16 @@ class SubscribeAttributeTestClusterEnum16 : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEnum16WithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEnum16WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86600,10 +86268,10 @@ class ReadTestClusterFloatSingle : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.FloatSingle response %@", [value description]); if (error != nil) { LogNSError("TestCluster FloatSingle read Error", error); @@ -86630,10 +86298,10 @@ class WriteTestClusterFloatSingle : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -86641,12 +86309,12 @@ class WriteTestClusterFloatSingle : public WriteAttribute { [cluster writeAttributeFloatSingleWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster FloatSingle write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster FloatSingle write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86667,17 +86335,16 @@ class SubscribeAttributeTestClusterFloatSingle : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFloatSingleWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFloatSingleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86707,10 +86374,10 @@ class ReadTestClusterFloatDouble : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.FloatDouble response %@", [value description]); if (error != nil) { LogNSError("TestCluster FloatDouble read Error", error); @@ -86737,10 +86404,10 @@ class WriteTestClusterFloatDouble : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -86748,12 +86415,12 @@ class WriteTestClusterFloatDouble : public WriteAttribute { [cluster writeAttributeFloatDoubleWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster FloatDouble write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster FloatDouble write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86774,17 +86441,16 @@ class SubscribeAttributeTestClusterFloatDouble : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFloatDoubleWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFloatDoubleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86814,10 +86480,10 @@ class ReadTestClusterOctetString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.OctetString response %@", [value description]); if (error != nil) { LogNSError("TestCluster OctetString read Error", error); @@ -86844,10 +86510,10 @@ class WriteTestClusterOctetString : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -86855,12 +86521,12 @@ class WriteTestClusterOctetString : public WriteAttribute { [cluster writeAttributeOctetStringWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster OctetString write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster OctetString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86881,17 +86547,16 @@ class SubscribeAttributeTestClusterOctetString : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeOctetStringWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeOctetStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -86921,10 +86586,10 @@ class ReadTestClusterListInt8u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListInt8u response %@", [value description]); if (error != nil) { LogNSError("TestCluster ListInt8u read Error", error); @@ -86952,10 +86617,10 @@ class WriteTestClusterListInt8u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -86972,12 +86637,12 @@ class WriteTestClusterListInt8u : public WriteAttribute { [cluster writeAttributeListInt8uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster ListInt8u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster ListInt8u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86999,17 +86664,16 @@ class SubscribeAttributeTestClusterListInt8u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeListInt8uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeListInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87039,10 +86703,10 @@ class ReadTestClusterListOctetString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeListOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeListOctetStringWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListOctetString response %@", [value description]); if (error != nil) { LogNSError("TestCluster ListOctetString read Error", error); @@ -87070,10 +86734,10 @@ class WriteTestClusterListOctetString : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -87090,12 +86754,12 @@ class WriteTestClusterListOctetString : public WriteAttribute { [cluster writeAttributeListOctetStringWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster ListOctetString write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster ListOctetString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87117,17 +86781,16 @@ class SubscribeAttributeTestClusterListOctetString : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeListOctetStringWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeListOctetStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87157,10 +86820,10 @@ class ReadTestClusterListStructOctetString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeListStructOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeListStructOctetStringWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListStructOctetString response %@", [value description]); if (error != nil) { LogNSError("TestCluster ListStructOctetString read Error", error); @@ -87188,10 +86851,10 @@ class WriteTestClusterListStructOctetString : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -87210,12 +86873,12 @@ class WriteTestClusterListStructOctetString : public WriteAttribute { [cluster writeAttributeListStructOctetStringWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster ListStructOctetString write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster ListStructOctetString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87238,17 +86901,16 @@ class SubscribeAttributeTestClusterListStructOctetString : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeListStructOctetStringWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeListStructOctetStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87278,10 +86940,10 @@ class ReadTestClusterLongOctetString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLongOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLongOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.LongOctetString response %@", [value description]); if (error != nil) { LogNSError("TestCluster LongOctetString read Error", error); @@ -87308,10 +86970,10 @@ class WriteTestClusterLongOctetString : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -87319,12 +86981,12 @@ class WriteTestClusterLongOctetString : public WriteAttribute { [cluster writeAttributeLongOctetStringWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster LongOctetString write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster LongOctetString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87345,17 +87007,16 @@ class SubscribeAttributeTestClusterLongOctetString : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLongOctetStringWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLongOctetStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87385,10 +87046,10 @@ class ReadTestClusterCharString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.CharString response %@", [value description]); if (error != nil) { LogNSError("TestCluster CharString read Error", error); @@ -87415,10 +87076,10 @@ class WriteTestClusterCharString : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -87428,12 +87089,12 @@ class WriteTestClusterCharString : public WriteAttribute { [cluster writeAttributeCharStringWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster CharString write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster CharString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87454,17 +87115,16 @@ class SubscribeAttributeTestClusterCharString : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeCharStringWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeCharStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87494,10 +87154,10 @@ class ReadTestClusterLongCharString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLongCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeLongCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.LongCharString response %@", [value description]); if (error != nil) { LogNSError("TestCluster LongCharString read Error", error); @@ -87524,10 +87184,10 @@ class WriteTestClusterLongCharString : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -87537,12 +87197,12 @@ class WriteTestClusterLongCharString : public WriteAttribute { [cluster writeAttributeLongCharStringWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster LongCharString write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster LongCharString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87563,17 +87223,16 @@ class SubscribeAttributeTestClusterLongCharString : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeLongCharStringWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeLongCharStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87603,10 +87262,10 @@ class ReadTestClusterEpochUs : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.EpochUs response %@", [value description]); if (error != nil) { LogNSError("TestCluster EpochUs read Error", error); @@ -87633,10 +87292,10 @@ class WriteTestClusterEpochUs : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -87644,12 +87303,12 @@ class WriteTestClusterEpochUs : public WriteAttribute { [cluster writeAttributeEpochUsWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster EpochUs write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster EpochUs write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87670,17 +87329,16 @@ class SubscribeAttributeTestClusterEpochUs : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEpochUsWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEpochUsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87710,10 +87368,10 @@ class ReadTestClusterEpochS : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.EpochS response %@", [value description]); if (error != nil) { LogNSError("TestCluster EpochS read Error", error); @@ -87740,10 +87398,10 @@ class WriteTestClusterEpochS : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -87751,12 +87409,12 @@ class WriteTestClusterEpochS : public WriteAttribute { [cluster writeAttributeEpochSWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster EpochS write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster EpochS write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87777,17 +87435,16 @@ class SubscribeAttributeTestClusterEpochS : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEpochSWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEpochSWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87817,10 +87474,10 @@ class ReadTestClusterVendorId : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.VendorId response %@", [value description]); if (error != nil) { LogNSError("TestCluster VendorId read Error", error); @@ -87847,10 +87504,10 @@ class WriteTestClusterVendorId : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -87858,12 +87515,12 @@ class WriteTestClusterVendorId : public WriteAttribute { [cluster writeAttributeVendorIdWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster VendorId write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster VendorId write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87884,17 +87541,16 @@ class SubscribeAttributeTestClusterVendorId : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeVendorIdWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeVendorIdWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -87924,17 +87580,17 @@ class ReadTestClusterListNullablesAndOptionalsStruct : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [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); - }]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint: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); + }]; return CHIP_NO_ERROR; } }; @@ -87956,10 +87612,10 @@ class WriteTestClusterListNullablesAndOptionalsStruct : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -88127,14 +87783,13 @@ class WriteTestClusterListNullablesAndOptionalsStruct : public WriteAttribute { [cluster writeAttributeListNullablesAndOptionalsStructWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "TestCluster ListNullablesAndOptionalsStruct write Error", - error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "TestCluster ListNullablesAndOptionalsStruct write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88158,17 +87813,16 @@ class SubscribeAttributeTestClusterListNullablesAndOptionalsStruct : public Subs { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeListNullablesAndOptionalsStructWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeListNullablesAndOptionalsStructWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88198,10 +87852,10 @@ class ReadTestClusterEnumAttr : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.EnumAttr response %@", [value description]); if (error != nil) { LogNSError("TestCluster EnumAttr read Error", error); @@ -88228,10 +87882,10 @@ class WriteTestClusterEnumAttr : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -88239,12 +87893,12 @@ class WriteTestClusterEnumAttr : public WriteAttribute { [cluster writeAttributeEnumAttrWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster EnumAttr write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster EnumAttr write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88265,17 +87919,16 @@ class SubscribeAttributeTestClusterEnumAttr : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeEnumAttrWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeEnumAttrWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88305,10 +87958,10 @@ class ReadTestClusterStructAttr : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStructAttrWithCompletion:^( + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeStructAttrWithCompletionHandler:^( MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.StructAttr response %@", [value description]); if (error != nil) { @@ -88337,10 +87990,10 @@ class WriteTestClusterStructAttr : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -88357,12 +88010,12 @@ class WriteTestClusterStructAttr : public WriteAttribute { [cluster writeAttributeStructAttrWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster StructAttr write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster StructAttr write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88384,17 +88037,16 @@ class SubscribeAttributeTestClusterStructAttr : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeStructAttrWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeStructAttrWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88424,10 +88076,10 @@ class ReadTestClusterRangeRestrictedInt8u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt8u response %@", [value description]); if (error != nil) { LogNSError("TestCluster RangeRestrictedInt8u read Error", error); @@ -88454,10 +88106,10 @@ class WriteTestClusterRangeRestrictedInt8u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -88465,12 +88117,12 @@ class WriteTestClusterRangeRestrictedInt8u : public WriteAttribute { [cluster writeAttributeRangeRestrictedInt8uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster RangeRestrictedInt8u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster RangeRestrictedInt8u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88491,17 +88143,16 @@ class SubscribeAttributeTestClusterRangeRestrictedInt8u : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRangeRestrictedInt8uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRangeRestrictedInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88531,10 +88182,10 @@ class ReadTestClusterRangeRestrictedInt8s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt8s response %@", [value description]); if (error != nil) { LogNSError("TestCluster RangeRestrictedInt8s read Error", error); @@ -88561,10 +88212,10 @@ class WriteTestClusterRangeRestrictedInt8s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -88572,12 +88223,12 @@ class WriteTestClusterRangeRestrictedInt8s : public WriteAttribute { [cluster writeAttributeRangeRestrictedInt8sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster RangeRestrictedInt8s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster RangeRestrictedInt8s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88598,17 +88249,16 @@ class SubscribeAttributeTestClusterRangeRestrictedInt8s : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRangeRestrictedInt8sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRangeRestrictedInt8sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88638,10 +88288,10 @@ class ReadTestClusterRangeRestrictedInt16u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt16u response %@", [value description]); if (error != nil) { LogNSError("TestCluster RangeRestrictedInt16u read Error", error); @@ -88668,10 +88318,10 @@ class WriteTestClusterRangeRestrictedInt16u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -88679,12 +88329,12 @@ class WriteTestClusterRangeRestrictedInt16u : public WriteAttribute { [cluster writeAttributeRangeRestrictedInt16uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster RangeRestrictedInt16u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster RangeRestrictedInt16u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88705,17 +88355,16 @@ class SubscribeAttributeTestClusterRangeRestrictedInt16u : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRangeRestrictedInt16uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRangeRestrictedInt16uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88745,10 +88394,10 @@ class ReadTestClusterRangeRestrictedInt16s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt16s response %@", [value description]); if (error != nil) { LogNSError("TestCluster RangeRestrictedInt16s read Error", error); @@ -88775,10 +88424,10 @@ class WriteTestClusterRangeRestrictedInt16s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -88786,12 +88435,12 @@ class WriteTestClusterRangeRestrictedInt16s : public WriteAttribute { [cluster writeAttributeRangeRestrictedInt16sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster RangeRestrictedInt16s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster RangeRestrictedInt16s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88812,17 +88461,16 @@ class SubscribeAttributeTestClusterRangeRestrictedInt16s : public SubscribeAttri { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeRangeRestrictedInt16sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeRangeRestrictedInt16sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88852,10 +88500,10 @@ class ReadTestClusterListLongOctetString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeListLongOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeListLongOctetStringWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListLongOctetString response %@", [value description]); if (error != nil) { LogNSError("TestCluster ListLongOctetString read Error", error); @@ -88883,10 +88531,10 @@ class WriteTestClusterListLongOctetString : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -88903,12 +88551,12 @@ class WriteTestClusterListLongOctetString : public WriteAttribute { [cluster writeAttributeListLongOctetStringWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster ListLongOctetString write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster ListLongOctetString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88930,17 +88578,16 @@ class SubscribeAttributeTestClusterListLongOctetString : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeListLongOctetStringWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeListLongOctetStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -88970,21 +88617,19 @@ class ReadTestClusterListFabricScoped : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000002B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeListFabricScopedWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TestCluster.ListFabricScoped response %@", [value description]); - if (error != nil) { - LogNSError("TestCluster ListFabricScoped read Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(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; } }; @@ -89006,10 +88651,10 @@ class WriteTestClusterListFabricScoped : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000002B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -89075,12 +88720,12 @@ class WriteTestClusterListFabricScoped : public WriteAttribute { [cluster writeAttributeListFabricScopedWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster ListFabricScoped write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster ListFabricScoped write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89103,17 +88748,16 @@ class SubscribeAttributeTestClusterListFabricScoped : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000002B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeListFabricScopedWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeListFabricScopedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89143,10 +88787,10 @@ class ReadTestClusterTimedWriteBoolean : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTimedWriteBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeTimedWriteBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.TimedWriteBoolean response %@", [value description]); if (error != nil) { LogNSError("TestCluster TimedWriteBoolean read Error", error); @@ -89173,10 +88817,10 @@ class WriteTestClusterTimedWriteBoolean : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -89184,12 +88828,12 @@ class WriteTestClusterTimedWriteBoolean : public WriteAttribute { [cluster writeAttributeTimedWriteBooleanWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster TimedWriteBoolean write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster TimedWriteBoolean write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89210,17 +88854,16 @@ class SubscribeAttributeTestClusterTimedWriteBoolean : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeTimedWriteBooleanWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeTimedWriteBooleanWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89250,10 +88893,10 @@ class ReadTestClusterGeneralErrorBoolean : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneralErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneralErrorBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.GeneralErrorBoolean response %@", [value description]); if (error != nil) { LogNSError("TestCluster GeneralErrorBoolean read Error", error); @@ -89280,10 +88923,10 @@ class WriteTestClusterGeneralErrorBoolean : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -89291,12 +88934,12 @@ class WriteTestClusterGeneralErrorBoolean : public WriteAttribute { [cluster writeAttributeGeneralErrorBooleanWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster GeneralErrorBoolean write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster GeneralErrorBoolean write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89317,17 +88960,16 @@ class SubscribeAttributeTestClusterGeneralErrorBoolean : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneralErrorBooleanWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneralErrorBooleanWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89357,10 +88999,10 @@ class ReadTestClusterClusterErrorBoolean : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterErrorBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ClusterErrorBoolean response %@", [value description]); if (error != nil) { LogNSError("TestCluster ClusterErrorBoolean read Error", error); @@ -89387,10 +89029,10 @@ class WriteTestClusterClusterErrorBoolean : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -89398,12 +89040,12 @@ class WriteTestClusterClusterErrorBoolean : public WriteAttribute { [cluster writeAttributeClusterErrorBooleanWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster ClusterErrorBoolean write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster ClusterErrorBoolean write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89424,17 +89066,16 @@ class SubscribeAttributeTestClusterClusterErrorBoolean : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterErrorBooleanWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterErrorBooleanWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89464,10 +89105,10 @@ class ReadTestClusterUnsupported : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x000000FF) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUnsupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeUnsupportedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Unsupported response %@", [value description]); if (error != nil) { LogNSError("TestCluster Unsupported read Error", error); @@ -89494,10 +89135,10 @@ class WriteTestClusterUnsupported : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x000000FF) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -89505,12 +89146,12 @@ class WriteTestClusterUnsupported : public WriteAttribute { [cluster writeAttributeUnsupportedWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Unsupported write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Unsupported write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89531,17 +89172,16 @@ class SubscribeAttributeTestClusterUnsupported : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x000000FF) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeUnsupportedWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeUnsupportedWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89571,10 +89211,10 @@ class ReadTestClusterNullableBoolean : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBoolean response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableBoolean read Error", error); @@ -89601,10 +89241,10 @@ class WriteTestClusterNullableBoolean : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -89612,12 +89252,12 @@ class WriteTestClusterNullableBoolean : public WriteAttribute { [cluster writeAttributeNullableBooleanWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableBoolean write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableBoolean write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89638,17 +89278,16 @@ class SubscribeAttributeTestClusterNullableBoolean : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableBooleanWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableBooleanWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89678,10 +89317,10 @@ class ReadTestClusterNullableBitmap8 : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap8 response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableBitmap8 read Error", error); @@ -89708,10 +89347,10 @@ class WriteTestClusterNullableBitmap8 : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -89719,12 +89358,12 @@ class WriteTestClusterNullableBitmap8 : public WriteAttribute { [cluster writeAttributeNullableBitmap8WithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableBitmap8 write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableBitmap8 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89745,17 +89384,16 @@ class SubscribeAttributeTestClusterNullableBitmap8 : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableBitmap8WithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableBitmap8WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89785,10 +89423,10 @@ class ReadTestClusterNullableBitmap16 : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap16 response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableBitmap16 read Error", error); @@ -89815,10 +89453,10 @@ class WriteTestClusterNullableBitmap16 : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -89826,12 +89464,12 @@ class WriteTestClusterNullableBitmap16 : public WriteAttribute { [cluster writeAttributeNullableBitmap16WithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableBitmap16 write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableBitmap16 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89852,17 +89490,16 @@ class SubscribeAttributeTestClusterNullableBitmap16 : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableBitmap16WithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableBitmap16WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89892,10 +89529,10 @@ class ReadTestClusterNullableBitmap32 : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap32 response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableBitmap32 read Error", error); @@ -89922,10 +89559,10 @@ class WriteTestClusterNullableBitmap32 : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -89933,12 +89570,12 @@ class WriteTestClusterNullableBitmap32 : public WriteAttribute { [cluster writeAttributeNullableBitmap32WithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableBitmap32 write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableBitmap32 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89959,17 +89596,16 @@ class SubscribeAttributeTestClusterNullableBitmap32 : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableBitmap32WithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableBitmap32WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -89999,10 +89635,10 @@ class ReadTestClusterNullableBitmap64 : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap64 response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableBitmap64 read Error", error); @@ -90029,10 +89665,10 @@ class WriteTestClusterNullableBitmap64 : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -90040,12 +89676,12 @@ class WriteTestClusterNullableBitmap64 : public WriteAttribute { [cluster writeAttributeNullableBitmap64WithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableBitmap64 write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableBitmap64 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90066,17 +89702,16 @@ class SubscribeAttributeTestClusterNullableBitmap64 : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableBitmap64WithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableBitmap64WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90106,10 +89741,10 @@ class ReadTestClusterNullableInt8u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt8u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt8u read Error", error); @@ -90136,10 +89771,10 @@ class WriteTestClusterNullableInt8u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -90147,12 +89782,12 @@ class WriteTestClusterNullableInt8u : public WriteAttribute { [cluster writeAttributeNullableInt8uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt8u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt8u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90173,17 +89808,16 @@ class SubscribeAttributeTestClusterNullableInt8u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt8uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90213,10 +89847,10 @@ class ReadTestClusterNullableInt16u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt16u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt16u read Error", error); @@ -90243,10 +89877,10 @@ class WriteTestClusterNullableInt16u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -90254,12 +89888,12 @@ class WriteTestClusterNullableInt16u : public WriteAttribute { [cluster writeAttributeNullableInt16uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt16u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt16u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90280,17 +89914,16 @@ class SubscribeAttributeTestClusterNullableInt16u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt16uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt16uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90320,10 +89953,10 @@ class ReadTestClusterNullableInt24u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt24uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt24uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt24u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt24u read Error", error); @@ -90350,10 +89983,10 @@ class WriteTestClusterNullableInt24u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -90361,12 +89994,12 @@ class WriteTestClusterNullableInt24u : public WriteAttribute { [cluster writeAttributeNullableInt24uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt24u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt24u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90387,17 +90020,16 @@ class SubscribeAttributeTestClusterNullableInt24u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt24uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt24uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90427,10 +90059,10 @@ class ReadTestClusterNullableInt32u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt32u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt32u read Error", error); @@ -90457,10 +90089,10 @@ class WriteTestClusterNullableInt32u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -90468,12 +90100,12 @@ class WriteTestClusterNullableInt32u : public WriteAttribute { [cluster writeAttributeNullableInt32uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt32u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt32u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90494,17 +90126,16 @@ class SubscribeAttributeTestClusterNullableInt32u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt32uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt32uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90534,10 +90165,10 @@ class ReadTestClusterNullableInt40u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt40uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt40uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt40u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt40u read Error", error); @@ -90564,10 +90195,10 @@ class WriteTestClusterNullableInt40u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -90575,12 +90206,12 @@ class WriteTestClusterNullableInt40u : public WriteAttribute { [cluster writeAttributeNullableInt40uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt40u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt40u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90601,17 +90232,16 @@ class SubscribeAttributeTestClusterNullableInt40u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt40uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt40uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90641,10 +90271,10 @@ class ReadTestClusterNullableInt48u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt48uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt48uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt48u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt48u read Error", error); @@ -90671,10 +90301,10 @@ class WriteTestClusterNullableInt48u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -90682,12 +90312,12 @@ class WriteTestClusterNullableInt48u : public WriteAttribute { [cluster writeAttributeNullableInt48uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt48u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt48u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90708,17 +90338,16 @@ class SubscribeAttributeTestClusterNullableInt48u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt48uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt48uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90748,10 +90377,10 @@ class ReadTestClusterNullableInt56u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt56uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt56uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt56u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt56u read Error", error); @@ -90778,10 +90407,10 @@ class WriteTestClusterNullableInt56u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -90789,12 +90418,12 @@ class WriteTestClusterNullableInt56u : public WriteAttribute { [cluster writeAttributeNullableInt56uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt56u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt56u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90815,17 +90444,16 @@ class SubscribeAttributeTestClusterNullableInt56u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt56uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt56uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90855,10 +90483,10 @@ class ReadTestClusterNullableInt64u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt64u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt64u read Error", error); @@ -90885,10 +90513,10 @@ class WriteTestClusterNullableInt64u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -90896,12 +90524,12 @@ class WriteTestClusterNullableInt64u : public WriteAttribute { [cluster writeAttributeNullableInt64uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt64u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt64u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90922,17 +90550,16 @@ class SubscribeAttributeTestClusterNullableInt64u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt64uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt64uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -90962,10 +90589,10 @@ class ReadTestClusterNullableInt8s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt8s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt8s read Error", error); @@ -90992,10 +90619,10 @@ class WriteTestClusterNullableInt8s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -91003,12 +90630,12 @@ class WriteTestClusterNullableInt8s : public WriteAttribute { [cluster writeAttributeNullableInt8sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt8s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt8s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91029,17 +90656,16 @@ class SubscribeAttributeTestClusterNullableInt8s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt8sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt8sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91069,10 +90695,10 @@ class ReadTestClusterNullableInt16s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt16s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt16s read Error", error); @@ -91099,10 +90725,10 @@ class WriteTestClusterNullableInt16s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -91110,12 +90736,12 @@ class WriteTestClusterNullableInt16s : public WriteAttribute { [cluster writeAttributeNullableInt16sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt16s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt16s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91136,17 +90762,16 @@ class SubscribeAttributeTestClusterNullableInt16s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt16sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt16sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91176,10 +90801,10 @@ class ReadTestClusterNullableInt24s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt24sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt24sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt24s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt24s read Error", error); @@ -91206,10 +90831,10 @@ class WriteTestClusterNullableInt24s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -91217,12 +90842,12 @@ class WriteTestClusterNullableInt24s : public WriteAttribute { [cluster writeAttributeNullableInt24sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt24s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt24s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91243,17 +90868,16 @@ class SubscribeAttributeTestClusterNullableInt24s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt24sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt24sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91283,10 +90907,10 @@ class ReadTestClusterNullableInt32s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt32s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt32s read Error", error); @@ -91313,10 +90937,10 @@ class WriteTestClusterNullableInt32s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -91324,12 +90948,12 @@ class WriteTestClusterNullableInt32s : public WriteAttribute { [cluster writeAttributeNullableInt32sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt32s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt32s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91350,17 +90974,16 @@ class SubscribeAttributeTestClusterNullableInt32s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt32sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt32sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91390,10 +91013,10 @@ class ReadTestClusterNullableInt40s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt40sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt40sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt40s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt40s read Error", error); @@ -91420,10 +91043,10 @@ class WriteTestClusterNullableInt40s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -91431,12 +91054,12 @@ class WriteTestClusterNullableInt40s : public WriteAttribute { [cluster writeAttributeNullableInt40sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt40s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt40s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91457,17 +91080,16 @@ class SubscribeAttributeTestClusterNullableInt40s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt40sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt40sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91497,10 +91119,10 @@ class ReadTestClusterNullableInt48s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt48sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt48sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt48s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt48s read Error", error); @@ -91527,10 +91149,10 @@ class WriteTestClusterNullableInt48s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -91538,12 +91160,12 @@ class WriteTestClusterNullableInt48s : public WriteAttribute { [cluster writeAttributeNullableInt48sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt48s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt48s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91564,17 +91186,16 @@ class SubscribeAttributeTestClusterNullableInt48s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt48sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt48sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91604,10 +91225,10 @@ class ReadTestClusterNullableInt56s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt56sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt56sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt56s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt56s read Error", error); @@ -91634,10 +91255,10 @@ class WriteTestClusterNullableInt56s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -91645,12 +91266,12 @@ class WriteTestClusterNullableInt56s : public WriteAttribute { [cluster writeAttributeNullableInt56sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt56s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt56s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91671,17 +91292,16 @@ class SubscribeAttributeTestClusterNullableInt56s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt56sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt56sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91711,10 +91331,10 @@ class ReadTestClusterNullableInt64s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt64s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt64s read Error", error); @@ -91741,10 +91361,10 @@ class WriteTestClusterNullableInt64s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -91752,12 +91372,12 @@ class WriteTestClusterNullableInt64s : public WriteAttribute { [cluster writeAttributeNullableInt64sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt64s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt64s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91778,17 +91398,16 @@ class SubscribeAttributeTestClusterNullableInt64s : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableInt64sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableInt64sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91818,10 +91437,10 @@ class ReadTestClusterNullableEnum8 : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableEnum8 response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableEnum8 read Error", error); @@ -91848,10 +91467,10 @@ class WriteTestClusterNullableEnum8 : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -91859,12 +91478,12 @@ class WriteTestClusterNullableEnum8 : public WriteAttribute { [cluster writeAttributeNullableEnum8WithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableEnum8 write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableEnum8 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91885,17 +91504,16 @@ class SubscribeAttributeTestClusterNullableEnum8 : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableEnum8WithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableEnum8WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -91925,10 +91543,10 @@ class ReadTestClusterNullableEnum16 : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableEnum16 response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableEnum16 read Error", error); @@ -91955,10 +91573,10 @@ class WriteTestClusterNullableEnum16 : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -91966,12 +91584,12 @@ class WriteTestClusterNullableEnum16 : public WriteAttribute { [cluster writeAttributeNullableEnum16WithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableEnum16 write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableEnum16 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91992,17 +91610,16 @@ class SubscribeAttributeTestClusterNullableEnum16 : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableEnum16WithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableEnum16WithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92032,10 +91649,10 @@ class ReadTestClusterNullableFloatSingle : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableFloatSingle response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableFloatSingle read Error", error); @@ -92062,10 +91679,10 @@ class WriteTestClusterNullableFloatSingle : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -92073,12 +91690,12 @@ class WriteTestClusterNullableFloatSingle : public WriteAttribute { [cluster writeAttributeNullableFloatSingleWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableFloatSingle write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableFloatSingle write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92099,17 +91716,16 @@ class SubscribeAttributeTestClusterNullableFloatSingle : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableFloatSingleWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableFloatSingleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92139,10 +91755,10 @@ class ReadTestClusterNullableFloatDouble : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableFloatDouble response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableFloatDouble read Error", error); @@ -92169,10 +91785,10 @@ class WriteTestClusterNullableFloatDouble : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -92180,12 +91796,12 @@ class WriteTestClusterNullableFloatDouble : public WriteAttribute { [cluster writeAttributeNullableFloatDoubleWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableFloatDouble write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableFloatDouble write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92206,17 +91822,16 @@ class SubscribeAttributeTestClusterNullableFloatDouble : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableFloatDoubleWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableFloatDoubleWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92246,10 +91861,10 @@ class ReadTestClusterNullableOctetString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableOctetString response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableOctetString read Error", error); @@ -92276,10 +91891,10 @@ class WriteTestClusterNullableOctetString : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -92287,12 +91902,12 @@ class WriteTestClusterNullableOctetString : public WriteAttribute { [cluster writeAttributeNullableOctetStringWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableOctetString write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableOctetString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92313,17 +91928,16 @@ class SubscribeAttributeTestClusterNullableOctetString : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableOctetStringWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableOctetStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92353,10 +91967,10 @@ class ReadTestClusterNullableCharString : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000401E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableCharString response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableCharString read Error", error); @@ -92383,10 +91997,10 @@ class WriteTestClusterNullableCharString : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000401E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -92396,12 +92010,12 @@ class WriteTestClusterNullableCharString : public WriteAttribute { [cluster writeAttributeNullableCharStringWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableCharString write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableCharString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92422,17 +92036,16 @@ class SubscribeAttributeTestClusterNullableCharString : public SubscribeAttribut { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000401E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableCharStringWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableCharStringWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92462,10 +92075,10 @@ class ReadTestClusterNullableEnumAttr : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableEnumAttr response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableEnumAttr read Error", error); @@ -92492,10 +92105,10 @@ class WriteTestClusterNullableEnumAttr : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -92503,12 +92116,12 @@ class WriteTestClusterNullableEnumAttr : public WriteAttribute { [cluster writeAttributeNullableEnumAttrWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableEnumAttr write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableEnumAttr write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92529,17 +92142,16 @@ class SubscribeAttributeTestClusterNullableEnumAttr : public SubscribeAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableEnumAttrWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableEnumAttrWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92569,10 +92181,10 @@ class ReadTestClusterNullableStruct : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableStructWithCompletion:^( + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableStructWithCompletionHandler:^( MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableStruct response %@", [value description]); if (error != nil) { @@ -92601,10 +92213,10 @@ class WriteTestClusterNullableStruct : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -92627,12 +92239,12 @@ class WriteTestClusterNullableStruct : public WriteAttribute { [cluster writeAttributeNullableStructWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableStruct write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableStruct write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92654,17 +92266,16 @@ class SubscribeAttributeTestClusterNullableStruct : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableStructWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableStructWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92694,10 +92305,11 @@ class ReadTestClusterNullableRangeRestrictedInt8u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt8u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableRangeRestrictedInt8u read Error", error); @@ -92724,24 +92336,24 @@ class WriteTestClusterNullableRangeRestrictedInt8u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableRangeRestrictedInt8u write Error", - error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeNullableRangeRestrictedInt8uWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableRangeRestrictedInt8u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92762,17 +92374,16 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt8u : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableRangeRestrictedInt8uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92802,10 +92413,11 @@ class ReadTestClusterNullableRangeRestrictedInt8s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt8s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableRangeRestrictedInt8s read Error", error); @@ -92832,24 +92444,24 @@ class WriteTestClusterNullableRangeRestrictedInt8s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithChar:mValue]; - [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableRangeRestrictedInt8s write Error", - error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeNullableRangeRestrictedInt8sWithValue:value + params:params + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableRangeRestrictedInt8s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92870,17 +92482,16 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt8s : public Subscri { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableRangeRestrictedInt8sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -92910,10 +92521,11 @@ class ReadTestClusterNullableRangeRestrictedInt16u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt16u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableRangeRestrictedInt16u read Error", error); @@ -92940,10 +92552,10 @@ class WriteTestClusterNullableRangeRestrictedInt16u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -92952,13 +92564,12 @@ class WriteTestClusterNullableRangeRestrictedInt16u : public WriteAttribute { [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "TestCluster NullableRangeRestrictedInt16u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableRangeRestrictedInt16u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92979,17 +92590,16 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt16u : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableRangeRestrictedInt16uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -93019,10 +92629,11 @@ class ReadTestClusterNullableRangeRestrictedInt16s : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt16s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableRangeRestrictedInt16s read Error", error); @@ -93049,10 +92660,10 @@ class WriteTestClusterNullableRangeRestrictedInt16s : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -93061,13 +92672,12 @@ class WriteTestClusterNullableRangeRestrictedInt16s : public WriteAttribute { [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "TestCluster NullableRangeRestrictedInt16s write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableRangeRestrictedInt16s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -93088,17 +92698,16 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt16s : public Subscr { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeNullableRangeRestrictedInt16sWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -93128,10 +92737,10 @@ class ReadTestClusterWriteOnlyInt8u : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000402A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWriteOnlyInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeWriteOnlyInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.WriteOnlyInt8u response %@", [value description]); if (error != nil) { LogNSError("TestCluster WriteOnlyInt8u read Error", error); @@ -93158,10 +92767,10 @@ class WriteTestClusterWriteOnlyInt8u : public WriteAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000402A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRWriteParams * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -93169,12 +92778,12 @@ class WriteTestClusterWriteOnlyInt8u : public WriteAttribute { [cluster writeAttributeWriteOnlyInt8uWithValue:value params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster WriteOnlyInt8u write Error", error); - } - SetCommandExitStatus(error); - }]; + completionHandler:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster WriteOnlyInt8u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -93195,17 +92804,16 @@ class SubscribeAttributeTestClusterWriteOnlyInt8u : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000402A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeWriteOnlyInt8uWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeWriteOnlyInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -93235,10 +92843,10 @@ class ReadTestClusterGeneratedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("TestCluster GeneratedCommandList read Error", error); @@ -93262,17 +92870,16 @@ class SubscribeAttributeTestClusterGeneratedCommandList : public SubscribeAttrib { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -93302,10 +92909,10 @@ class ReadTestClusterAcceptedCommandList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("TestCluster AcceptedCommandList read Error", error); @@ -93329,17 +92936,16 @@ class SubscribeAttributeTestClusterAcceptedCommandList : public SubscribeAttribu { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -93369,10 +92975,10 @@ class ReadTestClusterAttributeList : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.AttributeList response %@", [value description]); if (error != nil) { LogNSError("TestCluster AttributeList read Error", error); @@ -93396,17 +93002,16 @@ class SubscribeAttributeTestClusterAttributeList : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -93436,10 +93041,10 @@ class ReadTestClusterFeatureMap : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("TestCluster FeatureMap read Error", error); @@ -93463,17 +93068,16 @@ class SubscribeAttributeTestClusterFeatureMap : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } @@ -93503,10 +93107,10 @@ class ReadTestClusterClusterRevision : public ReadAttribute { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("TestCluster ClusterRevision read Error", error); @@ -93530,17 +93134,16 @@ class SubscribeAttributeTestClusterClusterRevision : public SubscribeAttribute { { ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device - endpoint:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.keepPreviousSubscriptions = mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.fabricFiltered = mFabricFiltered.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } 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 f6f906f71af461..cc1de401bb6890 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -27,8 +27,6 @@ #include // For INFINITY -typedef void (^ResponseHandler)(id _Nullable value, NSError * _Nullable error); - class TestList : public Command { public: TestList() @@ -480,7 +478,6 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestWaitForCommissionee_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -488,9 +485,10 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestWriteEntries_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -587,317 +585,281 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write entries Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestVerify_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster + readAttributeAclWithParams:params + completionHandler:^(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; } CHIP_ERROR TestWriteEntriesEmptyLists_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -925,69 +887,72 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write entries empty lists Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestVerify_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster + readAttributeAclWithParams:params + completionHandler:^(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; } CHIP_ERROR TestWriteEntryInvalidPrivilege_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -1009,62 +974,64 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write entry invalid privilege Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestVerify_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeAclWithParams:params + completionHandler:^(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; } CHIP_ERROR TestWriteEntryInvalidAuthMode_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -1086,62 +1053,64 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write entry invalid auth mode Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestVerify_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeAclWithParams:params + completionHandler:^(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; } CHIP_ERROR TestWriteEntryInvalidSubject_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -1167,62 +1136,64 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write entry invalid subject Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestVerify_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeAclWithParams:params + completionHandler:^(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; } CHIP_ERROR TestWriteEntryInvalidTarget_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -1252,62 +1223,64 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write entry invalid target Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestVerify_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeAclWithParams:params + completionHandler:^(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; } CHIP_ERROR TestWriteEntryTooManySubjects_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -1352,62 +1325,64 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write entry too many subjects Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestVerify_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeAclWithParams:params + completionHandler:^(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; } CHIP_ERROR TestWriteEntryTooManyTargets_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -1532,62 +1507,64 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write entry too many targets Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestVerify_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeAclWithParams:params + completionHandler:^(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; } CHIP_ERROR TestWriteTooManyEntries_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -1716,320 +1693,284 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write too many entries Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestVerify_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster + readAttributeAclWithParams:params + completionHandler:^(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; } CHIP_ERROR TestRestoreAcl_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -2044,110 +1985,117 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Restore ACL Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestVerify_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeAclWithParams:params + completionHandler:^(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; } CHIP_ERROR TestValidateResourceMinimaSubjectsPerAccessControlEntry_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSubjectsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Validate resource minima (SubjectsPerAccessControlEntry) Error: %@", err); + [cluster + readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:^(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; } CHIP_ERROR TestValidateResourceMinimaTargetsPerAccessControlEntry_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Validate resource minima (TargetsPerAccessControlEntry) Error: %@", err); + [cluster + readAttributeTargetsPerAccessControlEntryWithCompletionHandler:^(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; } CHIP_ERROR TestValidateResourceMinimaAccessControlEntriesPerFabric_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAccessControlEntriesPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Validate resource minima (AccessControlEntriesPerFabric) Error: %@", err); + [cluster + readAttributeAccessControlEntriesPerFabricWithCompletionHandler:^(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; } @@ -2277,7 +2225,6 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -2285,12 +2232,13 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsClusterRevisionAttributeFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ClusterRevision attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2309,12 +2257,13 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureMapAttributeFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads FeatureMap attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2333,12 +2282,13 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListAttributeFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2362,12 +2312,13 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeExtensionInAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (Extension) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2383,12 +2334,13 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2407,12 +2359,13 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListAttributeFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2541,7 +2494,6 @@ class Test_TC_ACL_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -2549,12 +2501,14 @@ class Test_TC_ACL_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsSubjectsPerAccessControlEntryAttributeFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSubjectsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads SubjectsPerAccessControlEntry attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2571,12 +2525,14 @@ class Test_TC_ACL_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTargetsPerAccessControlEntryAttributeFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetsPerAccessControlEntryWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads TargetsPerAccessControlEntry attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2593,12 +2549,14 @@ class Test_TC_ACL_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAccessControlEntriesPerFabricAttributeFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAccessControlEntriesPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAccessControlEntriesPerFabricWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AccessControlEntriesPerFabric attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2712,7 +2670,6 @@ class Test_TC_ACL_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -2720,12 +2677,13 @@ class Test_TC_ACL_2_2 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsDutDescriptorClusterServerListAttributeFromEndpoint0_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeServerListWithCompletionHandler:^(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)); @@ -2741,7 +2699,6 @@ class Test_TC_ACL_2_2 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsDutDescriptorClusterServerListAttributeFromEveryEndpointExcept0_2() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); @@ -2864,7 +2821,6 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -2872,12 +2828,13 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2896,12 +2853,13 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2920,12 +2878,13 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2946,12 +2905,13 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2970,12 +2930,13 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3082,7 +3043,6 @@ class Test_TC_BOOL_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -3090,12 +3050,13 @@ class Test_TC_BOOL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadMandatoryNonGlobalAttributeStateValue_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStateValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read mandatory non-global attribute: StateValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3232,7 +3193,6 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -3240,12 +3200,11 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3264,12 +3223,11 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3288,12 +3246,11 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3315,12 +3272,11 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeSetupURLInAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(SetupURL) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3336,12 +3292,11 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3356,12 +3311,11 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3492,7 +3446,6 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -3500,12 +3453,11 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3524,12 +3476,11 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3548,12 +3499,11 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3574,12 +3524,11 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3598,12 +3547,11 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4206,7 +4154,6 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -4214,12 +4161,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4238,12 +4186,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4262,12 +4211,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenCcsf00hsEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -4281,12 +4231,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenCCSF01EHueEnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -4300,12 +4251,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenCcsf02clEnsureFeaturemapHasTheCorrectBitSet_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -4319,12 +4271,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenCcsf03xyEnsureFeaturemapHasTheCorrectBitSet_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -4338,12 +4291,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenCcsf04ctEnsureFeaturemapHasTheCorrectBitSet_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -4357,12 +4311,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4386,12 +4341,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCurrentHueInAttributeList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentHue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4407,12 +4363,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCurrentSaturationInAttributeList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentSaturation) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4428,12 +4385,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeRemainingTimeInAttributeList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(RemainingTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4449,12 +4407,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCurrentXInAttributeList_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentX) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4470,12 +4429,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCurrentYInAttributeList_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentY) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4491,12 +4451,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeDriftCompensationInAttributeList_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(DriftCompensation) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4512,12 +4473,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCompensationTextInAttributeList_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CompensationText) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4533,12 +4495,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorTemperatureMiredsInAttributeList_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorTemperatureMireds) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4554,12 +4517,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeEnhancedCurrentHueInAttributeList_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(EnhancedCurrentHue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4575,12 +4539,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorLoopActiveInAttributeList_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorLoopActive) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4596,12 +4561,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorLoopDirectionInAttributeList_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorLoopDirection) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4617,12 +4583,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorLoopTimeInAttributeList_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorLoopTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4638,12 +4605,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorLoopStartEnhancedHueInAttributeList_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4659,12 +4627,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorLoopStoredEnhancedHueInAttributeList_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4680,12 +4649,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorTempPhysicalMinMiredsInAttributeList_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4701,12 +4671,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorTempPhysicalMaxMiredsInAttributeList_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4722,12 +4693,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCoupleColorTempToLevelMinMiredsInAttributeList_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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,12 +4715,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeStartUpColorTemperatureMiredsInAttributeList_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4764,12 +4737,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandMoveToHueInAcceptedCommandList_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveToHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4785,12 +4759,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandMoveHueInAcceptedCommandList_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4806,12 +4781,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandStepHueInAcceptedCommandList_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(StepHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4827,12 +4803,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandMoveToSaturationInAcceptedCommandList_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveToSaturation) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4848,12 +4825,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandMoveSaturationInAcceptedCommandList_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveSaturation) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4869,12 +4847,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandStepSaturationInAcceptedCommandList_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(StepSaturation) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4890,12 +4869,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandMoveToHueAndSaturationInAcceptedCommandList_33() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4911,12 +4891,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandMoveToColorInAcceptedCommandList_34() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveToColor) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4932,12 +4913,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandMoveColorInAcceptedCommandList_35() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveColor) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4953,12 +4935,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandStepColorInAcceptedCommandList_36() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(StepColor) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4974,12 +4957,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandMoveToColorTemperatureInAcceptedCommandList_37() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveToColorTemperature) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4995,12 +4979,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandEnhancedMoveToHueInAcceptedCommandList_38() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(EnhancedMoveToHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5016,12 +5001,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandEnhancedMoveHueInAcceptedCommandList_39() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(EnhancedMoveHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5037,12 +5023,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandEnhancedStepHueInAcceptedCommandList_40() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(EnhancedStepHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5058,12 +5045,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandEnhancedMoveToHueAndSaturationInAcceptedCommandList_41() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5079,12 +5067,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandColorLoopSetInAcceptedCommandList_42() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(ColorLoopSet) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5100,12 +5089,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandStopMoveStepInAcceptedCommandList_43() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(StopMoveStep) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5121,12 +5111,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandMoveColorTemperatureInAcceptedCommandList_44() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveColorTemperature) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5142,12 +5133,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandStepColorTemperatureInAcceptedCommandList_45() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(StepColorTemperature) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5163,12 +5155,13 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_46() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5880,7 +5873,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -5888,12 +5880,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5910,12 +5903,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5932,12 +5926,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsRemainingTimeAttributeFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads RemainingTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5954,12 +5949,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5976,12 +5972,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5998,12 +5995,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsDriftCompensationAttributeFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDriftCompensationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads DriftCompensation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6020,12 +6018,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCompensationTextAttributeFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCompensationTextWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CompensationText attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6040,12 +6039,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorTemperatureMireds attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6062,12 +6062,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6084,12 +6085,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionsAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Options attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6106,12 +6108,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6128,12 +6131,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6150,12 +6154,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorLoopActiveAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorLoopActive attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6172,12 +6177,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorLoopDirectionAttributeFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorLoopDirectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorLoopDirection attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6194,12 +6200,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorLoopTimeAttributeFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorLoopTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorLoopTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6216,44 +6223,48 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorLoopStartEnhancedHueAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorLoopStartEnhancedHue attribute from DUT Error: %@", err); + [cluster + readAttributeColorLoopStartEnhancedHueWithCompletionHandler:^(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; } CHIP_ERROR TestThReadsColorLoopStoredEnhancedHueAttributeFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorLoopStoredEnhancedHue attribute from DUT Error: %@", err); + [cluster + readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(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; } @@ -6261,12 +6272,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestSavingForComparisionInStep19ReadsFeatureMapAttributeFromDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -6283,12 +6295,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorCapabilitiesAttributeFromDut_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorCapabilitiesWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorCapabilities attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6310,56 +6323,62 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); + [cluster + readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:^(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; } CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT Error: %@", err); + [cluster + readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:^(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; } CHIP_ERROR TestThReadsCoupleColorTempToLevelMinMiredsAttributeFromDut_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CoupleColorTempToLevelMinMireds attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6377,12 +6396,14 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsStartUpColorTemperatureMiredsAttributeFromDut_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads StartUpColorTemperatureMireds attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6403,12 +6424,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsNumberOfPrimariesAttributeFromDut_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNumberOfPrimariesWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NumberOfPrimaries attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6429,7 +6451,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary1XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs1OrMore_25() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6440,7 +6461,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary1YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs1OrMore_26() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6451,7 +6471,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary1IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs1OrMore_27() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6462,7 +6481,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary2XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs2OrMore_28() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6473,7 +6491,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary2YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs2OrMore_29() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6484,7 +6501,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary2IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs2OrMore_30() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6495,7 +6511,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary3XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs3OrMore_31() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6506,7 +6521,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary3YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs3OrMore_32() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6517,7 +6531,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary3IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs3OrMore_33() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6528,7 +6541,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary4XAttributeFromDutVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs4OrMore_34() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6539,7 +6551,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary4YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs4OrMore_35() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6550,7 +6561,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary4IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs4OrMore_36() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6561,7 +6571,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary5XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs5OrMore_37() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6572,7 +6581,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary5YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs5OrMore_38() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6583,7 +6591,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary5IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs5OrMore_39() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6594,7 +6601,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary6XAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs6OrMore_40() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6605,7 +6611,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary6YAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint16Min0Max0xfeffIfNumberOfPrimariesIs6OrMore_41() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6616,7 +6621,6 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsPrimary6IntensityAttributeFromDutAndVerifyThatTheDutResponseContainsAnUint8IfNumberOfPrimariesIs6OrMore_42() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -6626,12 +6630,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsWhitePointXAttributeFromDut_43() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWhitePointXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads WhitePointX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6648,12 +6653,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsWhitePointYAttributeFromDut_44() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWhitePointYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads WhitePointY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6670,12 +6676,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorPointRXAttributeFromDut_45() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointRXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointRX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6692,12 +6699,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorPointRYAttributeFromDut_46() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointRYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointRY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6714,12 +6722,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorPointRIntensityAttributeFromDut_47() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointRIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointRIntensity attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6739,12 +6748,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorPointGXAttributeFromDut_48() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointGXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointGX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6761,12 +6771,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorPointGYAttributeFromDut_49() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointGYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointGY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6783,12 +6794,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorPointGIntensityAttributeFromDut_50() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointGIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointGIntensity attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6808,12 +6820,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorPointBXAttributeFromDut_51() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointBXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointBX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6830,12 +6843,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorPointBYAttributeFromDut_52() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointBYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointBY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6852,12 +6866,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorPointBIntensityAttributeFromDut_53() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointBIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointBIntensity attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7252,7 +7267,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -7260,33 +7274,33 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7299,9 +7313,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToHueCommandToDutWithHue200Direction0x00ShortestDistanceAndTransitionTime0Immediately_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; @@ -7311,22 +7326,21 @@ class Test_TC_CC_3_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " - @"TransitionTime=0 (immediately) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -7334,9 +7348,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveMode0x01UpAndRate5UnitsS_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; @@ -7345,20 +7360,19 @@ class Test_TC_CC_3_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -7366,12 +7380,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7387,7 +7402,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait10s_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -7395,12 +7409,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7416,7 +7431,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait10s_10() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -7424,9 +7438,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveMode0x00StopAndRate5UnitsS_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; @@ -7435,25 +7450,26 @@ class Test_TC_CC_3_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7469,7 +7485,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait2s_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); @@ -7477,12 +7492,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7498,9 +7514,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToHueCommandToDutWithHue60Direction0x00ShortestDistanceAndTransitionTime0Immediately_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; @@ -7510,22 +7527,21 @@ class Test_TC_CC_3_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (shortest distance) and " - @"TransitionTime=0 (immediately) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_16() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -7533,9 +7549,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveMode0x03DownAndRate5UnitsS_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; @@ -7544,20 +7561,19 @@ class Test_TC_CC_3_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_18() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -7565,12 +7581,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7586,7 +7603,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait10s_20() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -7594,12 +7610,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7615,7 +7632,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait10s_22() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -7623,9 +7639,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveMode0x00StopAndRate5UnitsS_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; @@ -7634,25 +7651,26 @@ class Test_TC_CC_3_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7668,7 +7686,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait2s_25() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); @@ -7676,12 +7693,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7697,12 +7715,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7723,12 +7742,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7749,12 +7769,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7767,12 +7786,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -8107,7 +8125,6 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -8115,33 +8132,33 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8154,9 +8171,10 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToHueCommandToDutWithHue200Direction0x00ShortestDistanceAndTransitionTime0Immediately_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; @@ -8166,22 +8184,21 @@ class Test_TC_CC_3_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " - @"TransitionTime=0 (immediately) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -8189,9 +8206,10 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThSendsStepHueCommandToDutWithStepMode0x01UpStepSize60AndTransitionTime20020s_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; @@ -8200,23 +8218,23 @@ 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 - completion:^(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 + completionHandler:^(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; } CHIP_ERROR TestWait10s_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -8224,12 +8242,13 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8245,7 +8264,6 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestWait10s_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -8253,12 +8271,13 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8274,7 +8293,6 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestWait5s_10() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -8282,12 +8300,13 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8303,9 +8322,10 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToHueCommandToDutWithHue50Direction0x00ShortestDistanceAndTransitionTime0Immediately_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; @@ -8315,22 +8335,21 @@ class Test_TC_CC_3_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHue command to DUT with Hue=50, Direction=0x00 (shortest distance) and " - @"TransitionTime=0 (immediately) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -8338,9 +8357,10 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThSendsStepHueCommandToDutWithStepMode0x03DownStepSize60AndTransitionTime20020s_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; @@ -8350,22 +8370,21 @@ class Test_TC_CC_3_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends StepHue command to DUT with StepMode=0x03 (down), StepSize=60 and TransitionTime=200 " - @"(20s) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_15() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -8373,12 +8392,13 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8394,7 +8414,6 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestWait10s_17() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -8402,12 +8421,13 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8423,7 +8443,6 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestWait5s_19() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -8431,12 +8450,13 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8452,12 +8472,13 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8478,12 +8499,13 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8504,12 +8526,11 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8522,12 +8543,11 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -8794,7 +8814,6 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -8802,33 +8821,33 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8841,9 +8860,10 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation60AndTransitionTime0Immediately_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; @@ -8852,22 +8872,21 @@ class Test_TC_CC_4_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=60 and TransitionTime=0 " - @"(immediately) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -8875,9 +8894,10 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation120AndTransitionTime30030s_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; @@ -8885,23 +8905,23 @@ 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 - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=300 " - @"(30s) Error: %@", - err); + [cluster + moveToSaturationWithParams:params + completionHandler:^(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; } CHIP_ERROR TestWait10s_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -8909,12 +8929,13 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8930,7 +8951,6 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestWait10s_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -8938,12 +8958,13 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8959,7 +8980,6 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestWait10s_10() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -8967,12 +8987,13 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8988,7 +9009,6 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestWait5s_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -8996,12 +9016,13 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9017,12 +9038,13 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9043,12 +9065,13 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9069,12 +9092,11 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9087,12 +9109,11 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -9516,7 +9537,6 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -9524,33 +9544,33 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9563,9 +9583,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation150AndTransitionTime0Immediately_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; @@ -9574,22 +9595,21 @@ class Test_TC_CC_4_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=150 and TransitionTime=0 " - @"(immediately) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -9597,9 +9617,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveMode0x01UpAndRate5UnitsS_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; @@ -9609,22 +9630,19 @@ class Test_TC_CC_4_2 : public TestCommandBridge { params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog( - @"TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -9632,12 +9650,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9653,7 +9672,6 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait10s_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -9661,12 +9679,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9682,7 +9701,6 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait5s_10() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -9690,12 +9708,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9711,9 +9730,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation120AndTransitionTime0Immediately_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; @@ -9722,22 +9742,21 @@ class Test_TC_CC_4_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=0 " - @"(immediately) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -9745,9 +9764,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveMode0x03DownAndRate5UnitsS_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; @@ -9755,23 +9775,22 @@ 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 - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveSaturation command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s) " - @"Error: %@", - err); + [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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestWait10s_15() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -9779,12 +9798,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9800,7 +9820,6 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait10s_17() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -9808,12 +9827,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9829,7 +9849,6 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait10s_19() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -9837,12 +9856,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9858,9 +9878,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation150AndTransitionTime0Immediately_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; @@ -9869,22 +9890,21 @@ class Test_TC_CC_4_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=150 and TransitionTime=0 " - @"(immediately) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_22() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -9892,9 +9912,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveMode0x01UpAndRate5UnitsS_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; @@ -9904,22 +9925,19 @@ class Test_TC_CC_4_2 : public TestCommandBridge { params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog( - @"TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_24() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -9927,12 +9945,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9948,9 +9967,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveMode0x00StopAndRate5UnitsS_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; @@ -9958,28 +9978,29 @@ 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 - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveSaturation command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) " - @"Error: %@", - err); + [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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9995,7 +10016,6 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait2s_28() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); @@ -10003,12 +10023,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10024,12 +10045,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10050,12 +10072,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10076,12 +10099,11 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10094,12 +10116,11 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_33() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -10496,7 +10517,6 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -10504,33 +10524,33 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10543,9 +10563,10 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation200AndTransitionTime0Immediately_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; @@ -10554,22 +10575,21 @@ class Test_TC_CC_4_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=200 and TransitionTime=0 " - @"(immediately) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -10577,9 +10597,10 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepMode0x01UpStepSize40AndTransitionTime20020s_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; @@ -10589,22 +10610,21 @@ class Test_TC_CC_4_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=40 and " - @"TransitionTime=200 (20s) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -10612,12 +10632,13 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10633,7 +10654,6 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestWait10s_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -10641,12 +10661,13 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10662,7 +10683,6 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestWait5s_10() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -10670,12 +10690,13 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10691,9 +10712,10 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepMode0x01UpStepSize20AndTransitionTime10010s_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; @@ -10703,22 +10725,21 @@ class Test_TC_CC_4_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=20 and " - @"TransitionTime=100 (10s) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -10726,12 +10747,13 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10747,9 +10769,10 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation50AndTransitionTime0Immediately_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; @@ -10758,22 +10781,21 @@ class Test_TC_CC_4_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=50 and TransitionTime=0 " - @"(immediately) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_16() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -10781,9 +10803,10 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepMode0x03DownStepSize40AndTransitionTime20020s_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; @@ -10793,22 +10816,21 @@ class Test_TC_CC_4_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=40 and " - @"TransitionTime=200 (20s) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_18() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -10816,12 +10838,13 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10837,7 +10860,6 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestWait10s_20() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -10845,12 +10867,13 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10866,7 +10889,6 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestWait5s_22() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -10874,12 +10896,13 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10895,9 +10918,10 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepMode0x03DownStepSize20AndTransitionTime10010S_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; @@ -10907,22 +10931,21 @@ class Test_TC_CC_4_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=20 and " - @"TransitionTime=100 (10 s) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_25() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -10930,12 +10953,13 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10953,12 +10977,13 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10979,12 +11004,13 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11005,12 +11031,11 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11023,12 +11048,11 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -11331,7 +11355,6 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -11339,33 +11362,33 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11378,9 +11401,10 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToHueAndSaturationCommandToDutWithHue200Saturation50AndTransitionTime0Immediately_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; @@ -11390,22 +11414,21 @@ class Test_TC_CC_4_4 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToHueAndSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHueAndSaturation command to DUT with Hue=200, Saturation=50 and " - @"TransitionTime=0 (immediately) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -11413,12 +11436,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11434,12 +11458,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11455,9 +11480,10 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToHueAndSaturationCommandToDutWithHue160Saturation80AndTransitionTime20020s_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; @@ -11467,22 +11493,21 @@ class Test_TC_CC_4_4 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToHueAndSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHueAndSaturation command to DUT with Hue=160, Saturation=80 and " - @"TransitionTime=200 (20s) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -11490,12 +11515,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11511,12 +11537,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11532,7 +11559,6 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestWait10s_11() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -11540,12 +11566,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11561,12 +11588,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11583,7 +11611,6 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestWait5s_14() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -11591,12 +11618,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11612,12 +11640,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11633,12 +11662,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11659,12 +11689,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11685,12 +11716,11 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11703,12 +11733,11 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -12413,7 +12442,6 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -12421,33 +12449,33 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12460,9 +12488,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX327680x8000ColorY196600x4CCCTransitionTime0Immediate_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -12472,22 +12501,21 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -12495,12 +12523,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12516,12 +12545,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12537,9 +12567,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY131070x3333TransitionTime20020s_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -12549,22 +12580,21 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " - @"TransitionTime = 200 (20s) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -12572,12 +12602,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12593,12 +12624,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12614,7 +12646,6 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestWait10s_11() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -12622,12 +12653,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12643,12 +12675,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12664,7 +12697,6 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestWait5s_14() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -12672,12 +12704,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12693,12 +12726,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12714,33 +12748,35 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadOptionsAttribute_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH read Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12758,12 +12794,11 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsOnCommandToDut_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12776,9 +12811,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToColorCommandToTheDutWithColorX327680x8000X05PurpleColorY196600x4CCCY03TransitionTime0Immediate_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -12788,22 +12824,21 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestWait100ms_21() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -12811,12 +12846,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12832,12 +12868,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12853,12 +12890,11 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsOffCommandToDut_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12871,9 +12907,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY131070x3333TransitionTime0Immediate_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -12883,22 +12920,21 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_26() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -12906,12 +12942,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12929,12 +12966,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12952,9 +12990,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY327680x8000TransitionTime0Immediate_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -12964,22 +13003,21 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_30() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -12987,12 +13025,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13010,12 +13049,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13033,9 +13073,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX262140x6666ColorY327680x8000TransitionTime0Immediate_33() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -13045,22 +13086,21 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_34() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -13068,12 +13108,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_35() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13089,12 +13130,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_36() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13110,33 +13152,35 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThWrites1ToTheOptionsAttribute_37() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 1 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadOptionsAttribute_38() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH read Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13154,12 +13198,11 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsOnCommandToDut_39() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13172,9 +13215,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX327680x8000ColorY196600x4CCCTransitionTime0Immediate_40() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -13184,22 +13228,21 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_41() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -13207,12 +13250,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_42() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13228,12 +13272,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_43() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13249,12 +13294,11 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsOffCommandToDut_44() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13267,9 +13311,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY131070x3333TransitionTime0Immediate_45() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -13279,22 +13324,21 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_46() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -13302,12 +13346,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_47() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13323,12 +13368,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_48() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13344,9 +13390,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY327680x8000TransitionTime0Immediate_49() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -13356,22 +13403,21 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_50() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -13379,12 +13425,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_51() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13402,12 +13449,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_52() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13425,9 +13473,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX262140x6666ColorY327680x8000TransitionTime0Immediate_53() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -13437,22 +13486,21 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_54() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -13460,12 +13508,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_55() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13481,12 +13530,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_56() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13502,12 +13552,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_57() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13528,12 +13579,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_58() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13848,7 +13900,6 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -13856,33 +13907,33 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13895,9 +13946,10 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX33000ColorY26000TransitionTime0Immediate_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -13907,22 +13959,21 @@ class Test_TC_CC_5_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 26000 TransitionTime = 0 " - @"(immediate) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -13930,9 +13981,10 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveColorCommandToDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; @@ -13941,20 +13993,19 @@ class Test_TC_CC_5_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveColor command to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -13962,12 +14013,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13983,12 +14035,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14004,7 +14057,6 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestWait10s_9() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -14012,12 +14064,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14033,12 +14086,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14054,7 +14108,6 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestWait10s_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -14063,12 +14116,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14088,12 +14142,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14112,34 +14167,36 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThSendsStopMoveStepCommandToDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stopMoveStepWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends StopMoveStep command to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentXAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14155,12 +14212,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14176,12 +14234,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14202,12 +14261,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14228,12 +14288,11 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14246,12 +14305,11 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -14532,7 +14590,6 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -14540,33 +14597,33 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14579,9 +14636,10 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX33000ColorY20000TransitionTime0Immediate_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; @@ -14591,22 +14649,21 @@ class Test_TC_CC_5_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 20000 TransitionTime = 0 " - @"(immediate) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -14614,9 +14671,10 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestThSendsStepColorCommandToDutWithStepX20000StepY6000TransitionTime20020s_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; @@ -14626,22 +14684,21 @@ class Test_TC_CC_5_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepColorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends StepColor command to DUT, with StepX = -20000, StepY = -6000, TransitionTime = 200 " - @"(20s) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -14649,12 +14706,13 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14670,12 +14728,13 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14691,7 +14750,6 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestWait10s_9() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -14699,12 +14757,13 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14720,12 +14779,13 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14741,7 +14801,6 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestWait5s_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -14749,12 +14808,13 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentXAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14770,12 +14830,13 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentYAttributeFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14791,12 +14852,13 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14817,12 +14879,13 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14843,12 +14906,11 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14861,12 +14923,11 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -15165,7 +15226,6 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -15173,33 +15233,33 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15213,25 +15273,27 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); + [cluster + readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:^(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; } @@ -15239,37 +15301,40 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT. Error: %@", err); + [cluster + readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:^(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; } CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15288,9 +15353,10 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorTemperatureCommandToDutWithColorTemperatureMireds310AndTransitionTime0Immediately_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; @@ -15299,22 +15365,21 @@ class Test_TC_CC_6_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorTemperatureWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds=310 " - @"and TransitionTime=0 (immediately). Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_7() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -15322,9 +15387,10 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestThSendsMoveToColorTemperaturCommandToDutWithColorTemperatureMireds250AndTransitionTime30030s_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; @@ -15333,22 +15399,21 @@ class Test_TC_CC_6_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorTemperatureWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColorTemperatur command to DUT with ColorTemperatureMireds=250 " - @"and TransitionTime=300 (30s). Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_9() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -15356,12 +15421,13 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15377,7 +15443,6 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestWait10s_11() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -15385,12 +15450,13 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15406,7 +15472,6 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestWait10s_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -15414,12 +15479,13 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15435,7 +15501,6 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestWait5s_15() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -15443,12 +15508,13 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15464,12 +15530,13 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15490,12 +15557,13 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15516,12 +15584,11 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn Off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15534,12 +15601,11 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -15910,7 +15976,6 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -15918,33 +15983,33 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15958,9 +16023,10 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue6000Direction0x00ShortestDistanceAndTransitionTime0Immediately_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; @@ -15970,22 +16036,21 @@ class Test_TC_CC_7_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedMoveToHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 " - @"(shortest distance) and TransitionTime=0 (immediately). Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -15993,9 +16058,10 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepMode0x01UpStepSize6000AndTransitionTime30030s_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; @@ -16005,22 +16071,21 @@ class Test_TC_CC_7_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedStepHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedStepHue command to DUT with StepMode=0x01 (up), StepSize=6000 and " - @"TransitionTime=300 (30s). Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -16028,12 +16093,13 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16049,7 +16115,6 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestWait10s_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -16057,12 +16122,13 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16078,7 +16144,6 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestWait10s_10() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -16086,12 +16151,13 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16107,7 +16173,6 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestWait5s_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -16115,12 +16180,13 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16137,9 +16203,10 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue12000Direction0x00ShortestDistanceAndTransitionTime0Immediately_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; @@ -16149,22 +16216,21 @@ class Test_TC_CC_7_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedMoveToHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x00 " - @"(shortest distance) and TransitionTime=0 (immediately). Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait100ms_15() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -16172,9 +16238,10 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepMode0x03DownStepSize6000AndTransitionTime30030s_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; @@ -16184,22 +16251,21 @@ class Test_TC_CC_7_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedStepHueWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedStepHue command to DUT with StepMode=0x03 (down), StepSize=6000 and " - @"TransitionTime=300 (30s) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_17() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -16207,12 +16273,13 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16228,7 +16295,6 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestWait10s_19() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -16236,12 +16302,13 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16257,7 +16324,6 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestWait10s_21() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -16265,12 +16331,13 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16286,7 +16353,6 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestWait5s_23() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -16294,12 +16360,13 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16315,12 +16382,13 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16341,12 +16409,13 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16367,12 +16436,11 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn Off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16385,12 +16453,11 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -16693,7 +16760,6 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -16701,33 +16767,33 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16741,9 +16807,10 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThSendsEnhancedMoveToHueAndSaturationCommandToDutWithEnhancedHue20000Saturation50AndTransitionTime0Immediately_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; @@ -16752,25 +16819,22 @@ 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 - completion:^(NSError * _Nullable err) { - NSLog( - @"TH sends EnhancedMoveToHueAndSaturation command to DUT with EnhancedHue=20000, " + [cluster enhancedMoveToHueAndSaturationWithParams:params + completionHandler:^(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; } CHIP_ERROR TestWait100ms_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -16778,12 +16842,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16799,12 +16864,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16820,9 +16886,10 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThSendsEnhancedMoveToHueAndSaturationCommandToDutWithEnhancedHue16000Saturation80AndTransitionTime20020s_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; @@ -16832,22 +16899,21 @@ class Test_TC_CC_7_4 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedMoveToHueAndSaturationWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveToHueAndSaturation command to DUT with " - @"EnhancedHue=16000, Saturation=80 and TransitionTime=200 (20s) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -16855,12 +16921,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16877,12 +16944,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16898,7 +16966,6 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestWait10s_11() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -16906,12 +16973,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16928,12 +16996,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16949,7 +17018,6 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestWait5s_14() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -16957,12 +17025,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16980,12 +17049,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17003,12 +17073,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThReadsColorModeAttributeFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17029,12 +17100,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17055,12 +17127,11 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn Off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17073,12 +17144,11 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -17208,7 +17278,6 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -17216,14 +17285,12 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17242,14 +17309,12 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17268,14 +17333,12 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17301,14 +17364,12 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17331,14 +17392,12 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17557,7 +17616,6 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -17565,12 +17623,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17589,12 +17646,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17613,12 +17669,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17650,12 +17705,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeManufacturingDateInAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(ManufacturingDate) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17671,12 +17725,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributePartNumberInAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(PartNumber) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17692,12 +17745,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeProductURLInAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(ProductURL) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17713,12 +17765,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeProductLabelInAttributeList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(ProductLabel) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17734,12 +17785,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeSerialNumberInAttributeList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(SerialNumber) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17755,12 +17805,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeLocalConfigDisabledInAttributeList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(LocalConfigDisabled) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17776,12 +17825,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeReachableInAttributeList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(Reachable) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17797,12 +17845,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeUniqueIDInAttributeList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(UniqueID) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17818,12 +17865,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsAcceptedCommandListFromDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH1 reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17842,12 +17888,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsGeneratedCommandListFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH1 reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18048,7 +18093,6 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -18056,12 +18100,13 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18080,12 +18125,13 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18104,12 +18150,13 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18133,12 +18180,13 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18157,12 +18205,13 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18293,7 +18342,6 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -18301,12 +18349,13 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18325,12 +18374,13 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18349,12 +18399,13 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18374,12 +18425,13 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18399,12 +18451,13 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18686,7 +18739,6 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -18694,14 +18746,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18720,14 +18770,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18746,14 +18794,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDgethsf00EnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -18767,14 +18813,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDgethsf01EnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -18788,14 +18832,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18815,14 +18857,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributePHYRateInAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(PHYRate) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18838,14 +18878,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeFullDuplexInAttributeList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(FullDuplex) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18861,14 +18899,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog( @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList Error: %@", err); @@ -18886,14 +18922,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog( @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList Error: %@", err); @@ -18911,14 +18945,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog( @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList Error: %@", err); @@ -18936,14 +18968,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog( @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList Error: %@", err); @@ -18961,14 +18991,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog( @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList Error: %@", err); @@ -18986,14 +19014,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeCarrierDetectInAttributeList_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(CarrierDetect) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19009,14 +19035,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTimeSinceResetInAttributeList_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(TimeSinceReset) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19032,14 +19056,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19055,14 +19077,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19081,14 +19101,12 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19374,7 +19392,6 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -19382,14 +19399,12 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadPHYRateAttributeConstraints_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read PHYRate attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19409,14 +19424,12 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadFullDuplexAttributeConstraints_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFullDuplexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFullDuplexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read FullDuplex attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19434,14 +19447,12 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadPacketRxCountAttributeConstraints_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read PacketRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19455,7 +19466,6 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadPacketRxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -19465,14 +19475,12 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadPacketTxCountAttributeConstraints_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read PacketTxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19486,7 +19494,6 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadPacketTxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -19496,14 +19503,12 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTxErrCountAttributeConstraints_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read TxErrCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19518,7 +19523,6 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTxErrCountValueFromDutAndVerifyValueIndicatesTheNumberOfFailedPacketTransmissionOnEthernetNetworkInterface_8() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -19528,14 +19532,12 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadCollisionCountAttributeConstraints_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read CollisionCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19550,7 +19552,6 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -19560,14 +19561,12 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadOverrunCountAttributeConstraints_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read OverrunCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19582,7 +19581,6 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -19592,14 +19590,12 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadCarrierDetectAttributeConstraints_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCarrierDetectWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCarrierDetectWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read CarrierDetect attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19618,7 +19614,6 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_14() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -19628,14 +19623,12 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTimeSinceResetAttributeConstraints_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTimeSinceResetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTimeSinceResetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read TimeSinceReset attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19649,7 +19642,6 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -19967,7 +19959,6 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -19975,14 +19966,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPHYRateAttributeFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20002,14 +19991,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPHYRateAttributeFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20029,14 +20016,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPHYRateAttributeFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20056,14 +20041,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPHYRateAttributeFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20083,14 +20066,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPHYRateAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20110,14 +20091,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPHYRateAttributeFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20137,14 +20116,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPHYRateAttributeFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20164,14 +20141,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPHYRateAttributeFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20191,14 +20166,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPHYRateAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20218,14 +20191,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPHYRateAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20246,14 +20217,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPacketRxCountAttributeValueFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PacketRxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20271,14 +20240,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPacketTxCountAttributeValueFromDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PacketTxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20296,14 +20263,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTxErrCountAttributeValueFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20321,14 +20286,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCollisionCountAttributeValueFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20346,14 +20309,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsOverrunCountAttributeValueFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20370,14 +20331,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestSendsResetCountsCommand_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster resetCountsWithCompletion:^(NSError * _Nullable err) { + [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Sends ResetCounts command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20390,14 +20349,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPacketRxCountAttributeValueFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PacketRxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20412,14 +20369,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsPacketTxCountAttributeValueFromDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PacketTxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20434,14 +20389,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTxErrCountAttributeValueFromDut_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20456,14 +20409,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsCollisionCountAttributeValueFromDut_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20478,14 +20429,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsOverrunCountAttributeValueFromDut_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20623,7 +20572,6 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -20631,12 +20579,13 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20655,12 +20604,13 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20679,12 +20629,13 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20707,12 +20658,13 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20728,12 +20680,13 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20752,12 +20705,13 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20897,7 +20851,6 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -20905,12 +20858,13 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MinMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20930,12 +20884,13 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20955,12 +20910,13 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20980,12 +20936,13 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFromTheDutTheToleranceAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeToleranceWithCompletionHandler:^(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)); @@ -21114,7 +21071,6 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -21122,12 +21078,13 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21146,12 +21103,13 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21170,12 +21128,13 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21196,12 +21155,13 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21220,12 +21180,13 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21356,7 +21317,6 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -21364,14 +21324,13 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21390,14 +21349,13 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21416,14 +21374,13 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21448,14 +21405,13 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21473,14 +21429,13 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21655,7 +21610,6 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -21663,14 +21617,13 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsTheBreadCrumbAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(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)); @@ -21684,37 +21637,35 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestTh1WritesTheBreadCrumbAttributeAs1ToTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id breadcrumbArgument; breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH1 writes the BreadCrumb attribute as 1 to the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestTh1ReadsTheBreadCrumbAttributeFromTheDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(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)); @@ -21732,14 +21683,13 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsTheRegulatoryConfigAttributeFromTheDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRegulatoryConfigWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRegulatoryConfigWithCompletionHandler:^(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)); @@ -21755,14 +21705,13 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsTheLocationCapabilityAttributeFromTheDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocationCapabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLocationCapabilityWithCompletionHandler:^(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)); @@ -21779,14 +21728,13 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsBasicCommissioningInfoAttributeFromDutAndVerifyThatTheBasicCommissioningInfoAttributeHasTheFollowingFieldFailSafeExpiryLengthSecondsFieldValueIsWithinADurationRangeOf0To65535_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBasicCommissioningInfoWithCompletion:^( + [cluster readAttributeBasicCommissioningInfoWithCompletionHandler:^( MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable err) { NSLog( @"TH1 reads BasicCommissioningInfo attribute from DUT and Verify that the BasicCommissioningInfo attribute has the " @@ -21803,21 +21751,21 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsSupportsConcurrentConnectionAttributeFromTheDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads SupportsConcurrentConnection attribute from the DUT Error: %@", err); + [cluster + readAttributeSupportsConcurrentConnectionWithCompletionHandler:^(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; } @@ -22002,7 +21950,6 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -22010,12 +21957,13 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22034,12 +21982,13 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22058,12 +22007,13 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22086,12 +22036,13 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadOptionalAttributeUpTimeInAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute(UpTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22107,12 +22058,13 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadOptionalAttributeTotalOperationalHoursInAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute(TotalOperationalHours) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22128,12 +22080,13 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadOptionalAttributeBootReasonInAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute(BootReason) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22149,12 +22102,13 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadOptionalAttributeActiveHardwareFaultsInAttributeList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute(ActiveHardwareFaults) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22170,12 +22124,13 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadOptionalAttributeActiveRadioFaultsInAttributeList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute(ActiveRadioFaults) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22191,12 +22146,13 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadOptionalAttributeActiveNetworkFaultsInAttributeList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute(ActiveNetworkFaults) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22212,12 +22168,13 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22233,12 +22190,13 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22515,7 +22473,6 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -22523,12 +22480,13 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsNetworkInterfacesStructureAttributeFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNetworkInterfacesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NetworkInterfaces structure attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22542,12 +22500,13 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsARebootCountAttributeValueFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRebootCountWithCompletionHandler:^(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)); @@ -22564,14 +22523,12 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestRebootTargetDevice_3() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestRebootTargetDeviceDUT_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); @@ -22582,14 +22539,12 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestRebootTargetDevice_5() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestRebootTargetDeviceDUT_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); @@ -22600,7 +22555,6 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_7() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -22608,12 +22562,13 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestDutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeUpTimeWithCompletionHandler:^(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); @@ -22629,12 +22584,13 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsATotalOperationalHoursAttributeValueFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTotalOperationalHoursWithCompletionHandler:^(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)); @@ -22651,14 +22607,12 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestRebootTargetDevice_10() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestRebootTargetDeviceDUT_11() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); @@ -22669,7 +22623,6 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -22677,12 +22630,13 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsBootReasonAttributeValueFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBootReasonsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBootReasonsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads BootReason attribute value from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22698,7 +22652,6 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsActiveHardwareFaultsAttributeValueFromDut_14() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -22708,7 +22661,6 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsActiveRadioFaultsAttributeValueFromDut_15() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -22718,7 +22670,6 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsActiveNetworkFaultsAttributeValueFromDut_16() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -22728,7 +22679,6 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTestEventTriggersEnabledAttributeValue_17() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -22861,7 +22811,6 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -22869,12 +22818,11 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(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)); @@ -22893,12 +22841,11 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -22917,12 +22864,11 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22944,12 +22890,11 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22965,12 +22910,11 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandTriggerEffectInAcceptedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(TriggerEffect) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22986,12 +22930,11 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23101,7 +23044,6 @@ class Test_TC_I_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -23109,12 +23051,11 @@ class Test_TC_I_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheIdentifyTimeAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(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)); @@ -23131,12 +23072,11 @@ class Test_TC_I_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheIdentifyTypeAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeIdentifyTypeWithCompletionHandler:^(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)); @@ -23337,7 +23277,6 @@ class Test_TC_I_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -23345,34 +23284,31 @@ class Test_TC_I_2_2 : public TestCommandBridge { CHIP_ERROR TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; params.identifyTime = [NSNumber numberWithUnsignedShort:60U]; [cluster identifyWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Identify command to DUT, with the identify time field set to 0x003c (60s). Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads immediately IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23388,7 +23324,6 @@ class Test_TC_I_2_2 : public TestCommandBridge { CHIP_ERROR TestWait10000ms_3() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -23396,12 +23331,11 @@ class Test_TC_I_2_2 : public TestCommandBridge { CHIP_ERROR TestAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(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)); @@ -23418,7 +23352,6 @@ class Test_TC_I_2_2 : public TestCommandBridge { CHIP_ERROR TestThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_5() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -23428,35 +23361,34 @@ class Test_TC_I_2_2 : public TestCommandBridge { CHIP_ERROR TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; params.identifyTime = [NSNumber numberWithUnsignedShort:0U]; - [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); + [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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads immediately IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23474,29 +23406,26 @@ class Test_TC_I_2_2 : public TestCommandBridge { CHIP_ERROR TestThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id identifyTimeArgument; identifyTimeArgument = [NSNumber numberWithUnsignedShort:15U]; [cluster writeAttributeIdentifyTimeWithValue:identifyTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWait5000ms_9() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -23504,12 +23433,11 @@ class Test_TC_I_2_2 : public TestCommandBridge { CHIP_ERROR TestAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(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)); @@ -23842,7 +23770,6 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR Test1WaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -23851,31 +23778,29 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x00Default_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; params.effectIdentifier = [NSNumber numberWithUnsignedChar:0U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestDutExecutesABlinkEffect_2() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -23886,31 +23811,29 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestDutExecutesABreatheEffect_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -23921,31 +23844,29 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x02OkayAndTheEffectVariantFieldSetTo0x00Default_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; params.effectIdentifier = [NSNumber numberWithUnsignedChar:2U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestDutExecutesAnOkayEffect_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -23956,31 +23877,29 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x0bChannelChangeAndTheEffectVariantFieldSetTo0x00Default_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; params.effectIdentifier = [NSNumber numberWithUnsignedChar:11U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestDutExecutesAChannelChangeEffect_8() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -23991,31 +23910,29 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestDutExecutesABreatheEffect_10() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -24026,31 +23943,29 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xfeFinishEffectAndTheEffectVariantFieldSetTo0x00Default_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; params.effectIdentifier = [NSNumber numberWithUnsignedChar:254U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestDutStopsTheBreatheEffectAfterTheCurrentEffectSequence_12() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -24061,31 +23976,29 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestDutExecutesABreatheEffect_14() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -24096,31 +24009,29 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; params.effectIdentifier = [NSNumber numberWithUnsignedChar:255U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestDutStopsTheBreatheEffectAsSoonAsPossible_16() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -24131,31 +24042,29 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x42Unknown_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; params.effectIdentifier = [NSNumber numberWithUnsignedChar:0U]; params.effectVariant = [NSNumber numberWithUnsignedChar:66U]; [cluster triggerEffectWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCheckDutExecutesABlinkEffect_18() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -24166,31 +24075,29 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; params.effectIdentifier = [NSNumber numberWithUnsignedChar:255U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestDutStopsAnyEffectThatMayBeStillRunningAsSoonAsPossible_20() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -24334,7 +24241,6 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -24342,14 +24248,12 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24368,14 +24272,12 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24394,14 +24296,12 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24424,14 +24324,12 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24447,14 +24345,12 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeLightSensorTypeInAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(LightSensorType) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24470,14 +24366,12 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24496,14 +24390,12 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24654,7 +24546,6 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -24662,14 +24553,12 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24689,14 +24578,12 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24716,14 +24603,12 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsMeasuredValueAttributeFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads MeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24743,14 +24628,12 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsToleranceAttributeFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Tolerance attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24767,14 +24650,12 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsLightSensorTypeAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLightSensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads LightSensorType attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24951,7 +24832,6 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -24960,14 +24840,12 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24989,14 +24867,12 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25017,7 +24893,6 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { CHIP_ERROR TestCoverTheSensorOrDarkenTheRoom_3() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for Successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -25027,7 +24902,6 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { CHIP_ERROR TestWait1s_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); @@ -25035,14 +24909,12 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { CHIP_ERROR TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletionHandler:^(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)); @@ -25061,7 +24933,6 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { CHIP_ERROR TestExposeTheSensorAgainToLight_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for Successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -25071,7 +24942,6 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { CHIP_ERROR TestWait1s_7() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); @@ -25079,14 +24949,12 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { CHIP_ERROR TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletionHandler:^(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)); @@ -25357,7 +25225,6 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -25365,12 +25232,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25389,12 +25257,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25413,12 +25282,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenLvlsf00ooEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -25432,12 +25302,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenLvlsf01ltEnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -25451,12 +25322,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenLvlsf02fqEnsureFeaturemapHasTheCorrectBitSet_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -25470,12 +25342,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25498,12 +25371,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -25520,12 +25394,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -25543,12 +25418,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinLevelInAttributeList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(MinLevel) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25564,12 +25440,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxLevelInAttributeList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(MaxLevel) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25585,12 +25462,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(OnOffTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25606,12 +25484,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(OnTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25627,12 +25506,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(OffTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25648,12 +25528,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(DefaultMoveRate) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25669,12 +25550,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25697,12 +25579,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -25718,12 +25601,13 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26039,7 +25923,6 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -26048,12 +25931,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentLevelAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26076,12 +25960,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheRemainingTimeAttribute_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the RemainingTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26099,12 +25984,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheMinLevelAttribute_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the MinLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26128,12 +26014,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheMinLevelAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the MinLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26154,12 +26041,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheMaxLevelAttribute_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the MaxLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26184,12 +26072,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheMaxLevelAttribute_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the MaxLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26210,12 +26099,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Step 4b & 4C Reads the CurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26235,12 +26125,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Step 4b & 4C Reads the CurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26262,12 +26153,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentFrequency attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26285,12 +26177,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheMinFrequencyAttribute_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the MinFrequency attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26311,12 +26204,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheMaxFrequencyAttribute_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the MaxFrequency attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26336,12 +26230,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestStep7b7cReadsTheCurrentFrequencyAttribute_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Step 7b & 7C Reads the CurrentFrequency attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26358,12 +26253,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnOffTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26380,12 +26276,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnLevelAttribute_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26405,12 +26302,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnLevelAttribute_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26432,12 +26330,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26457,12 +26356,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OffTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26482,12 +26382,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the DefaultMoveRate attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26507,12 +26408,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheOptionsAttribute_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26526,12 +26428,13 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheStartUpCurrentLevelAttribute_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the StartUpCurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26849,7 +26752,6 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -26858,12 +26760,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26883,9 +26786,10 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onOffTransitionTimeArgument; @@ -26893,25 +26797,26 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { ? [NSNumber numberWithUnsignedShort:mOnOffTransitionTimeConfigValue.Value()] : [NSNumber numberWithUnsignedShort:10U]; [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"writes the OnOffTransitionTime attribute on the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26934,12 +26839,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnLevelAttributeFromTheDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26962,34 +26868,36 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheOnLevelAttributeOnTheDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onLevelArgument; onLevelArgument = mOnLevelConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mOnLevelConfigValue.Value()] : [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeOnLevelWithValue:onLevelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"writes the OnLevel attribute on the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheOnLevelAttributeFromTheDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27015,12 +26923,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnTransitionTimeAttributeFromTheDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27043,9 +26952,10 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheOnTransitionTimeAttributeOnTheDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onTransitionTimeArgument; @@ -27053,25 +26963,26 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { ? [NSNumber numberWithUnsignedShort:mOnTransitionTimeConfigValue.Value()] : [NSNumber numberWithUnsignedShort:5U]; [cluster writeAttributeOnTransitionTimeWithValue:onTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the OnTransitionTime attribute on the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheOnTransitionTimeAttributeFromTheDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27097,12 +27008,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheOffTransitionTimeAttributeFromTheDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27125,9 +27037,10 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheOffTransitionTimeAttributeOnTheDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id offTransitionTimeArgument; @@ -27135,25 +27048,26 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { ? [NSNumber numberWithUnsignedShort:mOffTransitionTimeConfigValue.Value()] : [NSNumber numberWithUnsignedShort:10U]; [cluster writeAttributeOffTransitionTimeWithValue:offTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the OffTransitionTime attribute on the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheOffTransitionTimeAttributeFromTheDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27179,12 +27093,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the DefaultMoveRate attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27207,9 +27122,10 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheDefaultMoveRateAttributeOnTheDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id defaultMoveRateArgument; @@ -27217,25 +27133,26 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { ? [NSNumber numberWithUnsignedChar:mDefaultMoveRateConfigValue.Value()] : [NSNumber numberWithUnsignedChar:111U]; [cluster writeAttributeDefaultMoveRateWithValue:defaultMoveRateArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the DefaultMoveRate attribute on the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the DefaultMoveRate attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27261,12 +27178,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27289,9 +27207,10 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpCurrentLevelArgument; @@ -27299,25 +27218,26 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { ? [NSNumber numberWithUnsignedChar:mStartUpCurrentLevelConfigValue.Value()] : [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeStartUpCurrentLevelWithValue:startUpCurrentLevelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"writes the StartUpCurrentLevel attribute on the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(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,22 +27262,22 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesBackDefaultValueOfOnOffTransitionTimeAttribute_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onOffTransitionTimeArgument; onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"writes back default value of OnOffTransitionTime attribute Error: %@", err); + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completionHandler:^(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; } @@ -27925,7 +27845,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -27933,12 +27852,11 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionSendOnCommand_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Precondition Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27951,12 +27869,11 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -27974,57 +27891,56 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onOffTransitionTimeArgument; onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completionHandler:^(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; } CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOffCommandToDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28037,9 +27953,10 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; @@ -28048,27 +27965,26 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithOnOffWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime " - @"=0 (immediate) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -28086,12 +28002,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28110,12 +28027,11 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsOnCommandToDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28128,9 +28044,10 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -28138,29 +28055,28 @@ 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 - completion:^(NSError * _Nullable err) { - NSLog( - @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", - err); + [cluster moveToLevelWithParams:params + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28180,9 +28096,10 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -28191,22 +28108,21 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestWait10000ms_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -28214,12 +28130,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28238,7 +28155,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestWait10000ms_15() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -28246,12 +28162,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28270,7 +28187,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestWait10000ms_17() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -28278,12 +28194,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28302,7 +28219,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestWait5000ms_19() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -28310,12 +28226,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28334,12 +28251,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28358,33 +28276,35 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThWrites0ToTheOptionsAttribute_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsOptionsAttribute_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28402,12 +28322,11 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsOnCommandToDut_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28420,9 +28339,10 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -28431,25 +28351,26 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28468,12 +28389,11 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsOffCommandToDut_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28486,9 +28406,10 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -28497,25 +28418,26 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28534,9 +28456,10 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -28545,25 +28468,26 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28582,9 +28506,10 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -28593,25 +28518,26 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_33() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28630,33 +28556,35 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThWrites1ToTheOptionsAttribute_34() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 1 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsOptionsAttribute_35() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28674,12 +28602,11 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsOnCommandToDut_36() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28692,9 +28619,10 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_37() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -28703,25 +28631,26 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_38() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28740,12 +28669,11 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsOffCommandToDut_39() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28758,9 +28686,10 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_40() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -28769,25 +28698,26 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_41() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28806,9 +28736,10 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_42() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -28817,25 +28748,26 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_43() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28854,9 +28786,10 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_44() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -28865,25 +28798,26 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_45() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29237,7 +29171,6 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -29245,12 +29178,11 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionSendOnCommand_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Precondition Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29263,12 +29195,11 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -29286,57 +29217,58 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onOffTransitionTimeArgument; onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completionHandler:^(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; } CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsTheMaxLevelAttributeFromTheDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxLevelWithCompletionHandler:^(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)); @@ -29353,12 +29285,11 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestThSendsOffCommandToDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29371,9 +29302,10 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; @@ -29381,28 +29313,27 @@ 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 - completion:^(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 + completionHandler:^(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; } CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -29421,12 +29352,13 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29447,7 +29379,6 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestWait5000ms_10() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -29455,12 +29386,13 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29479,12 +29411,11 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestThSendsOnCommandToDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29497,9 +29428,10 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -29507,29 +29439,28 @@ 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 - completion:^(NSError * _Nullable err) { - NSLog( - @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", - err); + [cluster moveToLevelWithParams:params + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29548,9 +29479,10 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; @@ -29559,20 +29491,19 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWait10s_16() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -29580,12 +29511,13 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29604,7 +29536,6 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestWait10s_18() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -29612,12 +29543,13 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29636,7 +29568,6 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestWait10s_20() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -29644,12 +29575,13 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29668,7 +29600,6 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestWait19s_22() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 19000UL; return WaitForMs("alpha", value); @@ -29676,12 +29607,13 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29700,12 +29632,11 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionSendOffCommand_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Precondition send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29718,12 +29649,11 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -30050,7 +29980,6 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -30058,12 +29987,11 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionSendOnCommand_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Precondition Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30076,12 +30004,11 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -30099,57 +30026,56 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onOffTransitionTimeArgument; onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completionHandler:^(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; } CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOffCommandToDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30162,9 +30088,10 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; @@ -30174,27 +30101,26 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepWithOnOffWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and " - @"TransitionTime =0 (immediate) Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -30212,12 +30138,11 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsOnCommandToDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30230,9 +30155,10 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -30240,29 +30166,28 @@ 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 - completion:^(NSError * _Nullable err) { - NSLog( - @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", - err); + [cluster moveToLevelWithParams:params + completionHandler:^(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; } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads current level attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30281,9 +30206,10 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterStepParams alloc] init]; @@ -30292,23 +30218,23 @@ 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 - completion:^(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 + completionHandler:^(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; } CHIP_ERROR TestWait10s_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -30316,12 +30242,13 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30340,7 +30267,6 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestWait10s_14() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -30348,12 +30274,13 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30372,7 +30299,6 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestWait10s_16() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -30380,12 +30306,13 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30404,7 +30331,6 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestWait5000ms_18() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -30412,12 +30338,13 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30436,12 +30363,13 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(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)); @@ -30460,12 +30388,11 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionSendOffCommand_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Precondition send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30478,12 +30405,11 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -30762,7 +30688,6 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -30770,57 +30695,56 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onOffTransitionTimeArgument; onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completionHandler:^(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; } CHIP_ERROR TestThWrites0ToTheOptionsAttribute_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsOnCommandToDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30833,9 +30757,10 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -30843,29 +30768,28 @@ 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 - completion:^(NSError * _Nullable err) { - NSLog( - @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", - err); + [cluster moveToLevelWithParams:params + completionHandler:^(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; } CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30884,9 +30808,10 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; @@ -30895,22 +30820,21 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestWait5000ms_7() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -30918,29 +30842,29 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestSendsStopCommandToDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterStopParams alloc] init]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stopWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends stop command to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -30950,12 +30874,13 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30974,9 +30899,10 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; @@ -30985,22 +30911,21 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveWithParams:params - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestWait5000ms_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -31008,29 +30933,29 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestThSendsAStopWithOnOffCommandToTheDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stopWithOnOffWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a StopWithOnOff command to the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -31040,12 +30965,13 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31064,12 +30990,11 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionSendOffCommand_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Precondition send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31082,12 +31007,11 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -31217,7 +31141,6 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -31225,14 +31148,12 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31251,14 +31172,12 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31277,14 +31196,12 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31306,14 +31223,12 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31332,14 +31247,12 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31512,7 +31425,6 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -31520,12 +31432,13 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31544,12 +31457,13 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31568,12 +31482,13 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { CHIP_ERROR TestGivenLunitsf00tempEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -31587,12 +31502,13 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31612,12 +31528,13 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentLUNITSF00AttributeInAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -31633,12 +31550,13 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31657,12 +31575,13 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31837,7 +31756,6 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -31845,14 +31763,12 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31871,14 +31787,12 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31895,14 +31809,12 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31923,14 +31835,12 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -31946,14 +31856,12 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -31969,14 +31877,12 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31995,14 +31901,12 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterTimeFormatLocalization * cluster = + [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32133,7 +32037,6 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -32141,12 +32044,11 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32165,12 +32067,11 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32189,12 +32090,11 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32218,12 +32118,11 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32243,12 +32142,11 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32416,7 +32314,6 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -32424,12 +32321,13 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32448,12 +32346,13 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32472,12 +32371,13 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestGivenKeypadinputsnvFeatureMapBitMaskIsSetOrNot_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -32491,12 +32391,13 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestGivenKeypadinputslkFeatureMapBitMaskIsSetOrNot_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -32510,12 +32411,13 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestGivenKeypadinputsnkFeatureMapBitMaskIsSetOrNot_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -32529,12 +32431,13 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32554,12 +32457,13 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32575,12 +32479,13 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32745,7 +32650,6 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -32753,14 +32657,13 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32779,14 +32682,13 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32805,14 +32707,13 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32831,14 +32732,13 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32858,14 +32758,13 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCatalogListInAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CatalogList) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32881,14 +32780,13 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCurrentAppInAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentApp) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32904,14 +32802,13 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32929,14 +32826,13 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33101,7 +32997,6 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -33109,12 +33004,13 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33133,12 +33029,13 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33157,12 +33054,13 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { CHIP_ERROR TestGivenMediainputsnuEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -33176,12 +33074,13 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33201,12 +33100,13 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeInputListInAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(InputList) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33222,12 +33122,13 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCurrentInputInAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentInput) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33243,12 +33144,13 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33267,12 +33169,13 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33414,7 +33317,6 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -33422,12 +33324,11 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33446,12 +33347,11 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33470,12 +33370,11 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33495,12 +33394,11 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMACAddressInAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(MACAddress) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33516,12 +33414,11 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33540,12 +33437,11 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33777,7 +33673,6 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -33785,12 +33680,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33809,12 +33703,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33833,12 +33726,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestGivenChannelsclEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -33852,12 +33744,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestGivenChannelsliEnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -33871,12 +33762,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33896,12 +33786,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeChannelListAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ChannelList): AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33917,12 +33806,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestReadingOptionalAttributeLineupInAttributeList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reading optional attribute(Lineup) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33938,12 +33826,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCurrentChannelAttributeList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentChannel): AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33959,12 +33846,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandChangeChannelInAcceptedCommandList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(ChangeChannel) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33980,12 +33866,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(ChangeChannelByNumber) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34001,12 +33886,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandSkipChannelInAcceptedCommandList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(SkipChannel) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34022,12 +33906,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34046,12 +33929,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34359,7 +34241,6 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -34367,12 +34248,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34391,12 +34273,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34415,12 +34298,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestGivenMediaplaybacksasEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -34434,12 +34318,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestGivenMediaplaybacksvsEnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -34453,12 +34338,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34479,12 +34365,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeStartTimeInAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(StartTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34500,12 +34387,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeDurationInAttributeList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Duration) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34521,12 +34409,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeSampledPositionInAttributeList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(SampledPosition) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34542,12 +34431,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributePlaybackSpeedInAttributeList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(PlaybackSpeed) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34563,12 +34453,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeSeekRangeEndInAttributeList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(SeekRangeEnd) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34584,12 +34475,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeSeekRangeStartInAttributeList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(SeekRangeStart) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34605,12 +34497,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34628,12 +34521,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandStartOverInAcceptedCommandList_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(StartOver) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34649,12 +34543,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandPreviousInAcceptedCommandList_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(Previous) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34670,12 +34565,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandNextInAcceptedCommandList_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(Next) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34691,12 +34587,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandRewindInAcceptedCommandList_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(Rewind) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34712,12 +34609,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandFastForwardInAcceptedCommandList_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(FastForward) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34733,12 +34631,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandSkipForwardInAcceptedCommandList_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(SkipForward) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34754,12 +34653,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandSkipBackwardInAcceptedCommandList_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(SkipBackward) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34775,12 +34675,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandSeekInAcceptedCommandList_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(Seek) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34796,12 +34697,13 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34929,7 +34831,6 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -34937,12 +34838,13 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34961,12 +34863,13 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34983,12 +34886,13 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35010,12 +34914,13 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35031,12 +34936,13 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35178,7 +35084,6 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -35186,12 +35091,13 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35210,12 +35116,13 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35234,12 +35141,13 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35260,12 +35168,13 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCurrentTargetInAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentTarget) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35281,12 +35190,13 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35302,12 +35212,13 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35538,7 +35449,6 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -35546,12 +35456,13 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35570,12 +35481,13 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35594,12 +35506,13 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35624,12 +35537,13 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeVendorNameInAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(VendorName) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35645,12 +35559,13 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeVendorIDInAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(VendorID) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35666,12 +35581,13 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeProductIDInAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ProductID) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35687,12 +35603,13 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35711,12 +35628,13 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35915,7 +35833,6 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -35923,12 +35840,13 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35947,12 +35865,13 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35971,12 +35890,13 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { CHIP_ERROR TestGivenContentlauncherscsEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -35990,12 +35910,13 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { CHIP_ERROR TestGivenContentlaunchersupEnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -36009,12 +35930,13 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36034,12 +35956,13 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeAcceptHeaderAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(AcceptHeader): AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36055,12 +35978,13 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(SupportedStreamingProtocols): AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36076,12 +36000,13 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -36097,12 +36022,13 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -36118,12 +36044,13 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36251,7 +36178,6 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -36259,12 +36185,13 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36283,12 +36210,13 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36307,12 +36235,13 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36332,12 +36261,13 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36355,12 +36285,13 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36464,7 +36395,6 @@ class Test_TC_LOWPOWER_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -36472,12 +36402,11 @@ class Test_TC_LOWPOWER_2_1 : public TestCommandBridge { CHIP_ERROR TestThSendsSleepCommandToDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster sleepWithCompletion:^(NSError * _Nullable err) { + [cluster sleepWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Sleep command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36589,7 +36518,6 @@ class Test_TC_KEYPADINPUT_3_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -36597,52 +36525,54 @@ class Test_TC_KEYPADINPUT_3_2 : public TestCommandBridge { CHIP_ERROR TestThSendsCecSettingsKeys0x0AToDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:10U]; [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends CEC Settings Keys(0x0A) to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsCecHomeKeys0x09ToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:9U]; [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends CEC Home Keys(0x09) to DUT Error: %@", err); + completionHandler:^(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; } @@ -36825,7 +36755,6 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -36833,234 +36762,243 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { CHIP_ERROR TestSendNumbers1_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:33U]; [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers1 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendNumbers2_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:34U]; [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers2 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendNumbers3_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:35U]; [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers3 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendNumbers4_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:36U]; [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers4 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendNumbers5_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:37U]; [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers5 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendNumbers6_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:38U]; [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers6 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendNumbers7_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:39U]; [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers7 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendNumbers8_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:40U]; [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers8 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendNumbers9_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:41U]; [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers9 Error: %@", err); + completionHandler:^(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; } @@ -37157,7 +37095,6 @@ class Test_TC_APPLAUNCHER_3_5 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -37166,14 +37103,13 @@ class Test_TC_APPLAUNCHER_3_5 : public TestCommandBridge { CHIP_ERROR TestThReadsCatalogListAttributeFromTheDutAndWhereEachEntryInTheListIsACsaIssuedVendorIdOfTypeUnsigned16BitIntegerRangingBetween065536ForTheCatalog_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCatalogListWithCompletionHandler:^(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); @@ -37279,7 +37215,6 @@ class Test_TC_APPLAUNCHER_3_6 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -37288,14 +37223,13 @@ class Test_TC_APPLAUNCHER_3_6 : public TestCommandBridge { CHIP_ERROR TestThReadsCurrentAppAttributeFromTheDutAndVerifyTheInFocusApplicationAttributesWhichShouldIncludeTheDisplayApplicationIDtypeuint16CatalogVendorIDtypestringOrNullIfThereIsNoCurrentInFocusApplication_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentAppWithCompletion:^( + [cluster readAttributeCurrentAppWithCompletionHandler:^( 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 " @@ -37403,7 +37337,6 @@ class Test_TC_MEDIAINPUT_3_10 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -37412,12 +37345,13 @@ class Test_TC_MEDIAINPUT_3_10 : public TestCommandBridge { CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInputListWithCompletionHandler:^(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: %@", @@ -37546,7 +37480,6 @@ class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -37555,12 +37488,13 @@ class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInputListWithCompletionHandler:^(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: %@", @@ -37576,33 +37510,35 @@ class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { CHIP_ERROR TestSelectInputCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; params.index = [NSNumber numberWithUnsignedChar:1U]; [cluster selectInputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Select Input Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadCurrentInputList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentInputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read current input list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -37733,7 +37669,6 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -37742,12 +37677,13 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInputListWithCompletionHandler:^(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: %@", @@ -37763,12 +37699,13 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { CHIP_ERROR TestShowInputStatusCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster showInputStatusWithCompletion:^(NSError * _Nullable err) { + [cluster showInputStatusWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Show Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -37781,12 +37718,13 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { CHIP_ERROR TestHideInputStatusCommand_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster hideInputStatusWithCompletion:^(NSError * _Nullable err) { + [cluster hideInputStatusWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Hide Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -37911,7 +37849,6 @@ class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -37919,12 +37856,13 @@ class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInputListWithCompletionHandler:^(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)); @@ -37937,29 +37875,29 @@ class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { CHIP_ERROR TestRenameInputCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; params.index = [NSNumber numberWithUnsignedChar:1U]; params.name = @"A1"; [cluster renameInputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Rename Input Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_3() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -38061,7 +37999,6 @@ class Test_TC_CHANNEL_5_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -38070,12 +38007,11 @@ class Test_TC_CHANNEL_5_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheChannelListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyThatTheResponseContainsAListOfTheKnownTvChannelsEachListElementShouldConsistOfTheFollowingMajorNumberUnsigned16BitIntegerMandatoryMinorNumberUnsigned16BitIntegerMandatoryNameStringOptionalCallSignStringOptionalAffiliateCallSignStringOptional_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeChannelListWithCompletionHandler:^(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, " @@ -38217,7 +38153,6 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -38225,12 +38160,11 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheChannelListAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the ChannelList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38244,9 +38178,8 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { CHIP_ERROR TestThSendsAChangeChannelByNumberCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; @@ -38255,20 +38188,19 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { params.minorNumber = mMinornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMinornumber.Value()] : [NSNumber numberWithUnsignedShort:1U]; [cluster changeChannelByNumberWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a ChangeChannelByNumber command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatTheChannelHasChangedOnTheDevice_3() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if channel has changed on the devicegarbage: not in length on purpose", 53); @@ -38279,24 +38211,23 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentChannelAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentChannelWithCompletion:^(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute Error: %@", err); + [cluster readAttributeCurrentChannelWithCompletionHandler:^( + 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; } @@ -38452,7 +38383,6 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -38461,32 +38391,31 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { CHIP_ERROR TestThReadsTheLineupAttributeFromTheDutToShowListOfInputsAvailableAndVerifyThatTheResponseContainsALineupInfoObject_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [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); + [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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38500,52 +38429,49 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentChannelWithCompletion:^(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentChannelWithCompletionHandler:^( + 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; } CHIP_ERROR TestSendsASkipChannelCommandToTheDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; params.count = [NSNumber numberWithUnsignedShort:1U]; [cluster skipChannelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends a SkipChannel command to the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatTheChannelHasChangedOnTheDevice_5() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if channel has changed on the devicegarbage: not in length on purpose", 53); @@ -38556,28 +38482,27 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentChannelWithCompletion:^(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentChannelWithCompletionHandler:^( + 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; } @@ -38783,7 +38708,6 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -38791,12 +38715,14 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster pauseWithCompletionHandler:^( + 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)); @@ -38814,12 +38740,13 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentStateAttribute_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38837,30 +38764,31 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { CHIP_ERROR TestSendsAPlayCommand_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Play command Error: %@", err); + [cluster + playWithCompletionHandler:^(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; } CHIP_ERROR TestVerifyThatTheMediaStateIsPlaying_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); value.expectedValue.Emplace(); @@ -38870,12 +38798,13 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentStateAttribute_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38893,12 +38822,14 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { CHIP_ERROR TestSendsAPauseCommand_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster pauseWithCompletionHandler:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"sends a Pause command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38916,7 +38847,6 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { CHIP_ERROR TestVerifyThatTheMediaIsPaused_7() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if media state is pausedgarbage: not in length on purpose", 41); value.expectedValue.Emplace(); @@ -38926,12 +38856,13 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentStateAttribute_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38949,12 +38880,13 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { CHIP_ERROR TestSendsAStopCommand_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopPlaybackWithCompletion:^( + [cluster stopPlaybackWithCompletionHandler:^( MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Sends a Stop command Error: %@", err); @@ -38973,7 +38905,6 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { CHIP_ERROR TestVerifyThatTheMediaIsStoped_10() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if media state is stopedgarbage: not in length on purpose", 41); value.expectedValue.Emplace(); @@ -38983,12 +38914,13 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentStateAttribute_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -39271,7 +39203,6 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -39279,12 +39210,14 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster pauseWithCompletionHandler:^( + 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)); @@ -39302,12 +39235,13 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentStateAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -39325,30 +39259,31 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR TestSendsAPlayCommandToTheDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Play command to the DUT Error: %@", err); + [cluster + playWithCompletionHandler:^(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; } CHIP_ERROR TestVerifyThatTheMediaStateIsPlaying_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); value.expectedValue.Emplace(); @@ -39358,12 +39293,13 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentStateAttribute_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -39381,31 +39317,31 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR TestSendsAStartOverCommandToTheDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - startOverWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a StartOver command to the DUT Error: %@", err); + [cluster startOverWithCompletionHandler:^( + 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; } CHIP_ERROR TestVerifyThatTheMediaIsStartedOver_7() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if media is started overgarbage: not in length on purpose", 41); value.expectedValue.Emplace(); @@ -39415,30 +39351,31 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR TestSendsANextCommandToTheDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster nextWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Next command to the DUT Error: %@", err); + [cluster + nextWithCompletionHandler:^(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; } CHIP_ERROR TestVerifyThatTheNextMediaItemInTheQueueHasBeenLoaded_9() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Please enter 'y' if media item in the queue has been loadedgarbage: not in length on purpose", 59); @@ -39449,31 +39386,31 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR TestSendsAPreviousCommandToTheDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - previousWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Previous command to the DUT Error: %@", err); + [cluster previousWithCompletionHandler:^( + 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; } CHIP_ERROR TestVerifyThatThePreviousMediaItemInTheQueueHasBeenLoaded_11() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Please enter 'y' if previous media item in the queue has been loadedgarbage: not in length on purpose", 68); @@ -39484,34 +39421,34 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR TestSendsASkipForwardCommandToTheDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:10000ULL]; [cluster skipForwardWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a SkipForward command to the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatTheMediaHasSkippedForward10Seconds_13() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Please enter 'y' if media has skipped forward 10 secondsgarbage: not in length on purpose", 56); @@ -39522,12 +39459,13 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheSampledPositionAttributeFromTheDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletion:^( + [cluster readAttributeSampledPositionWithCompletionHandler:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the SampledPosition attribute from the DUT Error: %@", err); @@ -39546,34 +39484,34 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR TestSendsASkipBackwardCommandToTheDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:10000ULL]; [cluster skipBackwardWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a SkipBackward command to the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatTheMediaHasSkippedBackward10Seconds_16() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Please enter 'y' if media has skipped backward 10 secondsgarbage: not in length on purpose", 57); @@ -39584,12 +39522,13 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheSampledPositionAttributeFromTheDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletion:^( + [cluster readAttributeSampledPositionWithCompletionHandler:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the SampledPosition attribute from the DUT Error: %@", err); @@ -39800,7 +39739,6 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -39808,12 +39746,14 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster pauseWithCompletionHandler:^( + 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)); @@ -39831,33 +39771,33 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { CHIP_ERROR TestSendsASeekCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; params.position = [NSNumber numberWithUnsignedLongLong:10000ULL]; [cluster seekWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Seek command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatTheMediaHasMovedTo10SecondsFromTheStartingPoint_3() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Please enter 'y' if media has moved to 10 seconds from the starting pointgarbage: not in length on purpose", 73); @@ -39868,12 +39808,13 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { CHIP_ERROR TestReadsTheSampledPositionAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletion:^( + [cluster readAttributeSampledPositionWithCompletionHandler:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the SampledPosition attribute Error: %@", err); @@ -39892,7 +39833,6 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { CHIP_ERROR TestThReadsTheStartTimeAttributeFromTheDut_5() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -39902,7 +39842,6 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { CHIP_ERROR TestThReadsTheSeekRangeEndAttributeFromTheDut_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -39912,7 +39851,6 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { CHIP_ERROR TestThReadsTheSeekRangeStartAttributeFromTheDut_7() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -39922,7 +39860,6 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { CHIP_ERROR TestThReadsTheDurationAttributeFromTheDut_8() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -39932,34 +39869,34 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { CHIP_ERROR TestSendsASeekCommandPositionValueBeyondTheFurthestValidPosition_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; params.position = mSeekPosition.HasValue() ? [NSNumber numberWithUnsignedLongLong:mSeekPosition.Value()] : [NSNumber numberWithUnsignedLongLong:100000000ULL]; [cluster seekWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Seek command Position value beyond the furthest valid position Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatTheMediaHasNotMoved_10() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if media has not movedgarbage: not in length on purpose", 39); value.expectedValue.Emplace(); @@ -40291,7 +40228,6 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -40299,12 +40235,14 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster pauseWithCompletionHandler:^( + 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)); @@ -40322,12 +40260,13 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentStateAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40345,12 +40284,13 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40368,31 +40308,31 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestSendsAFastForwardCommand_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - fastForwardWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a FastForward command Error: %@", err); + [cluster fastForwardWithCompletionHandler:^( + 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; } CHIP_ERROR TestVerifyThatTheMediaStateIsPlaying_5() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); value.expectedValue.Emplace(); @@ -40402,12 +40342,13 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentStateAttribute_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40425,12 +40366,13 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40448,31 +40390,31 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestSendsAFastForwardCommand_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - fastForwardWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a FastForward command Error: %@", err); + [cluster fastForwardWithCompletionHandler:^( + 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; } CHIP_ERROR TestVerifyThatTheMediaPlaySpeedHasIncreased_9() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if media play speed has increased.garbage: not in length on purpose", 51); @@ -40483,12 +40425,13 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40506,12 +40449,14 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestSendsARewindCommandToTheDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster rewindWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster rewindWithCompletionHandler:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Sends a Rewind command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40529,7 +40474,6 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestVerifyThatTheMediaPlayHasReversedDirection_12() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if media play has reversed directiongarbage: not in length on purpose", 53); @@ -40540,12 +40484,13 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentStateAttribute_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40563,7 +40508,6 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_14() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if PlaybackSpeed value is -1garbage: not in length on purpose", 45); @@ -40574,12 +40518,14 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestSendsARewindCommandToTheDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster rewindWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster rewindWithCompletionHandler:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Sends a Rewind command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40597,7 +40543,6 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestVerifyThatTheMediaPlaySpeedHasIncreasedInTheReverseDirection_16() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Please enter 'y' if media play speed has increased in the reverse directiongarbage: not in length on purpose", 75); @@ -40608,7 +40553,6 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_17() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' if PlaybackSpeed value is -2garbage: not in length on purpose", 45); @@ -40619,30 +40563,31 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestSendsAPlayCommand_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Play command Error: %@", err); + [cluster + playWithCompletionHandler:^(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; } CHIP_ERROR TestVerifyThatTheMediaIsHasResumedPlayingForwardAtTheDefaultSpeed_19() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Please enter 'y' if media is has resumed playing forward at the default speedgarbage: not in length on purpose", 77); @@ -40653,12 +40598,13 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40676,7 +40622,6 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestSendsConsecutiveFastForwardCommands_21() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -40686,7 +40631,6 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR TestSendsConsecutiveRewindCommands_22() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -40808,7 +40752,6 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -40816,12 +40759,13 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheOutputListAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OutputList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40835,33 +40779,35 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { CHIP_ERROR TestSendsASelectAudioOutputCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; params.index = mIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mIndex.Value()] : [NSNumber numberWithUnsignedChar:1U]; [cluster selectOutputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends a SelectAudioOutput command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheCurrentOutputAttribute_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentOutputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentOutput attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40993,7 +40939,6 @@ class Test_TC_AUDIOOUTPUT_7_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -41002,12 +40947,13 @@ class Test_TC_AUDIOOUTPUT_7_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheOutputListAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OutputList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41025,29 +40971,29 @@ class Test_TC_AUDIOOUTPUT_7_2 : public TestCommandBridge { CHIP_ERROR TestSendsARenameOutputCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; params.index = mIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mIndex.Value()] : [NSNumber numberWithUnsignedChar:1U]; params.name = @"CertTest"; [cluster renameOutputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends a RenameOutput command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_3() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -41180,7 +41126,6 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -41188,12 +41133,13 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentTargetAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentTarget attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41211,12 +41157,13 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheTargetListAttribute_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the TargetList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41234,35 +41181,37 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { CHIP_ERROR TestSendsANavigateTargetCommand_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; params.target = mTargetvalue.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue.Value()] : [NSNumber numberWithUnsignedChar:1U]; [cluster navigateTargetWithParams:params - completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Sends a NavigateTarget command Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestReadsTheCurrentTargetAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentTarget attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41445,7 +41394,6 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -41453,12 +41401,13 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheVendorNameAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the VendorName attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41473,12 +41422,13 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheVendorIDAttribute_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the VendorID attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41492,12 +41442,13 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheApplicationNameAttribute_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeApplicationNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the ApplicationName attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41512,12 +41463,13 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheProductIDAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the ProductID attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41534,12 +41486,13 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheApplicationAttribute_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationWithCompletion:^( + [cluster readAttributeApplicationWithCompletionHandler:^( MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the Application attribute Error: %@", err); @@ -41554,12 +41507,13 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheStatusAttribute_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the Status attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41575,12 +41529,13 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheApplicationVersionAttribute_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeApplicationVersionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the ApplicationVersion attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41595,12 +41550,13 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheAllowedVendorListAttribute_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAllowedVendorListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the AllowedVendorList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41713,7 +41669,6 @@ class Test_TC_CONTENTLAUNCHER_10_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -41721,12 +41676,13 @@ class Test_TC_CONTENTLAUNCHER_10_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheAcceptHeaderAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptHeaderWithCompletionHandler:^(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)); @@ -41740,19 +41696,21 @@ class Test_TC_CONTENTLAUNCHER_10_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the SupportedStreamingProtocols attribute from the DUT Error: %@", err); + [cluster + readAttributeSupportedStreamingProtocolsWithCompletionHandler:^(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; } @@ -41910,7 +41868,6 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -41918,12 +41875,13 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(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)); @@ -41942,12 +41900,13 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -41966,12 +41925,13 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -41990,12 +41950,13 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -42019,12 +41980,13 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -42040,12 +42002,13 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheOptionalAttributeOnModeInAttributeListFromTheDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -42061,12 +42024,13 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42082,12 +42046,13 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42269,7 +42234,6 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { CHIP_ERROR TestCreateOtaImage_0() { - chip::app::Clusters::SystemCommands::Commands::CreateOtaImage::Type value; value.otaImageFilePath = mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); @@ -42282,7 +42246,6 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { CHIP_ERROR TestStartTheProviderWithAnImage_1() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; value.registerKey.Emplace(); value.registerKey.Value() = chip::Span("chip-ota-provider-appgarbage: not in length on purpose", 21); @@ -42300,7 +42263,6 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { CHIP_ERROR TestCommissionTheProviderFromAlpha_2() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; value.payload @@ -42310,7 +42272,6 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedProviderToBeRetrievedForAlpha_3() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; return WaitForCommissionee("alpha", value); @@ -42318,9 +42279,10 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { CHIP_ERROR TestInstallAclForQueryImage_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -42354,28 +42316,26 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Install ACL for QueryImage Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestStopTheRequestor_5() { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; return Stop("alpha", value); } CHIP_ERROR TestStartTheRequestorWithAnOtaDownloadPath_6() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; value.otaDownloadPath.Emplace(); value.otaDownloadPath.Value() = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() @@ -42385,7 +42345,6 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedRequestorToBeRetrievedForAlpha_7() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mRequestorNodeId.HasValue() ? mRequestorNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -42393,14 +42352,12 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { CHIP_ERROR TestSendAnAnnounceOtaProviderCommandToTheRequestor_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = + [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; + __auto_type * params = [[MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; params.providerNodeId = mProviderNodeId.HasValue() ? [NSNumber numberWithUnsignedLongLong:mProviderNodeId.Value()] : [NSNumber numberWithUnsignedLongLong:12648430ULL]; params.vendorId = [NSNumber numberWithUnsignedShort:0U]; @@ -42408,20 +42365,19 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { params.endpoint = mEndpoint.HasValue() ? [NSNumber numberWithUnsignedShort:mEndpoint.Value()] : [NSNumber numberWithUnsignedShort:0U]; [cluster announceOtaProviderWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Send an announce OTA provider command to the requestor Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWaitForTransferCompleteMessage_9() { - chip::app::Clusters::DelayCommands::Commands::WaitForMessage::Type value; value.registerKey.Emplace(); value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); @@ -42431,7 +42387,6 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { CHIP_ERROR TestCompareOriginalFileToDownloadedFile_10() { - chip::app::Clusters::SystemCommands::Commands::CompareFiles::Type value; value.file1 = mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); value.file2 = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() @@ -42553,7 +42508,6 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -42561,12 +42515,13 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42585,12 +42540,13 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42609,12 +42565,13 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42637,12 +42594,13 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42661,12 +42619,13 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42898,7 +42857,6 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -42906,12 +42864,13 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancy_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads mandatory attribute constrains: Occupancy Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42928,12 +42887,13 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads mandatory attribute constrains: OccupancySensorType Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42950,34 +42910,38 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: OccupancySensorTypeBitmap Error: %@", err); + [cluster + readAttributeOccupancySensorTypeBitmapWithCompletionHandler:^(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; } CHIP_ERROR TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attribute: PIROccupiedToUnoccupiedDelay Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42994,12 +42958,14 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43016,12 +42982,13 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^( + [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold Error: %@", err); @@ -43039,62 +43006,65 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay Error: %@", err); + [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:^( + 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; } CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedDelay Error: %@", err); + [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:^( + 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; } CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( + [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedThreshold Error: %@", err); @@ -43114,12 +43084,13 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); @@ -43139,12 +43110,13 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); @@ -43164,12 +43136,13 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( + [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); @@ -43339,7 +43312,6 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -43347,12 +43319,11 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43371,12 +43342,11 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43395,12 +43365,11 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenOosf00ltEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -43414,12 +43383,11 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43440,12 +43408,11 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentOOSF00AttributeInAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -43464,12 +43431,11 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43487,12 +43453,11 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -43510,12 +43475,11 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43666,7 +43630,6 @@ class Test_TC_OO_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -43674,12 +43637,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeOnOff_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43693,12 +43655,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { CHIP_ERROR TestReadLtAttributeGlobalSceneControl_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGlobalSceneControlWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGlobalSceneControlWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read LT attribute: GlobalSceneControl Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43712,12 +43673,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { CHIP_ERROR TestReadLtAttributeOnTime_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read LT attribute: OnTime Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43734,12 +43694,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { CHIP_ERROR TestReadLtAttributeOffWaitTime_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffWaitTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read LT attribute: OffWaitTime Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43756,12 +43715,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { CHIP_ERROR TestReadLtAttributeStartUpOnOff_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read LT attribute: StartUpOnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44090,7 +44048,6 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -44098,12 +44055,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendOffCommand_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44116,12 +44072,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -44139,12 +44094,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendOnCommand_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44157,12 +44111,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -44180,12 +44133,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendOnCommand_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44198,12 +44150,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -44221,12 +44172,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendOffCommand_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44239,12 +44189,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -44262,12 +44211,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendOffCommand_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44280,12 +44228,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -44303,12 +44250,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendToggleCommand_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster toggleWithCompletion:^(NSError * _Nullable err) { + [cluster toggleWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Toggle Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44321,7 +44267,6 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestWait1000ms_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); @@ -44329,12 +44274,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -44352,12 +44296,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendToggleCommand_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster toggleWithCompletion:^(NSError * _Nullable err) { + [cluster toggleWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Toggle Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44370,7 +44313,6 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestWait1000ms_15() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); @@ -44378,12 +44320,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -44401,7 +44342,6 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestOperateOnDeviceToSetOnOffAttributeManuallyToOn_17() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -44411,12 +44351,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -44434,7 +44373,6 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestOperateOnDeviceToSetOnOffAttributeManuallyToOff_19() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -44444,12 +44382,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -44467,12 +44404,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestResetOffCommand_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Reset Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44485,12 +44421,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -44891,7 +44826,6 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -44899,12 +44833,11 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThSendsOnCommandToDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44917,35 +44850,32 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThWritesAValueOf0ToStartUpOnOffAttributeOfDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpOnOffArgument; startUpOnOffArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 0 to StartUpOnOff attribute of DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestRebootTargetDevice_3() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestRebootTargetDeviceDUT_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); @@ -44956,7 +44886,6 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_5() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -44964,12 +44893,11 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -44987,35 +44915,32 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThWritesAValueOf1ToStartUpOnOffAttributeOfDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpOnOffArgument; startUpOnOffArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 1 to StartUpOnOff attribute of DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestRebootTargetDevice_8() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestRebootTargetDeviceDUT_9() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); @@ -45026,7 +44951,6 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_10() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -45034,12 +44958,11 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -45057,35 +44980,32 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThWritesAValueOf2ToStartUpOnOffAttributeOfDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpOnOffArgument; startUpOnOffArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 2 to StartUpOnOff attribute of DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestRebootTargetDevice_13() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestRebootTargetDeviceDUT_14() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); @@ -45096,7 +45016,6 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_15() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -45104,12 +45023,11 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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,14 +45045,12 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestRebootTargetDevice_17() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestRebootTargetDeviceDUT_18() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); @@ -45145,7 +45061,6 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_19() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -45153,12 +45068,11 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -45176,35 +45090,32 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThWritesNullToStartUpOnOffAttributeOfDut_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpOnOffArgument; startUpOnOffArgument = nil; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes NULL to StartUpOnOff attribute of DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestRebootTargetDevice_22() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestRebootTargetDeviceDUT_23() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); @@ -45215,7 +45126,6 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_24() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -45223,12 +45133,11 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -45246,12 +45155,11 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThSendsOffCommandToDut_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45264,14 +45172,12 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestRebootTargetDevice_27() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestRebootTargetDeviceDUT_28() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); @@ -45282,7 +45188,6 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_29() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -45290,12 +45195,11 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -45520,7 +45424,6 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -45528,12 +45431,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45552,12 +45456,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45576,12 +45481,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenPssf00wiredEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -45595,12 +45501,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenPssf01batEnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -45614,12 +45521,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenPssf02rechgEnsureFeaturemapHasTheCorrectBitSet_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -45633,12 +45541,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenPssf03replcEnsureFeaturemapHasTheCorrectBitSet_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -45652,12 +45561,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45680,12 +45590,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -45701,12 +45612,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentPSSF01BatAttributeInAttributeList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -45724,12 +45636,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -45746,12 +45659,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -45768,12 +45682,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45792,12 +45707,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46240,7 +46156,6 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -46248,12 +46163,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsStatusAttributeFromServerDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStatusWithCompletionHandler:^(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)); @@ -46270,12 +46186,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsOrderAttributeFromServerDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOrderWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOrderWithCompletionHandler:^(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)); @@ -46292,12 +46209,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsDescriptionAttributeFromServerDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDescriptionWithCompletionHandler:^(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)); @@ -46311,38 +46229,42 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsWiredAssessedInputVoltageAttribueFromServerDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredAssessedInputVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads WiredAssessedInputVoltage attribue from Server DUT Error: %@", err); + [cluster + readAttributeWiredAssessedInputVoltageWithCompletionHandler:^(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; } CHIP_ERROR TestTestHarnessClientReadsWiredAssessedInputFrequencyAttributeFromServerDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredAssessedInputFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiredAssessedInputFrequencyWithCompletionHandler:^( + 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)); @@ -46363,12 +46285,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsWiredCurrentTypeAttributeFromServerDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredCurrentTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiredCurrentTypeWithCompletionHandler:^(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)); @@ -46385,12 +46308,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsWiredAssessedCurrentAttributeFromServerDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredAssessedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiredAssessedCurrentWithCompletionHandler:^(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)); @@ -46410,12 +46334,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsWiredNominalVoltageFromServerDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredNominalVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiredNominalVoltageWithCompletionHandler:^(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)); @@ -46432,12 +46357,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsWiredMaximumCurrentFromServerDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredMaximumCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiredMaximumCurrentWithCompletionHandler:^(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)); @@ -46454,12 +46380,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsWiredPresentFromServerDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiredPresentWithCompletionHandler:^(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)); @@ -46473,12 +46400,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsActiveWiredFaultsFromServerDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeActiveWiredFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeActiveWiredFaultsWithCompletionHandler:^(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)); @@ -46493,12 +46421,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatVoltageFromServerDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatVoltageWithCompletionHandler:^(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)); @@ -46518,12 +46447,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatPercentRemainingFromServerDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatPercentRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatPercentRemainingWithCompletionHandler:^(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)); @@ -46543,12 +46473,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatTimeRemainingFromServerDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatTimeRemainingWithCompletionHandler:^(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)); @@ -46568,12 +46499,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatChargeLevelFromServerDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatChargeLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatChargeLevelWithCompletionHandler:^(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)); @@ -46590,12 +46522,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatReplacementNeededFromServerDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatReplacementNeededWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatReplacementNeededWithCompletionHandler:^(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)); @@ -46609,12 +46542,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatReplaceabilityFromServerDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatReplaceabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatReplaceabilityWithCompletionHandler:^(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)); @@ -46631,12 +46565,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatPresentFromServerDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatPresentWithCompletionHandler:^(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)); @@ -46650,12 +46585,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsActiveBatFaultsFromServerDut_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeActiveBatFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeActiveBatFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client readsActiveBatFaults from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46670,32 +46606,35 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatReplacementDescriptionFromServerDut_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatReplacementDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatReplacementDescription from Server DUT Error: %@", err); + [cluster + readAttributeBatReplacementDescriptionWithCompletionHandler:^(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; } CHIP_ERROR TestTestHarnessClientReadsBatCommonDesignationFromServerDut_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatCommonDesignationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatCommonDesignationWithCompletionHandler:^(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)); @@ -46712,12 +46651,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatANSIDesignationFromServerDut_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatANSIDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatANSIDesignationWithCompletionHandler:^(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)); @@ -46732,12 +46672,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatIECDesignationFromServerDut_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatIECDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatIECDesignationWithCompletionHandler:^(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)); @@ -46752,12 +46693,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatApprovedChemistryFromServerDut_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatApprovedChemistryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatApprovedChemistryWithCompletionHandler:^(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)); @@ -46774,12 +46716,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatCapacityFromServerDut_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatCapacityWithCompletionHandler:^(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)); @@ -46796,12 +46739,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatQuantityFromServerDut_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatQuantityWithCompletionHandler:^(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)); @@ -46818,12 +46762,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatChargeStateFromServerDut_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatChargeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatChargeStateWithCompletionHandler:^(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)); @@ -46840,12 +46785,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatTimeToFullChargeFromServerDut_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatTimeToFullChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatTimeToFullChargeWithCompletionHandler:^(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)); @@ -46865,31 +46811,34 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatFunctionalWhileChargingFromServerDut_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatFunctionalWhileChargingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatFunctionalWhileCharging from Server DUT Error: %@", err); + [cluster + readAttributeBatFunctionalWhileChargingWithCompletionHandler:^(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; } CHIP_ERROR TestTestHarnessClientReadsBatChargingCurrentFromServerDut_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatChargingCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatChargingCurrentWithCompletionHandler:^(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)); @@ -46909,12 +46858,13 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsActiveBatChargeFaultsFromServerDut_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeActiveBatChargeFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeActiveBatChargeFaultsWithCompletionHandler:^(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)); @@ -47121,7 +47071,6 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -47129,14 +47078,13 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47155,14 +47103,13 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47181,14 +47128,13 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenPrssf00extEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -47202,14 +47148,13 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalMandatoryAttributeAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global mandatory attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47232,14 +47177,13 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeScaledValueInAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ScaledValue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47255,14 +47199,13 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinScaledValueInAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(MinScaledValue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47278,14 +47221,13 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxScaledValueInAttributeList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(MaxScaledValue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47301,14 +47243,13 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeScaleInAttributeList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Scale) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47324,14 +47265,13 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47347,14 +47287,13 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeScaledToleranceInAttributeList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ScaledTolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47370,14 +47309,13 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47396,14 +47334,13 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47598,7 +47535,6 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -47606,14 +47542,13 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMeasuredValue_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute constraints: MeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47633,14 +47568,13 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMinMeasuredValue_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute constraints: MinMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47660,14 +47594,13 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMaxMeasuredValue_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute constraints: MaxMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47687,14 +47620,13 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeTolerance_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Tolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47711,14 +47643,13 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeScaledValue_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ScaledValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47738,14 +47669,13 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinScaledValue_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinScaledValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47765,14 +47695,13 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxScaledValue_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxScaledValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47792,14 +47721,13 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeScaledTolerance_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeScaledToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ScaledTolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47816,14 +47744,13 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeScale_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeScaleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Scale Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47958,7 +47885,6 @@ class Test_TC_PRS_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -47967,14 +47893,13 @@ class Test_TC_PRS_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletionHandler:^(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)); @@ -47991,7 +47916,6 @@ class Test_TC_PRS_2_2 : public TestCommandBridge { CHIP_ERROR TestOperateOnDeviceToChangeThePressureSignificantly_2() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -48001,7 +47925,6 @@ class Test_TC_PRS_2_2 : public TestCommandBridge { CHIP_ERROR TestWait2s_3() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); @@ -48009,14 +47932,13 @@ class Test_TC_PRS_2_2 : public TestCommandBridge { CHIP_ERROR TestAfterAFewSecondsThReadsFromTheDutTheMeasuredValueAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletionHandler:^(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)); @@ -48339,7 +48261,6 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -48347,14 +48268,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(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)); @@ -48373,14 +48292,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -48399,14 +48316,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48433,14 +48348,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48456,14 +48369,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48479,14 +48390,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48502,14 +48411,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48525,14 +48432,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48548,14 +48453,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48571,14 +48474,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48594,14 +48495,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48617,14 +48516,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48640,14 +48537,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48663,14 +48558,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48686,14 +48579,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48709,14 +48600,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48732,14 +48621,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48755,14 +48642,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48778,14 +48663,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -48801,14 +48684,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheAcceptedCommandListAttributeFromTheDut_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -48827,14 +48708,12 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheGeneratedCommandListAttributeFromTheDut_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(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)); @@ -49183,7 +49062,6 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -49191,14 +49069,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MaxPressure Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49218,14 +49094,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxSpeed_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MaxSpeed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49245,14 +49119,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxFlow_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MaxFlow Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49272,14 +49144,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinConstPressure_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstPressure Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49299,14 +49169,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxConstPressure_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstPressure Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49326,14 +49194,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinCompPressure_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinCompPressure Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49353,14 +49219,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxCompPressure_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxCompPressure Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49380,14 +49244,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinConstSpeed_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstSpeed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49407,14 +49269,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxConstSpeed_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstSpeed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49434,14 +49294,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinConstFlow_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstFlow Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49461,14 +49319,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxConstFlow_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstFlow Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49488,14 +49344,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinConstTemp_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstTemp Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49515,14 +49369,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxConstTemp_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstTemp Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49542,14 +49394,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributePumpStatus_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePumpStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: PumpStatus Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49566,14 +49416,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadAttributeEffectiveOperationMode_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute: EffectiveOperationMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49590,14 +49438,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadAttributeEffectiveControlMode_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49614,14 +49460,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadAttributeCapacity_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute: Capacity Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49641,14 +49485,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeSpeed_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Speed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49668,14 +49510,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: LifetimeRunningHours Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49695,14 +49535,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributePower_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Power Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49722,14 +49560,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: LifetimeEnergyConsumed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49749,14 +49585,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadOptionalAttributeOperationMode_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute: OperationMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49773,14 +49607,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadOptionalAttributeControlMode_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute: ControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49963,7 +49795,6 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -49971,37 +49802,33 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { CHIP_ERROR TestThWrite0NormalToTheOperationModeAttributeToDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; operationModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH write 0 (Normal) to the OperationMode attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(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)); @@ -50019,37 +49846,33 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { CHIP_ERROR TestThWrite1MinimumToTheOperationModeAttributeToDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; operationModeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH write 1 (Minimum) to the OperationMode attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(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)); @@ -50067,39 +49890,35 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { CHIP_ERROR TestThWrite2MaximumToTheOperationModeAttributeToDutOneAtATime_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; operationModeArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster writeAttributeOperationModeWithValue:operationModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time. " - @"Error: %@", - err); + [cluster + writeAttributeOperationModeWithValue:operationModeArgument + completionHandler:^(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; } CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(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)); @@ -50117,37 +49936,33 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { CHIP_ERROR TestThWrite3LocalToTheOperationModeAttributeToDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; operationModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH write 3 (Local) to the OperationMode attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(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)); @@ -50396,7 +50211,6 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -50404,37 +50218,33 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite0ToTheOperationModeAttributeToDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; operationModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 0 to the OperationMode attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50452,37 +50262,33 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite0ToTheControlModeAttributeToDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlModeArgument; controlModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeControlModeWithValue:controlModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 0 to the ControlMode attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50500,37 +50306,33 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite1ToTheControlModeAttributeToDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlModeArgument; controlModeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeControlModeWithValue:controlModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 1 to the ControlMode attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50548,37 +50350,33 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite2ToTheControlModeAttributeToDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlModeArgument; controlModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeControlModeWithValue:controlModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 2 to the ControlMode attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50596,37 +50394,33 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite3ToTheControlModeAttributeToDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlModeArgument; controlModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeControlModeWithValue:controlModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 3 to the ControlMode attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50644,37 +50438,33 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite5ToTheControlModeAttributeToDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlModeArgument; controlModeArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeControlModeWithValue:controlModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 5 to the ControlMode attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50692,37 +50482,33 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite7ToTheControlModeAttributeToDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlModeArgument; controlModeArgument = [NSNumber numberWithUnsignedChar:7U]; [cluster writeAttributeControlModeWithValue:controlModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 7 to the ControlMode attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50949,7 +50735,6 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -50957,37 +50742,33 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWrite1ToTheLifetimeRunningHoursAttributeToDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id lifetimeRunningHoursArgument; lifetimeRunningHoursArgument = [NSNumber numberWithUnsignedInt:1UL]; [cluster writeAttributeLifetimeRunningHoursWithValue:lifetimeRunningHoursArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 1 to the LifetimeRunningHours attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeLifetimeRunningHours_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: LifetimeRunningHours Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51006,37 +50787,33 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWrite2ToTheLifetimeRunningHoursAttributeToDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id lifetimeRunningHoursArgument; lifetimeRunningHoursArgument = [NSNumber numberWithUnsignedInt:2UL]; [cluster writeAttributeLifetimeRunningHoursWithValue:lifetimeRunningHoursArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 2 to the LifetimeRunningHours attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeLifetimeRunningHours_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: LifetimeRunningHours Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51055,37 +50832,33 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWrite3ToTheLifetimeRunningHoursAttributeToDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id lifetimeRunningHoursArgument; lifetimeRunningHoursArgument = [NSNumber numberWithUnsignedInt:3UL]; [cluster writeAttributeLifetimeRunningHoursWithValue:lifetimeRunningHoursArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 3 to the LifetimeRunningHours attribute to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeLifetimeRunningHours_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: LifetimeRunningHours Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51104,38 +50877,33 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWrite1ToTheLifetimeEnergyConsumedAttributeToDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id lifetimeEnergyConsumedArgument; lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:1UL]; - [cluster - writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 1 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); + [cluster writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeLifetimeEnergyConsumed_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: LifetimeEnergyConsumed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51154,38 +50922,33 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWrite2ToTheLifetimeEnergyConsumedAttributeToDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id lifetimeEnergyConsumedArgument; lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:2UL]; - [cluster - writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 2 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); + [cluster writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeLifetimeEnergyConsumed_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: LifetimeEnergyConsumed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51204,38 +50967,33 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWrite3ToTheLifetimeEnergyConsumedAttributeToDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id lifetimeEnergyConsumedArgument; lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:3UL]; - [cluster - writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 3 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); + [cluster writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument + completionHandler:^(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; } CHIP_ERROR TestReadsTheAttributeLifetimeEnergyConsumed_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: LifetimeEnergyConsumed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51366,7 +51124,6 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestCommissionDutToTh_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -51374,14 +51131,12 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(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)); @@ -51400,14 +51155,12 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -51426,14 +51179,12 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -51454,14 +51205,12 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheAcceptedCommandListAttributeFromTheDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -51480,14 +51229,12 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheGeneratedCommandListAttributeFromTheDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(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)); @@ -51594,7 +51341,6 @@ class Test_TC_PSCFG_2_1 : public TestCommandBridge { CHIP_ERROR TestCommissionDutToTh_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -51602,14 +51348,12 @@ class Test_TC_PSCFG_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheSourcesAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSourcesWithCompletionHandler:^(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)); @@ -51746,7 +51490,6 @@ class Test_TC_RH_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -51754,14 +51497,12 @@ class Test_TC_RH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadClusterRevisionAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51780,14 +51521,12 @@ class Test_TC_RH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51806,14 +51545,12 @@ class Test_TC_RH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51836,14 +51573,12 @@ class Test_TC_RH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51859,14 +51594,12 @@ class Test_TC_RH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51885,14 +51618,12 @@ class Test_TC_RH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52032,7 +51763,6 @@ class Test_TC_RH_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -52040,14 +51770,12 @@ class Test_TC_RH_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheMinMeasuredValueAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(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)); @@ -52067,14 +51795,12 @@ class Test_TC_RH_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheMaxMeasuredValueAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(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)); @@ -52094,14 +51820,12 @@ class Test_TC_RH_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheMeasuredValueAttributeFromTheDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletionHandler:^(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)); @@ -52121,14 +51845,12 @@ class Test_TC_RH_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheToleranceAttributeFromTheDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterRelativeHumidityMeasurement * cluster = + [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeToleranceWithCompletionHandler:^(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)); @@ -52332,7 +52054,6 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -52340,12 +52061,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52364,12 +52084,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeAndCheckValuesOfFlagsInThisFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -52388,12 +52107,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenSwtchsf00lsEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -52407,12 +52125,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenSwtchsf01msEnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -52426,12 +52143,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenSwtchsf02msrEnsureFeaturemapHasTheCorrectBitSet_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -52445,12 +52161,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenSwtchsf03mslEnsureFeaturemapHasTheCorrectBitSet_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -52464,12 +52179,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenSwtchsf04msmEnsureFeaturemapHasTheCorrectBitSet_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -52483,12 +52197,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52511,12 +52224,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52538,12 +52250,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52557,12 +52268,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52704,7 +52414,6 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -52712,14 +52421,12 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { CHIP_ERROR TestReadClusterRevisionAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52738,14 +52445,12 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52764,14 +52469,12 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52794,14 +52497,12 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52817,14 +52518,12 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { CHIP_ERROR TestReadAcceptedCommandListAttributeFromTheDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read AcceptedCommandList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52843,14 +52542,12 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { CHIP_ERROR TestReadGeneratedCommandListAttributeFromTheDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read GeneratedCommandList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52990,7 +52687,6 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -52998,14 +52694,12 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MinMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53025,14 +52719,12 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53052,14 +52744,12 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53079,14 +52769,12 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeTolerance_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterTemperatureMeasurement * cluster = + [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Tolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53408,7 +53096,6 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -53416,12 +53103,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53440,12 +53128,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53464,12 +53153,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenTstatsf00heatEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -53483,12 +53173,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenTstatsf01coolEnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -53502,12 +53193,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenTstatsf02occEnsureFeaturemapHasTheCorrectBitSet_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -53521,12 +53213,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenTstatsf03schEnsureFeaturemapHasTheCorrectBitSet_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -53540,12 +53233,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenTstatsf04sbEnsureFeaturemapHasTheCorrectBitSet_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -53559,12 +53253,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenTstatsf05autoEnsureFeaturemapHasTheCorrectBitSet_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -53578,12 +53273,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53606,12 +53302,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -53627,12 +53324,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -53648,12 +53346,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -53669,12 +53368,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -53690,12 +53390,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -53711,12 +53412,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -53734,12 +53436,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -53757,12 +53460,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -53780,12 +53484,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -53803,12 +53508,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53824,12 +53530,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -53848,12 +53555,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53979,7 +53687,6 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -53987,14 +53694,12 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadClusterRevisionAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH read ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54013,14 +53718,12 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54039,14 +53742,12 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54069,14 +53770,12 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54095,14 +53794,12 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54231,7 +53928,6 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -54239,14 +53935,12 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: TemperatureDisplayMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54263,14 +53957,12 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: KeypadLockout Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54287,24 +53979,23 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); + [cluster + readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(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; } @@ -54790,7 +54481,6 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -54798,33 +54488,28 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id temperatureDisplayModeArgument; temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Writes a value of 0 to TemperatureDisplayMode attribute of DUT Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyDeviceTemperatureDisplayedInc_2() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -54834,14 +54519,12 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheTemperatureDisplayModeAttributeOfDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54854,33 +54537,28 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id temperatureDisplayModeArgument; temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Writes a value of 1 to TemperatureDisplayMode attribute of DUT Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyDeviceTemperatureDisplayedInf_5() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -54890,14 +54568,12 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheTemperatureDisplayModeAttributeOfDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54915,43 +54591,39 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id temperatureDisplayModeArgument; temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of greater than 1 to TemperatureDisplayMode " - @"attribute of DUT Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestThReadsTheTemperatureDisplayModeAttributeOfDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54969,30 +54641,27 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 0 to KeypadLockout attribute of DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyAllDeviceFunctionalityAvailableToTheUser_10() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -55002,14 +54671,12 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -55027,30 +54694,27 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 1 to KeypadLockout attribute of DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyDeviceOperatesAtLevel1ReducedFunctionality_13() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -55060,14 +54724,12 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -55085,30 +54747,27 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 2 to KeypadLockout attribute of DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyDeviceOperatesAtLevel2ReducedFunctionality_16() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -55118,14 +54777,12 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -55143,30 +54800,27 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 3 to KeypadLockout attribute of DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyDeviceOperatesAtLevel3ReducedFunctionality_19() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -55176,14 +54830,12 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -55201,30 +54853,27 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:4U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 4 to KeypadLockout attribute of DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyDeviceOperatesAtLevel4ReducedFunctionality_22() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -55234,14 +54883,12 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -55259,30 +54906,27 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 5 to KeypadLockout attribute of DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyDeviceOperatesAtLeastFunctionalityLevel_25() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -55292,14 +54936,12 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -55317,43 +54959,37 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:6U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Writes a value of greater than 5 to KeypadLockout attribute of DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -55371,32 +55007,29 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id scheduleProgrammingVisibilityArgument; scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 0 to ScheduleProgrammingVisibility " - @"attribute of DUT Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyLocalScheduleProgrammingFunctionalityIsEnabledAtTheThermostat_30() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -55406,57 +55039,53 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); + [cluster + readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(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; } CHIP_ERROR TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id scheduleProgrammingVisibilityArgument; scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 1 to ScheduleProgrammingVisibility " - @"attribute of DUT Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyLocalScheduleProgrammingFunctionalityIsDisabledAtTheThermostat_33() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -55466,79 +55095,75 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_34() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); + [cluster + readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(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; } CHIP_ERROR TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_35() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id scheduleProgrammingVisibilityArgument; scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of greater than 1 to " - @"ScheduleProgrammingVisibility attribute of DUT Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_36() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterThermostatUserInterfaceConfiguration * cluster = + [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); + [cluster + readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(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; } @@ -56228,7 +55853,6 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -56236,14 +55860,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56262,14 +55884,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56288,14 +55908,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDgthreadsf00pktcntEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -56309,14 +55927,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDgthreadsf01errcntEnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -56330,14 +55946,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDgthreadsf02mlecntEnsureFeaturemapHasTheCorrectBitSet_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -56351,14 +55965,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDgthreadsf03maccntEnsureFeaturemapHasTheCorrectBitSet_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -56372,14 +55984,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsMandatoryAttributesInAttributeListFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -56416,14 +56026,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentAttributeDGTHREADSF01ERRCNTInAttributeList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -56439,14 +56047,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeDetachedRoleCountInAttributeList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (DetachedRoleCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56462,14 +56068,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeChildRoleCountAttributeList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (ChildRoleCount) AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56485,14 +56089,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRouterRoleCountInAttributeList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RouterRoleCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56508,14 +56110,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeLeaderRoleCountInAttributeList_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (LeaderRoleCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56531,14 +56131,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeAttachAttemptCountInAttributeList_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (AttachAttemptCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56554,14 +56152,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributePartitionIdChangeCountInAttributeList_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (PartitionIdChangeCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56577,14 +56173,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeBetterPartitionAttachAttemptCountInAttributeList_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (BetterPartitionAttachAttemptCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56600,14 +56194,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeParentChangeCountInAttributeList_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (ParentChangeCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56623,14 +56215,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxTotalCountInAttributeList_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxTotalCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56646,14 +56236,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxUnicastCountInAttributeList_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxUnicastCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56669,14 +56257,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxBroadcastCountInAttributeList_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxBroadcastCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56692,14 +56278,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxAckRequestedCountInAttributeList_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxAckRequestedCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56715,14 +56299,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxAckedCountInAttributeList_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxAckedCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56738,14 +56320,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxNoAckRequestedCountInAttributeList_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxNoAckRequestedCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56761,14 +56341,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributesTxDataCountInAttributeList_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attributes (TxDataCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56784,14 +56362,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxDataPollCountInAttributeList_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxDataPollCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56807,14 +56383,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxBeaconCountInAttributeList_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxBeaconCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56830,14 +56404,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxBeaconRequestCountInAttributeList_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxBeaconRequestCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56853,14 +56425,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxOtherCountInAttributeList_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxOtherCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56876,14 +56446,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxRetryCountInAttributeList_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxRetryCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56899,14 +56467,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxDirectMaxRetryExpiryCountInAttributeList_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxDirectMaxRetryExpiryCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56922,14 +56488,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxIndirectMaxRetryExpiryCountInAttributeList_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxIndirectMaxRetryExpiryCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56945,14 +56509,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxErrCcaCountInAttributeList_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxErrCcaCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56968,14 +56530,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxErrAbortCountInAttributeList_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxErrAbortCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56991,14 +56551,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeTxErrBusyChannelCountInAttributeList_33() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxErrBusyChannelCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57014,14 +56572,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxTotalCountInAttributeList_34() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxTotalCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57037,14 +56593,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxUnicastCountInAttributeList_35() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxUnicastCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57060,14 +56614,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxBroadcastCountInAttributeList_36() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxBroadcastCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57083,14 +56635,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxDataCountInAttributeList_37() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxDataCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57106,14 +56656,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxDataPollCountInAttributeList_38() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxDataPollCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57129,14 +56677,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxBeaconCountInAttributeList_39() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxBeaconCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57152,14 +56698,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxBeaconRequestCountInAttributeList_40() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxBeaconRequestCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57175,14 +56719,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxOtherCountInAttributeList_41() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxOtherCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57198,14 +56740,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxAddressFilteredCountInAttributeList_42() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxAddressFilteredCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57221,14 +56761,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxDestAddrFilteredCountInAttributeList_43() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxDestAddrFilteredCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57244,14 +56782,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxDuplicatedCountInAttributeList_44() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxDuplicatedCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57267,14 +56803,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxErrNoFrameCountInAttributeList_45() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxErrNoFrameCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57290,14 +56824,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxErrUnknownNeighborCountInAttributeList_46() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxErrUnknownNeighborCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57313,14 +56845,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxErrInvalidScrAddrCountInAttributeList_47() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxErrInvalidScrAddrCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57336,14 +56866,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxErrSecCountInAttributeList_48() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxErrSecCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57359,14 +56887,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxErrFcsCountInAttributeList_49() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxErrFcsCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57382,14 +56908,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeRxErrOtherCountInAttributeList_50() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxErrOtherCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57405,14 +56929,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeActiveTimestampInAttributeList_51() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute (ActiveTimestamp) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57428,14 +56950,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributePendingTimestampInAttributeList_52() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute (PendingTimestamp) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57451,14 +56971,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeDelayInAttributeList_53() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute (Delay) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57474,14 +56992,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_54() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57497,14 +57013,12 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListFromDut_55() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterThreadNetworkDiagnostics * cluster = + [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57635,7 +57149,6 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -57643,12 +57156,11 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57667,12 +57179,11 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57691,12 +57202,11 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57717,12 +57227,11 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57741,12 +57250,11 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57853,7 +57361,6 @@ class Test_TC_ULABEL_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -57861,12 +57368,11 @@ class Test_TC_ULABEL_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57979,7 +57485,6 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -57987,9 +57492,8 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { CHIP_ERROR TestThWritesLabelListAttributeFromTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id labelListArgument; @@ -58014,25 +57518,24 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute from the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsLabelListAttributeFromTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads LabelList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58161,7 +57664,6 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -58169,9 +57671,8 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id labelListArgument; @@ -58183,27 +57684,25 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { labelListArgument = temp_0; } - [cluster - writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(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; } CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id labelListArgument; @@ -58215,18 +57714,17 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { labelListArgument = temp_0; } - [cluster - writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(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; } @@ -58354,7 +57852,6 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -58362,9 +57859,8 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id labelListArgument; @@ -58381,25 +57877,24 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58423,9 +57918,8 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id labelListArgument; @@ -58438,25 +57932,24 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58668,7 +58161,6 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -58676,14 +58168,12 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58702,14 +58192,12 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58728,14 +58216,12 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDGWIFISF00PacketCountsEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -58749,14 +58235,12 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDGWIFISF01ErrorCountsEnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -58770,14 +58254,12 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58802,14 +58284,12 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -58829,14 +58309,12 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -58853,14 +58331,12 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -58876,14 +58352,12 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58902,14 +58376,12 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -58925,14 +58397,12 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59171,7 +58641,6 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -59179,14 +58648,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsBssidAttributeFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBssidWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBssidWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads BSSID attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59204,14 +58671,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsSecurityTypeAttributeConstraints_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSecurityTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSecurityTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads SecurityType attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59229,14 +58694,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsWiFiVersionAttributeConstraints_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiFiVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiFiVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads WiFiVersion attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59256,14 +58719,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsChannelNumberAttributeConstraints_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelNumberWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeChannelNumberWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads ChannelNumber attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59283,14 +58744,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsRssiAttributeConstraints_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRssiWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRssiWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads RSSI attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59310,14 +58769,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBeaconLostCountAttributeConstraints_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBeaconLostCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads BeaconLostCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59337,14 +58794,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBeaconRxCountAttributeConstraints_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBeaconRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads BeaconRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59364,14 +58819,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsPacketMulticastRxCountAttributeConstraints_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketMulticastRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketMulticastRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59391,14 +58844,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsPacketMulticastTxCountAttributeConstraints_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketMulticastTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketMulticastTxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59418,14 +58869,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsPacketUnicastRxCountAttributeConstraints_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketUnicastRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketUnicastRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59445,14 +58894,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsPacketUnicastTxCountAttributeConstraints_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketUnicastTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketUnicastTxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59472,14 +58919,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentMaxRateAttributeConstraints_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentMaxRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentMaxRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentMaxRate attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59497,14 +58942,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsOverrunCountAttributeConstraints_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads OverrunCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59676,7 +59119,6 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -59684,14 +59126,12 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsResetCountsCommandToDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster resetCountsWithCompletion:^(NSError * _Nullable err) { + [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends ResetCounts command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59704,14 +59144,12 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsBeaconLostCountAttributeFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBeaconLostCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads BeaconLostCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59731,14 +59169,12 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsBeaconRxCountAttributeFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBeaconRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads BeaconRxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59758,14 +59194,12 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsPacketMulticastRxCountAttributeFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketMulticastRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketMulticastRxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59785,14 +59219,12 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsPacketMulticastTxCountAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketMulticastTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketMulticastTxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59812,14 +59244,12 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsPacketUnicastRxCountAttributeFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketUnicastRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketUnicastRxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59839,14 +59269,12 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsPacketUnicastTxCountAttributeFromDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketUnicastTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketUnicastTxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60150,7 +59578,6 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -60158,12 +59585,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFromTheDutThe0xFFFDClusterRevisionAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(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)); @@ -60185,12 +59613,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFromTheDutThe0xFFFCFeatureMapAttribute_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -60209,12 +59638,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenWncvsf00lfEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -60228,12 +59658,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenWncvsf01tlEnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -60247,12 +59678,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenWncvsf02paLfEnsureFeaturemapHasTheCorrectBitSet_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -60266,12 +59698,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenWncvsf03absEnsureFeaturemapHasTheCorrectBitSet_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -60285,12 +59718,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenWncvsf04paTlEnsureFeaturemapHasTheCorrectBitSet_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -60304,12 +59738,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFromTheDutThe0xFFFBAttributeListAttribute_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -60334,12 +59769,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeSafetyStatusInAttributeList_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(SafetyStatus) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60355,12 +59791,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentWNCVSF00Wncvsf02Wncvsf03AttributeInAttributeList_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -60377,12 +59814,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -60399,12 +59837,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -60421,12 +59860,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -60443,12 +59883,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -60466,12 +59907,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentWNCVSF00Wncvsf02CommandInAcceptedCommandList_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -60487,12 +59929,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentWNCVSF01Wncvsf03CommandInAcceptedCommandList_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -60508,12 +59951,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentWNCVSF01Wncvsf04CommandInAcceptedCommandList_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -60529,12 +59973,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFromTheDutThe0xFFF8GeneratedCommandListAttribute_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(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)); @@ -60893,7 +60338,6 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -60901,12 +60345,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test1aReadTheRoMandatoryAttributeDefaultType_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTypeWithCompletionHandler:^(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)); @@ -60923,12 +60368,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test1bReadTheRoMandatoryAttributeDefaultConfigStatus_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletionHandler:^(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)); @@ -60945,12 +60391,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test1cReadTheRoMandatoryAttributeDefaultOperationalStatus_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -60967,12 +60414,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test1dReadTheRoMandatoryAttributeDefaultEndProductType_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEndProductTypeWithCompletionHandler:^(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)); @@ -60989,12 +60437,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test1eReadTheRwMandatoryAttributeDefaultMode_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeModeWithCompletionHandler:^(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)); @@ -61011,33 +60460,36 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test1fWriteAValueIntoTheRwMandatoryAttributeMode_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"1f: write a value into the RW mandatory attribute:: Mode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR Test2aReadTheRoOptionalAttributeDefaultTargetPositionLiftPercent100ths_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( + 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)); @@ -61059,12 +60511,14 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2bReadTheRoOptionalAttributeDefaultTargetPositionTiltPercent100ths_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( + 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)); @@ -61086,68 +60540,71 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2cReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercent100ths_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2c: read the RO optional attribute default: CurrentPositionLiftPercent100ths Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( + 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; } CHIP_ERROR Test2dReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercent100ths_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2d: read the RO optional attribute default: CurrentPositionTiltPercent100ths Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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; } CHIP_ERROR Test2eReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInstalledOpenLimitLiftWithCompletionHandler:^(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)); @@ -61164,12 +60621,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2fReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInstalledClosedLimitLiftWithCompletionHandler:^(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)); @@ -61186,12 +60644,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2gReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInstalledOpenLimitTiltWithCompletionHandler:^(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)); @@ -61208,12 +60667,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2hReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInstalledClosedLimitTiltWithCompletionHandler:^(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)); @@ -61230,12 +60690,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aReadTheRoMandatoryAttributeDefaultSafetyStatus_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSafetyStatusWithCompletionHandler:^(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)); @@ -61252,12 +60713,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadTheRoOptionalAttributeDefaultPhysicalClosedLimitLift_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePhysicalClosedLimitLiftWithCompletionHandler:^(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)); @@ -61274,12 +60736,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3cReadTheRoOptionalAttributeDefaultPhysicalClosedLimitTilt_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePhysicalClosedLimitTiltWithCompletionHandler:^(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)); @@ -61296,12 +60759,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentPositionLiftWithCompletionHandler:^(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)); @@ -61321,12 +60785,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentPositionTiltWithCompletionHandler:^(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)); @@ -61346,12 +60811,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNumberOfActuationsLiftWithCompletionHandler:^(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)); @@ -61368,12 +60834,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNumberOfActuationsTiltWithCompletionHandler:^(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)); @@ -61390,54 +60857,58 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3h: read the RO optional attribute default: CurrentPositionLiftPercentage Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(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; } CHIP_ERROR Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3i:read the RO optional attribute default: CurrentPositionTiltPercentage Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(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; } @@ -61534,7 +61005,6 @@ class Test_TC_WNCV_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -61542,7 +61012,6 @@ class Test_TC_WNCV_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsConfigStatusAttributeFromDutIfPaLfValueOfBit3MustBe1bElse0bIfPaTlValueOfBit4MustBe1bElse0b_1() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -61817,7 +61286,6 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -61825,33 +61293,35 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test1aThSetTheModeAttributeBit0OfTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"1a: TH set the Mode Attribute bit0 of the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR Test1bThReadsConfigStatusAttributeFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"1b: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61867,33 +61337,35 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test1cThClearTheModeAttributeBit0OfTheDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"1c: TH clear the Mode Attribute bit0 of the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR Test1dThReadsConfigStatusAttributeFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"1d: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61909,21 +61381,22 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2aThSetTheModeAttributeBit1OfTheDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"2a: TH set the Mode Attribute bit1 of the DUT Error: %@", err); + completionHandler:^(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; } @@ -61931,12 +61404,13 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2bThReadsConfigStatusAttributeFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2b: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61955,12 +61429,13 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2cIfConfigStatusBit00ThSendDownOrCloseCommandToTheDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"2c: If (ConfigStatus bit0 == 0) TH send DownOrClose command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -61974,33 +61449,35 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2dThClearTheModeAttributeBit1OfTheDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"2d: TH clear the Mode Attribute bit1 of the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR Test2eThReadsConfigStatusAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2e: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62016,12 +61493,13 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2fThReadsTheModeAttributeFromTheDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeModeWithCompletionHandler:^(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)); @@ -62037,12 +61515,13 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2gThSendDownOrCloseCommandToTheDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"2g: TH send DownOrClose command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62055,33 +61534,35 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test3aThSetTheModeAttributeBit2OfTheDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:4U]; [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"3a: TH set the Mode Attribute bit2 of the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR Test3bThSendDownOrCloseCommandToTheDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"3b: TH send DownOrClose command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -62096,12 +61577,13 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test3cThReadsConfigStatusAttributeFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3c: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62120,33 +61602,35 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test3dThClearTheModeAttributeBit2OfTheDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"3d: TH clear the Mode Attribute bit2 of the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR Test3eThSendDownOrCloseCommandToTheDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"3e: TH send DownOrClose command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62159,12 +61643,13 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test3fThReadsConfigStatusAttributeFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3f: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62268,7 +61753,6 @@ class Test_TC_WNCV_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -62276,7 +61760,6 @@ class Test_TC_WNCV_2_4 : public TestCommandBridge { CHIP_ERROR TestReadsTypeAttributeFromDut_1() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -62374,7 +61857,6 @@ class Test_TC_WNCV_2_5 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -62382,12 +61864,13 @@ class Test_TC_WNCV_2_5 : public TestCommandBridge { CHIP_ERROR TestThReadsEndProductTypeAttributeFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEndProductTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EndProductType attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62787,7 +62270,6 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -62795,12 +62277,13 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletionHandler:^(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)); @@ -62813,7 +62296,6 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsFor10SecondsMovementsOnTheDevice_2() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -62821,24 +62303,54 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3() { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4() + { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(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)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -62847,25 +62359,27 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4() + CHIP_ERROR Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); } NextTest(); @@ -62874,26 +62388,27 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5() + CHIP_ERROR Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(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)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -62901,41 +62416,15 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [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)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } bool testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled = false; ResponseHandler _Nullable test_Test_TC_WNCV_3_1_OperationalStatus_Reported = nil; CHIP_ERROR TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); test_Test_TC_WNCV_3_1_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -62953,16 +62442,18 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test2SubscribeToDutReportsOnOperationalStatusAttribute_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); uint16_t minIntervalArgument = 4U; uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - [cluster subscribeAttributeOperationalStatusWithParams:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + [cluster subscribeAttributeOperationalStatusWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] + maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] + params:params subscriptionEstablished:^{ VerifyOrReturn( testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); @@ -62984,12 +62475,13 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test2aThSendsUpOrOpenCommandToDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { + [cluster upOrOpenWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"2a: TH sends UpOrOpen command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63002,7 +62494,6 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test2bDutUpdatesItsAttributes_10() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -63010,12 +62501,14 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( + 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)); @@ -63034,12 +62527,14 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( + 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)); @@ -63058,7 +62553,6 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test2eThLeaveTheDeviceMovingFor2Seconds_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); @@ -63066,12 +62560,13 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit01_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -63085,12 +62580,13 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -63104,12 +62600,13 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -63123,12 +62620,13 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -63142,12 +62640,13 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -63161,7 +62660,6 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test3a2DutUpdatesItsAttributes_19() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs("alpha", value); @@ -63169,24 +62667,54 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_20() { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_21() + { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(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)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); } NextTest(); @@ -63195,25 +62723,27 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_21() + CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); } NextTest(); @@ -63222,26 +62752,27 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_22() + CHIP_ERROR Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(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)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); } NextTest(); @@ -63250,41 +62781,15 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_23() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [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)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR Test4aThSendsAStopMotionCommandToDut_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { + [cluster stopMotionWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"4a: TH sends a StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63297,7 +62802,6 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_25() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs("alpha", value); @@ -63305,12 +62809,13 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -63328,7 +62833,6 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test5aThWaitsForXSecondsAttributesUpdateOnTheDevice_27() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); @@ -63336,12 +62840,14 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( + 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)); @@ -63363,12 +62869,14 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( + 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)); @@ -63773,7 +63281,6 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -63781,12 +63288,13 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test1aThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { + [cluster upOrOpenWithCompletionHandler:^(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)); @@ -63799,7 +63307,6 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsFor10SecondsMovementsOnTheDevice_2() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -63807,24 +63314,54 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3() { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4() + { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(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)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); } NextTest(); @@ -63833,25 +63370,27 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4() + CHIP_ERROR Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); } NextTest(); @@ -63860,26 +63399,27 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5() + CHIP_ERROR Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(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)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); } NextTest(); @@ -63887,41 +63427,15 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [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)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } bool testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled = false; ResponseHandler _Nullable test_Test_TC_WNCV_3_2_OperationalStatus_Reported = nil; CHIP_ERROR TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); test_Test_TC_WNCV_3_2_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -63939,16 +63453,18 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test2SubscribeToDutReportsOnOperationalStatusAttribute_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); uint16_t minIntervalArgument = 4U; uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - [cluster subscribeAttributeOperationalStatusWithParams:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + [cluster subscribeAttributeOperationalStatusWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] + maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] + params:params subscriptionEstablished:^{ VerifyOrReturn( testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); @@ -63970,12 +63486,13 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test2aThSendsDownOrCloseCommandToDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"2a: TH sends DownOrClose command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63988,7 +63505,6 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test2bDutUpdatesItsAttributes_10() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -63996,12 +63512,14 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( + 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)); @@ -64020,12 +63538,14 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( + 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)); @@ -64044,7 +63564,6 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test2eThLeaveTheDeviceMovingFor2Seconds_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); @@ -64052,12 +63571,13 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit01_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -64071,12 +63591,13 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -64090,12 +63611,13 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -64109,12 +63631,13 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -64128,12 +63651,13 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -64147,7 +63671,6 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test3a2DutUpdatesItsAttributes_19() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs("alpha", value); @@ -64155,24 +63678,54 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_20() { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } + + NextTest(); + }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_21() + { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(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)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -64181,25 +63734,27 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_21() + CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); } NextTest(); @@ -64208,26 +63763,27 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_22() + CHIP_ERROR Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(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)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -64236,41 +63792,15 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_23() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [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)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR Test4aThSendsAStopMotionCommandToDut_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { + [cluster stopMotionWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"4a: TH sends a StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64283,7 +63813,6 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_25() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs("alpha", value); @@ -64291,12 +63820,13 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -64314,7 +63844,6 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test5aThWaitsForXSecondsAttributesUpdateOnTheDevice_27() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); @@ -64322,12 +63851,14 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( + 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)); @@ -64349,12 +63880,14 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( + 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)); @@ -64622,7 +64155,6 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -64630,12 +64162,13 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletionHandler:^(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)); @@ -64648,7 +64181,6 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsFor68SecondsMovementsOnTheDevice_2() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 6000UL; return WaitForMs("alpha", value); @@ -64656,12 +64188,13 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test1cThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { + [cluster upOrOpenWithCompletionHandler:^(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)); @@ -64674,7 +64207,6 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test1dThWaitsFor2SecondsMovementsOnTheDevice_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); @@ -64682,12 +64214,13 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test1eThReadsOperationalStatusAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"1e: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64702,7 +64235,6 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test1dThWaitsFor2SecondsMovementsOnTheDevice_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); @@ -64712,9 +64244,10 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); test_Test_TC_WNCV_3_3_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -64732,16 +64265,18 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test2SubscribeToDutReportsOnOperationalStatusAttribute_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); uint16_t minIntervalArgument = 4U; uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - [cluster subscribeAttributeOperationalStatusWithParams:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + [cluster subscribeAttributeOperationalStatusWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] + maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] + params:params subscriptionEstablished:^{ VerifyOrReturn( testSendClusterTest_TC_WNCV_3_3_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); @@ -64763,12 +64298,13 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test2aThSendsAStopMotionCommandToDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { + [cluster stopMotionWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"2a: TH sends a StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64781,7 +64317,6 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test2bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_10() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs("alpha", value); @@ -64789,12 +64324,13 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test2cThReadsOperationalStatusAttributeFromDutAfterAStopMotion_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(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)); @@ -64812,7 +64348,6 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test2dThWaitsFor100ms3sAttributesUpdateOnTheDevice_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); @@ -64820,12 +64355,13 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test2eThReadsOperationalStatusAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2e: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64844,30 +64380,31 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + [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)); + 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; } @@ -64875,12 +64412,14 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test3bIfPaLfThReadsTargetPositionLiftPercent100thsAttribute3cItMustBeEqualWithCurrentPositionLiftPercent100thsFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( + 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); @@ -64906,30 +64445,31 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test4aIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4a: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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; } @@ -64937,12 +64477,14 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test4bIfPaTlThReadsTargetPositionTiltPercent100thsAttribute4cItMustBeEqualWithCurrentPositionTiltPercent100thsFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( + 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); @@ -65146,7 +64688,6 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -65154,12 +64695,13 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletionHandler:^(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)); @@ -65172,7 +64714,6 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsForFastMotionDurationSecondsMovementsOnTheDevice_2() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000UL; return WaitForMs("alpha", value); @@ -65180,12 +64721,13 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test2aThSendsUpOrOpenCommandToDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { + [cluster upOrOpenWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"2a: TH sends UpOrOpen command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -65198,7 +64740,6 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test2bThWaitsForFullMotionDurationSecondsMovementsOnTheDevice_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; return WaitForMs("alpha", value); @@ -65206,12 +64747,13 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test2cThReadsOperationalStatusAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2c: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -65229,21 +64771,48 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_6() { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + 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"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(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("CurrentPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 0U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 0U)); } NextTest(); @@ -65252,22 +64821,24 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7() + CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 0U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 0U)); } NextTest(); @@ -65276,23 +64847,24 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8() + CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(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("CurrentPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 0U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 0U)); } NextTest(); @@ -65300,30 +64872,6 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(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 { @@ -65506,7 +65054,6 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -65514,12 +65061,13 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test1aThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { + [cluster upOrOpenWithCompletionHandler:^(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)); @@ -65532,7 +65080,6 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsForFastMotionDurationSecondsMovementsOnTheDevice_2() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000UL; return WaitForMs("alpha", value); @@ -65540,12 +65087,13 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test2aThSendsDownOrCloseCommandToDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"2a: TH sends DownOrClose command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -65558,7 +65106,6 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test2bThWaitsForFullMotionDurationSecondsMovementsOnTheDevice_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; return WaitForMs("alpha", value); @@ -65566,12 +65113,13 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test2cThReadsOperationalStatusAttributeFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2c: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -65589,21 +65137,48 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_6() { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + 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"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(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("CurrentPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 10000U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 100U)); } NextTest(); @@ -65612,22 +65187,24 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7() + CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 100U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 10000U)); } NextTest(); @@ -65636,23 +65213,24 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8() + CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(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("CurrentPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 10000U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 100U)); } NextTest(); @@ -65660,30 +65238,6 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(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 { @@ -65941,7 +65495,6 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -65949,12 +65502,13 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletionHandler:^(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)); @@ -65967,7 +65521,6 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsForXSecondsMovementsOnTheDut_2() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; return WaitForMs("alpha", value); @@ -65975,51 +65528,52 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( + 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; } CHIP_ERROR Test2aThSendsGoToLiftPercentageCommandWith25PercentToDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:2500U]; [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"2a: TH sends GoToLiftPercentage command with 25 percent to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR Test2bDutUpdatesItsAttributes_5() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -66027,12 +65581,14 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( + 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)); @@ -66051,7 +65607,6 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test3aThSetATimeoutOfXMinutesForFailure_7() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; return WaitForMs("alpha", value); @@ -66059,12 +65614,13 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test3bThReadsOperationalStatusAttributeFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3b: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -66082,77 +65638,80 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( + 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; } CHIP_ERROR Test3dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(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; } CHIP_ERROR Test4aThSendsGoToLiftPercentageCommandWith7520PercentToDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:7520U]; [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToLiftPercentage command with 75.20 percent to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR Test4bDutUpdatesItsAttributes_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -66160,12 +65719,14 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test4cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( + 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)); @@ -66184,7 +65745,6 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test5aThWaitsForXSecondsMovementsOnTheDut_14() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; return WaitForMs("alpha", value); @@ -66192,12 +65752,13 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test5bThReadsOperationalStatusAttributeFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"5b: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -66215,49 +65776,52 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test5cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( + 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; } CHIP_ERROR Test5dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(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; } @@ -66518,7 +66082,6 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -66526,12 +66089,13 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletionHandler:^(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)); @@ -66544,7 +66108,6 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsForXSecondsMovementsOnTheDut_2() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; return WaitForMs("alpha", value); @@ -66552,51 +66115,52 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test1cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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; } CHIP_ERROR Test2aThSendsGoToTiltPercentageCommandWith30PercentToDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:3000U]; [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"2a: TH sends GoToTiltPercentage command with 30 percent to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR Test2bDutUpdatesItsAttributes_5() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -66604,12 +66168,14 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test2cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( + 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)); @@ -66628,7 +66194,6 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test3aThSetATimeoutOfXMinutesForFailure_7() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; return WaitForMs("alpha", value); @@ -66636,12 +66201,13 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test3bThReadsOperationalStatusAttributeFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3b: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -66659,77 +66225,80 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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; } CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint: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); + [cluster + readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(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; } CHIP_ERROR Test4aThSendsGoToTiltPercentageCommandWith6005PercentToDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:6005U]; [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToTiltPercentage command with 60.05 percent to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR Test4bDutUpdatesItsAttributes_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -66737,12 +66306,14 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test4cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( + 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)); @@ -66761,7 +66332,6 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test5aThWaitsForXSecondsMovementsOnTheDut_14() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; return WaitForMs("alpha", value); @@ -66769,12 +66339,13 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test5bThReadsOperationalStatusAttributeFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"5b: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -66792,49 +66363,52 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test5cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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; } CHIP_ERROR Test5dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(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; } @@ -66976,7 +66550,6 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -66985,30 +66558,31 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { CHIP_ERROR Test1aIfPaLfLfThReadsCurrentPositionLiftPercent100thsFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1a: If (PA_LF & LF) TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( + 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; } @@ -67016,106 +66590,111 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { CHIP_ERROR Test1b1cIfPaLfLfThReadsCurrentPositionLiftPercentageFromDutAssertCurrentPositionLiftPercent100ths100EqualsCurrentPositionLiftPercentage_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [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); + [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); - 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; } CHIP_ERROR Test2bThSendsGoToLiftPercentageCommandWithBadParamToDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:12288U]; - [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"2b: TH sends GoToLiftPercentage command with BadParam to DUT Error: %@", err); + [cluster + goToLiftPercentageWithParams:params + completionHandler:^(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; } CHIP_ERROR Test3aThSendsGoToLiftPercentageCommandWith10001ToDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:10001U]; - [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"3a: TH sends GoToLiftPercentage command with 10001 to DUT Error: %@", err); + [cluster + goToLiftPercentageWithParams:params + completionHandler:^(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; } CHIP_ERROR Test4aThSendsGoToLiftPercentageCommandWith0xFFFFToDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:65535U]; - [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToLiftPercentage command with 0xFFFF to DUT Error: %@", err); + [cluster + goToLiftPercentageWithParams:params + completionHandler:^(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; } @@ -67257,7 +66836,6 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -67266,30 +66844,31 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { CHIP_ERROR Test1aIfPaTlTlThReadsCurrentPositionTiltPercent100thsFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1a: If (PA_TL & TL) TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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; } @@ -67297,106 +66876,111 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { CHIP_ERROR Test1b1cIfPaLfLfThReadsCurrentPositionTiltPercentageFromDutAssertCurrentPositionTiltPercent100ths100EqualsCurrentPositionTiltPercentage_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [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); + [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); - 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; } CHIP_ERROR Test2bThSendsGoToTiltPercentageCommandWithBadParamToDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:12288U]; - [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"2b: TH sends GoToTiltPercentage command with BadParam to DUT Error: %@", err); + [cluster + goToTiltPercentageWithParams:params + completionHandler:^(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; } CHIP_ERROR Test3aThSendsGoToTiltPercentageCommandWith10001ToDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:10001U]; - [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"3a: TH sends GoToTiltPercentage command with 10001 to DUT Error: %@", err); + [cluster + goToTiltPercentageWithParams:params + completionHandler:^(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; } CHIP_ERROR Test4aThSendsGoToTiltPercentageCommandWith0xFFFFToDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:65535U]; - [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToTiltPercentage command with 0xFFFF to DUT Error: %@", err); + [cluster + goToTiltPercentageWithParams:params + completionHandler:^(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; } @@ -67634,7 +67218,6 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test0aWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -67642,12 +67225,13 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test0bThSendsUpOrOpenCommandToPrepositionTheDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { + [cluster upOrOpenWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"0b: TH sends UpOrOpen command to preposition the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -67660,29 +67244,28 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test1aIfPaLfLfThSendsGoToLiftPercentageCommandWith90ToDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:9000U]; - [cluster - goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"1a: If (PA_LF & LF) TH sends GoToLiftPercentage command with 90%% to DUT Error: %@", err); + [cluster goToLiftPercentageWithParams:params + completionHandler:^(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; } CHIP_ERROR Test1bThWaitsFor100ms1s_3() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -67690,12 +67273,13 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test1cThSendsStopMotionCommandToDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { + [cluster stopMotionWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"1c: TH sends StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -67708,7 +67292,6 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test1dThWaitsFor100ms1s_5() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); @@ -67716,29 +67299,28 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test2aIfPaTlTlThSendsGoToTiltPercentageCommandWith90ToDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:9000U]; - [cluster - goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"2a: If (PA_TL & TL) TH sends GoToTiltPercentage command with 90%% to DUT Error: %@", err); + [cluster goToTiltPercentageWithParams:params + completionHandler:^(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; } CHIP_ERROR Test2bThWaitsFor100ms1s_7() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); @@ -67746,12 +67328,13 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test2cThSendsStopMotionCommandToDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { + [cluster stopMotionWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"2c: TH sends StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -67764,7 +67347,6 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test2dThWaitsFor100ms1s_9() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); @@ -67773,26 +67355,27 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test3aThReadsCurrentPositionLiftPercent100thsFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( + 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; } @@ -67800,40 +67383,39 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test3bThReadsCurrentPositionTiltPercent100thsFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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; } CHIP_ERROR Test3cRebootRestartTheDut_12() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestRebootTargetDeviceDUT_13() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); @@ -67844,7 +67426,6 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test3dWaitForTheCommissionedDeviceToBeRetrieved_14() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -67852,60 +67433,62 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test3eThReadsCurrentPositionLiftPercent100thsFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3e: TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( + 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; } CHIP_ERROR Test3fThReadsCurrentPositionTiltPercent100thsFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3f: TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( + 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; } @@ -68010,7 +67593,6 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -68018,12 +67600,13 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeTargetNavigatorList_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Target Navigator list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68047,12 +67630,13 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeCurrentNavigatorTarget_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute current navigator target Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68070,33 +67654,34 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { CHIP_ERROR TestNavigateTargetRequestCommand_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; params.target = [NSNumber numberWithUnsignedChar:1U]; params.data = @"1"; [cluster navigateTargetWithParams:params - completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Navigate Target Request Command Error: %@", err); + completionHandler:^( + 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; } @@ -68215,7 +67800,6 @@ class TV_AudioOutputCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -68223,12 +67807,13 @@ class TV_AudioOutputCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeAudioOutputList_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Audio Output list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68255,12 +67840,13 @@ class TV_AudioOutputCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeCurrentAudioOutput_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentOutputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute current audio output Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68278,55 +67864,58 @@ class TV_AudioOutputCluster : public TestCommandBridge { CHIP_ERROR TestSelectOutputCommand_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; params.index = [NSNumber numberWithUnsignedChar:1U]; [cluster selectOutputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Select Output Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestRenameOutputCommand_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; params.index = [NSNumber numberWithUnsignedChar:1U]; params.name = @"HDMI Test"; [cluster renameOutputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Rename Output Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeAudioOutputList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Audio Output list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68465,7 +68054,6 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -68473,14 +68061,13 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationLauncherList_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCatalogListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Application Launcher list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68500,14 +68087,13 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationLauncherApp_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentAppWithCompletion:^( + [cluster readAttributeCurrentAppWithCompletionHandler:^( MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application launcher app Error: %@", err); @@ -68526,11 +68112,10 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { CHIP_ERROR TestLaunchAppCommand_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; @@ -68541,35 +68126,33 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { params.data = [[NSData alloc] initWithBytes:"data" length:4]; [cluster launchAppWithParams:params - completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch App Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestStopAppCommand_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; @@ -68579,34 +68162,33 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { [cluster stopAppWithParams:params - completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Stop App Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestHideAppCommand_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpoint:@(1) - queue:mCallbackQueue]; + MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; @@ -68616,23 +68198,23 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { [cluster hideAppWithParams:params - completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Hide App Command Error: %@", err); + completionHandler:^(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; } @@ -68723,7 +68305,6 @@ class TV_KeypadInputCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -68731,26 +68312,27 @@ class TV_KeypadInputCluster : public TestCommandBridge { CHIP_ERROR TestSendKeyCommand_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:3U]; [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Key Command Error: %@", err); + completionHandler:^(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; } @@ -68855,7 +68437,6 @@ class TV_AccountLoginCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -68863,61 +68444,64 @@ class TV_AccountLoginCluster : public TestCommandBridge { CHIP_ERROR TestGetSetupPinCommand_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; params.tempAccountIdentifier = @"asdf"; [cluster getSetupPINWithParams:params - completion:^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Setup PIN Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestLoginCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; params.tempAccountIdentifier = @"asdf"; params.setupPIN = @"tempPin123"; [cluster loginWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Login Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestLogoutCommand_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster logoutWithCompletion:^(NSError * _Nullable err) { + [cluster logoutWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Logout Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69014,7 +68598,6 @@ class TV_WakeOnLanCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -69022,12 +68605,11 @@ class TV_WakeOnLanCluster : public TestCommandBridge { CHIP_ERROR TestReadMacAddress_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMACAddressWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read mac address Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69178,7 +68760,6 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -69186,12 +68767,13 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeVendorName_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor name Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69209,12 +68791,13 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeVendorId_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor id Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69232,12 +68815,13 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationName_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeApplicationNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application name Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69255,12 +68839,13 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeProductId_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute product id Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69278,12 +68863,13 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationStatus_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application status Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69301,12 +68887,13 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationStatus_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationWithCompletion:^( + [cluster readAttributeApplicationWithCompletionHandler:^( MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application status Error: %@", err); @@ -69328,12 +68915,13 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationVersion_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeApplicationVersionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application version Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69351,12 +68939,13 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationAllowedVendorList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAllowedVendorListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application allowed vendor list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69600,7 +69189,6 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -69608,12 +69196,13 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributePlaybackState_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute playback state Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69631,12 +69220,13 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeStartTime_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute start time Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69655,12 +69245,13 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeDuration_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDurationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute duration Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69679,12 +69270,13 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributePosition_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletion:^( + [cluster readAttributeSampledPositionWithCompletionHandler:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute position Error: %@", err); @@ -69706,12 +69298,13 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributePlaybackSpeed_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute playback speed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69729,12 +69322,13 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeSeekRangeEnd_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSeekRangeEndWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute seek range end Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69753,12 +69347,13 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeSeekRangeStart_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSeekRangeStartWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute seek range start Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69777,13 +69372,45 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackPlayCommand_8() { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + 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"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Play Command Error: %@", err); + [cluster pauseWithCompletionHandler:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Pause Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69803,15 +69430,17 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMediaPlaybackPauseCommand_9() + CHIP_ERROR TestMediaPlaybackStopCommand_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Pause Command Error: %@", err); + [cluster stopPlaybackWithCompletionHandler:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Stop Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69831,16 +69460,17 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMediaPlaybackStopCommand_10() + CHIP_ERROR TestMediaPlaybackStartOverCommand_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopPlaybackWithCompletion:^( + [cluster startOverWithCompletionHandler:^( MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Stop Command Error: %@", err); + NSLog(@"Media Playback Start Over Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69860,45 +69490,47 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMediaPlaybackStartOverCommand_11() + CHIP_ERROR TestMediaPlaybackPreviousCommand_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - startOverWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Start Over Command Error: %@", err); + [cluster previousWithCompletionHandler:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Previous 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 TestMediaPlaybackPreviousCommand_12() + CHIP_ERROR TestMediaPlaybackNextCommand_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - previousWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Previous Command Error: %@", err); + nextWithCompletionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Next Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69918,15 +69550,17 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMediaPlaybackNextCommand_13() + CHIP_ERROR TestMediaPlaybackRewindCommand_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster nextWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Next Command Error: %@", err); + [cluster rewindWithCompletionHandler:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Rewind Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69946,15 +69580,17 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMediaPlaybackRewindCommand_14() + CHIP_ERROR TestMediaPlaybackFastForwardCommand_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster rewindWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Rewind Command Error: %@", err); + [cluster fastForwardWithCompletionHandler:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Fast Forward Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69974,75 +69610,48 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMediaPlaybackFastForwardCommand_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(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"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:500ULL]; [cluster skipForwardWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Skip Forward Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributePositionAfterSkipForward_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletion:^( + [cluster readAttributeSampledPositionWithCompletionHandler:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute position after skip forward Error: %@", err); @@ -70064,44 +69673,46 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackSkipBackwardCommand_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:100ULL]; [cluster skipBackwardWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Skip Backward Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributePositionAfterSkipBackward_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletion:^( + [cluster readAttributeSampledPositionWithCompletionHandler:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute position after skip backward Error: %@", err); @@ -70123,43 +69734,45 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackSeekCommand_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; params.position = [NSNumber numberWithUnsignedLongLong:1000ULL]; [cluster seekWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Seek Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributePositionAfterSeek_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpoint:@(3) queue:mCallbackQueue]; + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletion:^( + [cluster readAttributeSampledPositionWithCompletionHandler:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute position after seek Error: %@", err); @@ -70300,7 +69913,6 @@ class TV_ChannelCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -70308,12 +69920,11 @@ class TV_ChannelCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeChannelList_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Channel list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -70360,42 +69971,41 @@ class TV_ChannelCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeChannelLineup_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute channel lineup Error: %@", err); + [cluster + readAttributeLineupWithCompletionHandler:^(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; } CHIP_ERROR TestReadAttributeCurrentChannel_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletion:^( + [cluster readAttributeCurrentChannelWithCompletionHandler:^( MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute current channel Error: %@", err); @@ -70420,75 +70030,72 @@ class TV_ChannelCluster : public TestCommandBridge { CHIP_ERROR TestChangeChannelCommand_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRChannelClusterChangeChannelParams alloc] init]; params.match = @"PBS"; [cluster changeChannelWithParams:params - completion:^(MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Change Channel Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestChangeChannelByNumberCommand_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; params.majorNumber = [NSNumber numberWithUnsignedShort:6U]; params.minorNumber = [NSNumber numberWithUnsignedShort:0U]; [cluster changeChannelByNumberWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Change Channel By Number Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSkipChannelCommand_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; params.count = [NSNumber numberWithUnsignedShort:1U]; [cluster skipChannelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Skip Channel Command Error: %@", err); + completionHandler:^(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; } @@ -70579,7 +70186,6 @@ class TV_LowPowerCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -70587,12 +70193,11 @@ class TV_LowPowerCluster : public TestCommandBridge { CHIP_ERROR TestSleepInputStatusCommand_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster sleepWithCompletion:^(NSError * _Nullable err) { + [cluster sleepWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Sleep Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -70710,7 +70315,6 @@ class TV_ContentLauncherCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -70718,12 +70322,13 @@ class TV_ContentLauncherCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeAcceptHeaderList_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptHeaderWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute accept header list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -70743,32 +70348,35 @@ class TV_ContentLauncherCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeSupportedStreamingProtocols_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute supported streaming protocols Error: %@", err); + [cluster + readAttributeSupportedStreamingProtocolsWithCompletionHandler:^(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; } CHIP_ERROR TestLaunchContentCommand_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; @@ -70794,32 +70402,33 @@ class TV_ContentLauncherCluster : public TestCommandBridge { params.data = @"exampleData"; [cluster launchContentWithParams:params - completion:^(MTRContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch Content Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestLaunchUrlCommand_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; @@ -70993,23 +70602,23 @@ class TV_ContentLauncherCluster : public TestCommandBridge { = [NSNumber numberWithUnsignedChar:0U]; [cluster launchURLWithParams:params - completion:^(MTRContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch URL Command Error: %@", err); + completionHandler:^(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; } @@ -71142,7 +70751,6 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -71150,12 +70758,13 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeMediaInputList_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute media input list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -71183,12 +70792,13 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestReadCurrentMediaInput_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentInputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read current media input Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -71206,33 +70816,35 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestSelectInputCommand_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; params.index = [NSNumber numberWithUnsignedChar:1U]; [cluster selectInputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Select Input Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestHideInputStatusCommand_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster hideInputStatusWithCompletion:^(NSError * _Nullable err) { + [cluster hideInputStatusWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Hide Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -71245,12 +70857,13 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestShowInputStatusCommand_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster showInputStatusWithCompletion:^(NSError * _Nullable err) { + [cluster showInputStatusWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Show Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -71263,34 +70876,36 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestRenameInputCommand_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; params.index = [NSNumber numberWithUnsignedChar:1U]; params.name = @"HDMI Test"; [cluster renameInputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Rename Input Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeMediaInputList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute media input list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -71437,7 +71052,6 @@ class TestCASERecovery : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -71445,12 +71059,11 @@ class TestCASERecovery : public TestCommandBridge { CHIP_ERROR TestReadAnAttribute_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDataModelRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read an attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -71468,14 +71081,12 @@ class TestCASERecovery : public TestCommandBridge { CHIP_ERROR TestRebootTheServer_2() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestReGetOurSessionButWithoutExpiringSesssions_3() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; value.expireExistingSession.Emplace(); @@ -71485,12 +71096,11 @@ class TestCASERecovery : public TestCommandBridge { CHIP_ERROR TestReadAnAttributeAgain_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDataModelRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read an attribute again Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -71504,7 +71114,6 @@ class TestCASERecovery : public TestCommandBridge { CHIP_ERROR TestReGetOurSessionButWithoutExpiringSesssions_5() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; value.expireExistingSession.Emplace(); @@ -71514,12 +71123,11 @@ class TestCASERecovery : public TestCommandBridge { CHIP_ERROR TestReadAnAttributeAThirdTime_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDataModelRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read an attribute a third time Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75143,7 +74751,6 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -75151,12 +74758,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommand_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster testWithCompletion:^(NSError * _Nullable err) { + [cluster testWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Test Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75169,12 +74777,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestNotHandledCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster testNotHandledWithCompletion:^(NSError * _Nullable err) { + [cluster testNotHandledWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Test Not Handled Command Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -75188,12 +74797,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestSpecificCommand_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster testSpecificWithCompletion:^( + [cluster testSpecificWithCompletionHandler:^( MTRTestClusterClusterTestSpecificResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Send Test Specific Command Error: %@", err); @@ -75212,66 +74822,69 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestAddArgumentsCommand_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; params.arg1 = [NSNumber numberWithUnsignedChar:3U]; params.arg2 = [NSNumber numberWithUnsignedChar:17U]; [cluster testAddArgumentsWithParams:params - completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestSendFailingTestAddArgumentsCommand_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; params.arg1 = [NSNumber numberWithUnsignedChar:250U]; params.arg2 = [NSNumber numberWithUnsignedChar:6U]; - [cluster testAddArgumentsWithParams:params - completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send failing Test Add Arguments Command Error: %@", err); + [cluster + testAddArgumentsWithParams:params + completionHandler:^( + 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; } CHIP_ERROR TestReadAttributeBooleanDefaultValue_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BOOLEAN Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75289,33 +74902,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBooleanTrue_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id booleanArgument; booleanArgument = [NSNumber numberWithBool:1]; [cluster writeAttributeBooleanWithValue:booleanArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BOOLEAN True Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBooleanTrue_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BOOLEAN True Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75333,33 +74948,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBooleanFalse_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id booleanArgument; booleanArgument = [NSNumber numberWithBool:0]; [cluster writeAttributeBooleanWithValue:booleanArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BOOLEAN False Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBooleanFalse_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BOOLEAN False Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75377,12 +74994,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap8DefaultValue_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75400,33 +75018,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap8MaxValue_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap8Argument; bitmap8Argument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP8 Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap8MaxValue_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP8 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75444,33 +75064,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap8MinValue_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap8Argument; bitmap8Argument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP8 Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap8MinValue_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP8 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75488,12 +75110,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap16DefaultValue_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75511,33 +75134,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap16MaxValue_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap16Argument; bitmap16Argument = [NSNumber numberWithUnsignedShort:65535U]; [cluster writeAttributeBitmap16WithValue:bitmap16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP16 Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap16MaxValue_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP16 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75555,33 +75180,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap16MinValue_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap16Argument; bitmap16Argument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeBitmap16WithValue:bitmap16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP16 Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap16MinValue_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP16 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75599,12 +75226,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap32DefaultValue_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75622,33 +75250,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap32MaxValue_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap32Argument; bitmap32Argument = [NSNumber numberWithUnsignedInt:4294967295UL]; [cluster writeAttributeBitmap32WithValue:bitmap32Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP32 Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap32MaxValue_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75666,33 +75296,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap32MinValue_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap32Argument; bitmap32Argument = [NSNumber numberWithUnsignedInt:0UL]; [cluster writeAttributeBitmap32WithValue:bitmap32Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP32 Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap32MinValue_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75710,12 +75342,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75733,33 +75366,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap64MaxValue_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap64Argument; bitmap64Argument = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; [cluster writeAttributeBitmap64WithValue:bitmap64Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP64 Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap64MaxValue_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP64 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75777,33 +75412,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap64MinValue_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap64Argument; bitmap64Argument = [NSNumber numberWithUnsignedLongLong:0ULL]; [cluster writeAttributeBitmap64WithValue:bitmap64Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP64 Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap64MinValue_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP64 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75821,12 +75458,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8uDefaultValue_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75844,33 +75482,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8uMaxValue_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int8uArgument; int8uArgument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeInt8uWithValue:int8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8U Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt8uMaxValue_33() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75888,33 +75528,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8uMinValue_34() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int8uArgument; int8uArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeInt8uWithValue:int8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8U Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt8uMinValue_35() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75932,12 +75574,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16uDefaultValue_36() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75955,33 +75598,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16uMaxValue_37() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int16uArgument; int16uArgument = [NSNumber numberWithUnsignedShort:65535U]; [cluster writeAttributeInt16uWithValue:int16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16U Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt16uMaxValue_38() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75999,33 +75644,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16uMinValue_39() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int16uArgument; int16uArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeInt16uWithValue:int16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16U Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt16uMinValue_40() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76043,12 +75690,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uDefaultValue_41() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76066,33 +75714,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32uMaxValue_42() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int32uArgument; int32uArgument = [NSNumber numberWithUnsignedInt:4294967295UL]; [cluster writeAttributeInt32uWithValue:int32uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt32uMaxValue_43() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76110,33 +75760,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32uMinValue_44() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int32uArgument; int32uArgument = [NSNumber numberWithUnsignedInt:0UL]; [cluster writeAttributeInt32uWithValue:int32uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt32uMinValue_45() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76154,12 +75806,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64uDefaultValue_46() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76177,33 +75830,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64uMaxValue_47() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int64uArgument; int64uArgument = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; [cluster writeAttributeInt64uWithValue:int64uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64U Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt64uMaxValue_48() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76221,33 +75876,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64uMinValue_49() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int64uArgument; int64uArgument = [NSNumber numberWithUnsignedLongLong:0ULL]; [cluster writeAttributeInt64uWithValue:int64uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64U Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt64uMinValue_50() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76265,12 +75922,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8sDefaultValue_51() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76288,33 +75946,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8sMaxValue_52() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int8sArgument; int8sArgument = [NSNumber numberWithChar:127]; [cluster writeAttributeInt8sWithValue:int8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8S Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt8sMaxValue_53() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76332,33 +75992,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8sMinValue_54() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int8sArgument; int8sArgument = [NSNumber numberWithChar:-128]; [cluster writeAttributeInt8sWithValue:int8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8S Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt8sMinValue_55() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76376,33 +76038,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8sDefaultValue_56() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int8sArgument; int8sArgument = [NSNumber numberWithChar:0]; [cluster writeAttributeInt8sWithValue:int8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8S Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt8sDefaultValue_57() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76420,12 +76084,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16sDefaultValue_58() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76443,33 +76108,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16sMaxValue_59() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int16sArgument; int16sArgument = [NSNumber numberWithShort:32767]; [cluster writeAttributeInt16sWithValue:int16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16S Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt16sMaxValue_60() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76487,33 +76154,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16sMinValue_61() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int16sArgument; int16sArgument = [NSNumber numberWithShort:-32768]; [cluster writeAttributeInt16sWithValue:int16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16S Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt16sMinValue_62() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76531,33 +76200,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16sDefaultValue_63() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int16sArgument; int16sArgument = [NSNumber numberWithShort:0]; [cluster writeAttributeInt16sWithValue:int16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16S Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt16sDefaultValue_64() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76575,12 +76246,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32sDefaultValue_65() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76598,33 +76270,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32sMaxValue_66() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int32sArgument; int32sArgument = [NSNumber numberWithInt:2147483647L]; [cluster writeAttributeInt32sWithValue:int32sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32S Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt32sMaxValue_67() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76642,33 +76316,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32sMinValue_68() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int32sArgument; int32sArgument = [NSNumber numberWithInt:-2147483648L]; [cluster writeAttributeInt32sWithValue:int32sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32S Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt32sMinValue_69() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76686,33 +76362,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32sDefaultValue_70() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int32sArgument; int32sArgument = [NSNumber numberWithInt:0L]; [cluster writeAttributeInt32sWithValue:int32sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32S Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt32sDefaultValue_71() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76730,12 +76408,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64sDefaultValue_72() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76753,33 +76432,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64sMaxValue_73() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int64sArgument; int64sArgument = [NSNumber numberWithLongLong:9223372036854775807LL]; [cluster writeAttributeInt64sWithValue:int64sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64S Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt64sMaxValue_74() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76797,33 +76478,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64sMinValue_75() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int64sArgument; int64sArgument = [NSNumber numberWithLongLong:-9223372036854775807LL]; [cluster writeAttributeInt64sWithValue:int64sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64S Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt64sMinValue_76() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76841,33 +76524,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64sDefaultValue_77() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int64sArgument; int64sArgument = [NSNumber numberWithLongLong:0LL]; [cluster writeAttributeInt64sWithValue:int64sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64S Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt64sDefaultValue_78() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76885,12 +76570,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeSingleDefaultValue_79() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute SINGLE Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76908,33 +76594,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeSingleMediumValue_80() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id floatSingleArgument; floatSingleArgument = [NSNumber numberWithFloat:0.1f]; [cluster writeAttributeFloatSingleWithValue:floatSingleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute SINGLE medium Value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute SINGLE medium Value Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeSingleMediumValue_81() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute SINGLE medium Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76952,33 +76640,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeSingleLargeValue_82() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id floatSingleArgument; floatSingleArgument = [NSNumber numberWithFloat:17000000000.0f]; [cluster writeAttributeFloatSingleWithValue:floatSingleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute SINGLE large Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeSingleLargeValue_83() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute SINGLE large Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76996,33 +76686,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeSingleSmallValue_84() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id floatSingleArgument; floatSingleArgument = [NSNumber numberWithFloat:1.7e-10f]; [cluster writeAttributeFloatSingleWithValue:floatSingleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute SINGLE small Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeSingleSmallValue_85() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute SINGLE small Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77040,33 +76732,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeSingleDefaultValue_86() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id floatSingleArgument; floatSingleArgument = [NSNumber numberWithFloat:0.0f]; [cluster writeAttributeFloatSingleWithValue:floatSingleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute SINGLE Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeSingleDefaultValue_87() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute SINGLE Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77084,12 +76778,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeDoubleDefaultValue_88() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute DOUBLE Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77107,33 +76802,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeDoubleMediumValue_89() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id floatDoubleArgument; floatDoubleArgument = [NSNumber numberWithDouble:0.1234567890123]; [cluster writeAttributeFloatDoubleWithValue:floatDoubleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute DOUBLE medium Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeDoubleMediumValue_90() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute DOUBLE medium Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77151,33 +76848,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeDoubleLargeValue_91() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id floatDoubleArgument; floatDoubleArgument = [NSNumber numberWithDouble:1.7e+200]; [cluster writeAttributeFloatDoubleWithValue:floatDoubleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute DOUBLE large Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeDoubleLargeValue_92() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute DOUBLE large Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77195,33 +76894,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeDoubleSmallValue_93() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id floatDoubleArgument; floatDoubleArgument = [NSNumber numberWithDouble:1.7e-200]; [cluster writeAttributeFloatDoubleWithValue:floatDoubleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute DOUBLE small Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeDoubleSmallValue_94() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute DOUBLE small Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77239,33 +76940,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeDoubleDefaultValue_95() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id floatDoubleArgument; floatDoubleArgument = [NSNumber numberWithDouble:0]; [cluster writeAttributeFloatDoubleWithValue:floatDoubleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute DOUBLE Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeDoubleDefaultValue_96() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute DOUBLE Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77283,12 +76986,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum8DefaultValue_97() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77306,33 +77010,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum8MaxValue_98() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id enum8Argument; enum8Argument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeEnum8WithValue:enum8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM8 Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEnum8MaxValue_99() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM8 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77350,33 +77056,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum8MinValue_100() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id enum8Argument; enum8Argument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeEnum8WithValue:enum8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM8 Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEnum8MinValue_101() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM8 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77394,12 +77102,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum16DefaultValue_102() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77417,33 +77126,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum16MaxValue_103() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id enum16Argument; enum16Argument = [NSNumber numberWithUnsignedShort:65535U]; [cluster writeAttributeEnum16WithValue:enum16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM16 Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEnum16MaxValue_104() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM16 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77461,33 +77172,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum16MinValue_105() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id enum16Argument; enum16Argument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeEnum16WithValue:enum16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM16 Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEnum16MinValue_106() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM16 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77505,12 +77218,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringDefaultValue_107() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute OCTET_STRING Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77528,33 +77242,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetStringWithEmbeddedNull_108() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"Tes\000ti\000ng" length:9]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute OCTET_STRING with embedded null Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeOctetStringWithEmbeddedNull_109() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute OCTET_STRING with embedded null Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77573,33 +77289,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetStringWithHexFormat_110() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"\x00\x01\x02\x03\x04\x05" length:6]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute OCTET_STRING with hex: format Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeOctetStringWithHexFormat_111() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute OCTET_STRING with hex: format Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77618,33 +77336,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetStringWithWeirdChars_112() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"\015\012\377\042\240" length:5]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute OCTET_STRING with weird chars Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeOctetStringWithWeirdChars_113() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute OCTET_STRING with weird chars Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77663,33 +77383,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetString_114() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"TestValue" length:9]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute OCTET_STRING Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeOctetString_115() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77708,37 +77430,38 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetString_116() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"TestValueLongerThan10" length:21]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeOctetString_117() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77757,33 +77480,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetString_118() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"" length:0]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute OCTET_STRING Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeLongOctetStringDefaultValue_119() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLongOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLongOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LONG_OCTET_STRING Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77801,9 +77526,10 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeLongOctetString_120() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id longOctetStringArgument; @@ -77813,25 +77539,26 @@ class TestCluster : public TestCommandBridge { "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" length:300]; [cluster writeAttributeLongOctetStringWithValue:longOctetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute LONG_OCTET_STRING Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeLongOctetString_121() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLongOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLongOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LONG_OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77855,33 +77582,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeLongOctetString_122() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id longOctetStringArgument; longOctetStringArgument = [[NSData alloc] initWithBytes:"" length:0]; [cluster writeAttributeLongOctetStringWithValue:longOctetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute LONG_OCTET_STRING Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeCharStringDefaultValue_123() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77899,33 +77628,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharString_124() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = @"☉T☉"; [cluster writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeCharString_125() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77943,37 +77674,38 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValueTooLong_126() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = @"☉TestValueLongerThan10☉"; - [cluster - writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING - Value too long Error: %@", err); + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeCharString_127() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77991,33 +77723,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringEmpty_128() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = @""; [cluster writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING - Empty Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeLongCharStringDefaultValue_129() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLongCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLongCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LONG_CHAR_STRING Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78035,9 +77769,10 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeLongCharString_130() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id longCharStringArgument; @@ -78046,25 +77781,26 @@ class TestCluster : public TestCommandBridge { @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉"; [cluster writeAttributeLongCharStringWithValue:longCharStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute LONG_CHAR_STRING Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeLongCharString_131() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLongCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLongCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LONG_CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78085,33 +77821,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeLongCharString_132() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id longCharStringArgument; longCharStringArgument = @""; [cluster writeAttributeLongCharStringWithValue:longCharStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute LONG_CHAR_STRING Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeListLongOctetStringForChunkedRead_133() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListLongOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListLongOctetStringWithCompletionHandler:^(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)); @@ -78165,9 +77903,10 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeListLongOctetStringForChunkedWrite_134() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id listLongOctetStringArgument; @@ -78215,27 +77954,27 @@ class TestCluster : public TestCommandBridge { length:512]; listLongOctetStringArgument = temp_0; } - [cluster - writeAttributeListLongOctetStringWithValue:listLongOctetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute LIST_LONG_OCTET_STRING (for chunked write) Error: %@", err); + [cluster writeAttributeListLongOctetStringWithValue:listLongOctetStringArgument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeListLongOctetStringForChunkedRead_135() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListLongOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListLongOctetStringWithCompletionHandler:^(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)); @@ -78298,12 +78037,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochUsDefaultValue_136() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_US Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78321,33 +78061,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochUsMaxValue_137() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id epochUsArgument; epochUsArgument = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; [cluster writeAttributeEpochUsWithValue:epochUsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_US Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEpochUsMaxValue_138() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_US Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78365,33 +78107,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochUsMinValue_139() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id epochUsArgument; epochUsArgument = [NSNumber numberWithUnsignedLongLong:0ULL]; [cluster writeAttributeEpochUsWithValue:epochUsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_US Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEpochUsMinValue_140() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_US Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78409,12 +78153,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochSDefaultValue_141() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78432,33 +78177,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochSMaxValue_142() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id epochSArgument; epochSArgument = [NSNumber numberWithUnsignedInt:4294967295UL]; [cluster writeAttributeEpochSWithValue:epochSArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_S Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEpochSMaxValue_143() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_S Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78476,33 +78223,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochSMinValue_144() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id epochSArgument; epochSArgument = [NSNumber numberWithUnsignedInt:0UL]; [cluster writeAttributeEpochSWithValue:epochSArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_S Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEpochSMinValue_145() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78520,12 +78269,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeUnsupported_146() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUnsupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeUnsupportedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute UNSUPPORTED Error: %@", err); if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { @@ -78548,38 +78298,40 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteattributeUnsupported_147() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id unsupportedArgument; unsupportedArgument = [NSNumber numberWithBool:0]; [cluster writeAttributeUnsupportedWithValue:unsupportedArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writeattribute UNSUPPORTED Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendTestCommandToUnsupportedEndpoint_148() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(200) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:200 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster testWithCompletion:^(NSError * _Nullable err) { + [cluster testWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Test Command to unsupported endpoint Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -78593,12 +78345,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandToUnsupportedCluster_149() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster testWithCompletion:^(NSError * _Nullable err) { + [cluster testWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Test Command to unsupported cluster Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -78612,12 +78365,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeVendorIdDefaultValue_150() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor_id Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78635,33 +78389,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeVendorId_151() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id vendorIdArgument; vendorIdArgument = [NSNumber numberWithUnsignedShort:17U]; [cluster writeAttributeVendorIdWithValue:vendorIdArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute vendor_id Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeVendorId_152() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor_id Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78679,30 +78435,32 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestRestoreAttributeVendorId_153() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id vendorIdArgument; vendorIdArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeVendorIdWithValue:vendorIdArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Restore attribute vendor_id Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendACommandWithAVendorIdAndEnum_154() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestEnumsRequestParams alloc] init]; @@ -78710,32 +78468,33 @@ class TestCluster : public TestCommandBridge { params.arg2 = [NSNumber numberWithUnsignedChar:1U]; [cluster testEnumsRequestWithParams:params - completion:^(MTRTestClusterClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send a command with a vendor_id and enum Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendACommandWithAVendorIdAndInvalidEnum_155() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestEnumsRequestParams alloc] init]; @@ -78743,32 +78502,33 @@ class TestCluster : public TestCommandBridge { params.arg2 = [NSNumber numberWithUnsignedChar:101U]; [cluster testEnumsRequestWithParams:params - completion:^(MTRTestClusterClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send a command with a vendor_id and invalid enum Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_156() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestStructArgumentRequestParams alloc] init]; @@ -78783,28 +78543,29 @@ class TestCluster : public TestCommandBridge { ((MTRTestClusterClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0]; [cluster testStructArgumentRequestWithParams:params - completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command With Struct Argument and arg1.b is true Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_157() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestStructArgumentRequestParams alloc] init]; @@ -78819,28 +78580,29 @@ class TestCluster : public TestCommandBridge { ((MTRTestClusterClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0]; [cluster testStructArgumentRequestWithParams:params - completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command With Struct Argument and arg1.b is false Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestSendTestCommandWithNestedStructArgumentAndArg1cbIsTrue_158() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestNestedStructArgumentRequestParams alloc] init]; @@ -78866,30 +78628,29 @@ class TestCluster : public TestCommandBridge { [cluster testNestedStructArgumentRequestWithParams:params - completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog( - @"Send Test Command With Nested Struct Argument and arg1.c.b is true Error: %@", - err); + completionHandler:^( + 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; } CHIP_ERROR TestSendTestCommandWithNestedStructArgumentArg1cbIsFalse_159() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestNestedStructArgumentRequestParams alloc] init]; @@ -78915,29 +78676,29 @@ class TestCluster : public TestCommandBridge { [cluster testNestedStructArgumentRequestWithParams:params - completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command With Nested Struct Argument arg1.c.b is false Error: %@", - err); + completionHandler:^( + 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; } CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndAllFieldsBOfArg1dAreTrue_160() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init]; @@ -79007,30 +78768,31 @@ class TestCluster : public TestCommandBridge { } [cluster testNestedStructListArgumentRequestWithParams:params - 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); + 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); - 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; } CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfArg1dAreFalse_161() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init]; @@ -79100,30 +78862,31 @@ class TestCluster : public TestCommandBridge { } [cluster testNestedStructListArgumentRequestWithParams:params - 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); + 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); - 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; } CHIP_ERROR TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_162() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterSimpleStructEchoRequestParams alloc] init]; @@ -79139,44 +78902,38 @@ class TestCluster : public TestCommandBridge { [cluster simpleStructEchoRequestWithParams:params - completion:^(MTRTestClusterClusterSimpleStructResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command With Struct Argument and see what we get back Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_163() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestListInt8UArgumentRequestParams alloc] init]; @@ -79195,29 +78952,29 @@ class TestCluster : public TestCommandBridge { } [cluster testListInt8UArgumentRequestWithParams:params - 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); + 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); - 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; } CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_164() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestListInt8UArgumentRequestParams alloc] init]; @@ -79235,31 +78992,30 @@ class TestCluster : public TestCommandBridge { temp_0[9] = [NSNumber numberWithUnsignedChar:0U]; params.arg1 = temp_0; } - [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); + [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); - 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; } CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_165() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestListInt8UReverseRequestParams alloc] init]; @@ -79276,39 +79032,39 @@ class TestCluster : public TestCommandBridge { temp_0[8] = [NSNumber numberWithUnsignedChar:9U]; params.arg1 = temp_0; } - [cluster - testListInt8UReverseRequestWithParams:params - completion:^(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command With List of INT8U and get it reversed Error: %@", err); + [cluster testListInt8UReverseRequestWithParams:params + completionHandler:^(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; } CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_166() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestListInt8UReverseRequestParams alloc] init]; @@ -79318,29 +79074,29 @@ class TestCluster : public TestCommandBridge { } [cluster testListInt8UReverseRequestWithParams:params - completion:^(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command With empty List of INT8U and get an empty list back Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_167() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestListStructArgumentRequestParams alloc] init]; @@ -79369,30 +79125,31 @@ class TestCluster : public TestCommandBridge { params.arg1 = temp_0; } [cluster testListStructArgumentRequestWithParams:params - 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); + 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); - 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; } CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_168() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestListStructArgumentRequestParams alloc] init]; @@ -79421,30 +79178,31 @@ class TestCluster : public TestCommandBridge { params.arg1 = temp_0; } [cluster testListStructArgumentRequestWithParams:params - 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); + 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); - 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; } CHIP_ERROR TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_169() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init]; @@ -79520,30 +79278,31 @@ class TestCluster : public TestCommandBridge { params.arg1 = temp_0; } [cluster testListNestedStructListArgumentRequestWithParams:params - 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); + 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); - 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; } CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_170() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init]; @@ -79619,30 +79378,31 @@ class TestCluster : public TestCommandBridge { params.arg1 = temp_0; } [cluster testListNestedStructListArgumentRequestWithParams:params - 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); + 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); - 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; } CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_171() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id listInt8uArgument; @@ -79654,27 +79414,27 @@ class TestCluster : public TestCommandBridge { temp_0[3] = [NSNumber numberWithUnsignedChar:4U]; listInt8uArgument = temp_0; } - [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); + [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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeListWithListOfInt8u_172() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LIST With List of INT8U Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -79696,9 +79456,10 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeListWithListOfOctetString_173() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id listOctetStringArgument; @@ -79711,25 +79472,26 @@ class TestCluster : public TestCommandBridge { listOctetStringArgument = temp_0; } [cluster writeAttributeListOctetStringWithValue:listOctetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute LIST With List of OCTET_STRING Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeListWithListOfOctetString_174() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListOctetStringWithCompletionHandler:^(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)); @@ -79751,9 +79513,10 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_175() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id listStructOctetStringArgument; @@ -79777,28 +79540,27 @@ class TestCluster : public TestCommandBridge { listStructOctetStringArgument = temp_0; } - [cluster - writeAttributeListStructOctetStringWithValue:listStructOctetStringArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Write attribute LIST With List of LIST_STRUCT_OCTET_STRING Error: %@", err); + [cluster writeAttributeListStructOctetStringWithValue:listStructOctetStringArgument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_176() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListStructOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListStructOctetStringWithCompletionHandler:^(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)); @@ -79828,81 +79590,85 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithOptionalArgSet_177() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init]; params.arg1 = [NSNumber numberWithUnsignedChar:5U]; [cluster testNullableOptionalRequestWithParams:params - completion:^(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command with optional arg set. Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_178() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init]; [cluster testNullableOptionalRequestWithParams:params - completion:^(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command without its optional arg. Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionals_179() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListNullablesAndOptionalsStructWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListNullablesAndOptionalsStructWithCompletionHandler:^( + 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)); @@ -79928,9 +79694,10 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteListOfStructsContainingNullablesAndOptionals_180() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id listNullablesAndOptionalsStructArgument; @@ -79949,28 +79716,30 @@ class TestCluster : public TestCommandBridge { listNullablesAndOptionalsStructArgument = temp_0; } - [cluster writeAttributeListNullablesAndOptionalsStructWithValue:listNullablesAndOptionalsStructArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write list of structs containing nullables and optionals " - @"Error: %@", - err); + [cluster + writeAttributeListNullablesAndOptionalsStructWithValue:listNullablesAndOptionalsStructArgument + completionHandler:^(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; } CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionalsAfterWriting_181() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListNullablesAndOptionalsStructWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListNullablesAndOptionalsStructWithCompletionHandler:^( + 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)); @@ -80003,21 +79772,22 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBooleanNull_182() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBooleanArgument; nullableBooleanArgument = nil; [cluster writeAttributeNullableBooleanWithValue:nullableBooleanArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BOOLEAN null Error: %@", err); + completionHandler:^(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; } @@ -80025,12 +79795,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBooleanNull_183() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BOOLEAN null Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80051,33 +79822,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBooleanTrue_184() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBooleanArgument; nullableBooleanArgument = [NSNumber numberWithBool:true]; [cluster writeAttributeNullableBooleanWithValue:nullableBooleanArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BOOLEAN True Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableBooleanTrue_185() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BOOLEAN True Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80096,12 +79869,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBooleanNotNull_186() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BOOLEAN not null Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80118,33 +79892,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_187() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap8Argument; nullableBitmap8Argument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableBitmap8WithValue:nullableBitmap8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP8 Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_188() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP8 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80163,25 +79939,26 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_189() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap8Argument; nullableBitmap8Argument = [NSNumber numberWithUnsignedChar:255U]; - [cluster writeAttributeNullableBitmap8WithValue:nullableBitmap8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP8 Invalid Value Error: %@", err); + [cluster + writeAttributeNullableBitmap8WithValue:nullableBitmap8Argument + completionHandler:^(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; } @@ -80189,12 +79966,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_190() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP8 unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80216,33 +79994,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_191() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap8Argument; nullableBitmap8Argument = nil; [cluster writeAttributeNullableBitmap8WithValue:nullableBitmap8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP8 null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_192() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP8 null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80260,12 +80040,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap8Not254Value_193() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP8 not 254 Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80282,33 +80063,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_194() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap16Argument; nullableBitmap16Argument = [NSNumber numberWithUnsignedShort:65534U]; [cluster writeAttributeNullableBitmap16WithValue:nullableBitmap16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP16 Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_195() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP16 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80327,37 +80110,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_196() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap16Argument; nullableBitmap16Argument = [NSNumber numberWithUnsignedShort:65535U]; - [cluster writeAttributeNullableBitmap16WithValue:nullableBitmap16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP16 Invalid Value Error: %@", err); + [cluster + writeAttributeNullableBitmap16WithValue:nullableBitmap16Argument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_197() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP16 unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80376,33 +80161,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_198() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap16Argument; nullableBitmap16Argument = nil; [cluster writeAttributeNullableBitmap16WithValue:nullableBitmap16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP16 null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_199() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP16 null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80420,33 +80207,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_200() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap32Argument; nullableBitmap32Argument = [NSNumber numberWithUnsignedInt:4294967294UL]; [cluster writeAttributeNullableBitmap32WithValue:nullableBitmap32Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP32 Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_201() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP32 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80465,37 +80254,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_202() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap32Argument; nullableBitmap32Argument = [NSNumber numberWithUnsignedInt:4294967295UL]; - [cluster writeAttributeNullableBitmap32WithValue:nullableBitmap32Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP32 Invalid Value Error: %@", err); + [cluster + writeAttributeNullableBitmap32WithValue:nullableBitmap32Argument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_203() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP32 unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80514,33 +80305,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_204() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap32Argument; nullableBitmap32Argument = nil; [cluster writeAttributeNullableBitmap32WithValue:nullableBitmap32Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP32 null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_205() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP32 null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80558,33 +80351,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_206() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap64Argument; nullableBitmap64Argument = [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; [cluster writeAttributeNullableBitmap64WithValue:nullableBitmap64Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP64 Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_207() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP64 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80603,37 +80398,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_208() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap64Argument; nullableBitmap64Argument = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; - [cluster writeAttributeNullableBitmap64WithValue:nullableBitmap64Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP64 Invalid Value Error: %@", err); + [cluster + writeAttributeNullableBitmap64WithValue:nullableBitmap64Argument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_209() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP64 unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80652,33 +80449,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_210() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap64Argument; nullableBitmap64Argument = nil; [cluster writeAttributeNullableBitmap64WithValue:nullableBitmap64Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP64 null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_211() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP64 null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80696,33 +80495,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8uMinValue_212() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8uArgument; nullableInt8uArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8U Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt8uMinValue_213() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80741,33 +80542,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_214() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8uArgument; nullableInt8uArgument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8U Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_215() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80786,37 +80589,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_216() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8uArgument; nullableInt8uArgument = [NSNumber numberWithUnsignedChar:255U]; - [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8U Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt8uWithValue:nullableInt8uArgument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_217() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80835,12 +80640,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValueWithConstraint_218() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletionHandler:^(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)); @@ -80857,33 +80663,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_219() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8uArgument; nullableInt8uArgument = nil; [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8U null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt8uNullValue_220() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80901,12 +80709,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uNullValueRange_221() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80925,12 +80734,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uNullValueNot_222() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80947,33 +80757,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8uValue_223() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8uArgument; nullableInt8uArgument = [NSNumber numberWithUnsignedChar:128U]; [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8U Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt8uValueInRange_224() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80992,12 +80804,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uNotValueOk_225() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81014,33 +80827,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16uMinValue_226() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt16uArgument; nullableInt16uArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeNullableInt16uWithValue:nullableInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16U Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt16uMinValue_227() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81059,33 +80874,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_228() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt16uArgument; nullableInt16uArgument = [NSNumber numberWithUnsignedShort:65534U]; [cluster writeAttributeNullableInt16uWithValue:nullableInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16U Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_229() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81104,37 +80921,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_230() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt16uArgument; nullableInt16uArgument = [NSNumber numberWithUnsignedShort:65535U]; - [cluster writeAttributeNullableInt16uWithValue:nullableInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16U Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt16uWithValue:nullableInt16uArgument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_231() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81153,33 +80972,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_232() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt16uArgument; nullableInt16uArgument = nil; [cluster writeAttributeNullableInt16uWithValue:nullableInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16U null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt16uNullValue_233() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81197,12 +81018,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16uNullValueRange_234() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81221,12 +81043,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16uNullValueNot_235() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81243,33 +81066,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16uValue_236() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt16uArgument; nullableInt16uArgument = [NSNumber numberWithUnsignedShort:32000U]; [cluster writeAttributeNullableInt16uWithValue:nullableInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16U Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt16uValueInRange_237() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81288,12 +81113,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16uNotValueOk_238() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81310,33 +81136,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32uMinValue_239() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt32uArgument; nullableInt32uArgument = [NSNumber numberWithUnsignedInt:0UL]; [cluster writeAttributeNullableInt32uWithValue:nullableInt32uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32U Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt32uMinValue_240() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81355,33 +81183,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_241() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt32uArgument; nullableInt32uArgument = [NSNumber numberWithUnsignedInt:4294967294UL]; [cluster writeAttributeNullableInt32uWithValue:nullableInt32uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32U Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_242() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81400,37 +81230,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_243() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt32uArgument; nullableInt32uArgument = [NSNumber numberWithUnsignedInt:4294967295UL]; - [cluster writeAttributeNullableInt32uWithValue:nullableInt32uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32U Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt32uWithValue:nullableInt32uArgument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_244() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81449,33 +81281,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_245() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt32uArgument; nullableInt32uArgument = nil; [cluster writeAttributeNullableInt32uWithValue:nullableInt32uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32U null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt32uNullValue_246() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81493,12 +81327,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32uNullValueRange_247() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81517,12 +81352,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32uNullValueNot_248() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81539,33 +81375,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32uValue_249() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt32uArgument; nullableInt32uArgument = [NSNumber numberWithUnsignedInt:2147483647UL]; [cluster writeAttributeNullableInt32uWithValue:nullableInt32uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32U Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt32uValueInRange_250() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81584,12 +81422,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32uNotValueOk_251() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81606,33 +81445,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64uMinValue_252() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt64uArgument; nullableInt64uArgument = [NSNumber numberWithUnsignedLongLong:0ULL]; [cluster writeAttributeNullableInt64uWithValue:nullableInt64uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64U Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt64uMinValue_253() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81651,33 +81492,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_254() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt64uArgument; nullableInt64uArgument = [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; [cluster writeAttributeNullableInt64uWithValue:nullableInt64uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64U Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_255() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81696,37 +81539,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_256() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt64uArgument; nullableInt64uArgument = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; - [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(); - }]; + [cluster + writeAttributeNullableInt64uWithValue:nullableInt64uArgument + completionHandler:^(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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_257() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81745,33 +81590,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_258() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt64uArgument; nullableInt64uArgument = nil; [cluster writeAttributeNullableInt64uWithValue:nullableInt64uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64U null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt64uNullValue_259() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81789,12 +81636,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64uNullValueRange_260() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81814,12 +81662,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64uNullValueNot_261() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81836,33 +81685,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64uValue_262() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt64uArgument; nullableInt64uArgument = [NSNumber numberWithUnsignedLongLong:18000000000000000000ULL]; [cluster writeAttributeNullableInt64uWithValue:nullableInt64uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64U Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt64uValueInRange_263() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81882,12 +81733,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64uNotValueOk_264() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81904,33 +81756,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_265() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8sArgument; nullableInt8sArgument = [NSNumber numberWithChar:-127]; [cluster writeAttributeNullableInt8sWithValue:nullableInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8S Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt8sMinValue_266() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81949,37 +81803,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_267() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8sArgument; nullableInt8sArgument = [NSNumber numberWithChar:-128]; - [cluster writeAttributeNullableInt8sWithValue:nullableInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8S Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt8sWithValue:nullableInt8sArgument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_268() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81998,33 +81854,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_269() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8sArgument; nullableInt8sArgument = nil; [cluster writeAttributeNullableInt8sWithValue:nullableInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8S null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt8sNullValue_270() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82042,12 +81900,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8sNullValueRange_271() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82066,12 +81925,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8sNullValueNot_272() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82088,33 +81948,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8sValue_273() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8sArgument; nullableInt8sArgument = [NSNumber numberWithChar:-127]; [cluster writeAttributeNullableInt8sWithValue:nullableInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8S Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt8sValueInRange_274() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82133,12 +81995,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8sNotValueOk_275() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82155,33 +82018,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_276() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt16sArgument; nullableInt16sArgument = [NSNumber numberWithShort:-32767]; [cluster writeAttributeNullableInt16sWithValue:nullableInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16S Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt16sMinValue_277() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82200,37 +82065,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_278() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt16sArgument; nullableInt16sArgument = [NSNumber numberWithShort:-32768]; - [cluster writeAttributeNullableInt16sWithValue:nullableInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16S Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt16sWithValue:nullableInt16sArgument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_279() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82249,33 +82116,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_280() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt16sArgument; nullableInt16sArgument = nil; [cluster writeAttributeNullableInt16sWithValue:nullableInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16S null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt16sNullValue_281() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82293,12 +82162,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16sNullValueRange_282() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82317,12 +82187,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16sNullValueNot_283() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82339,33 +82210,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16sValue_284() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt16sArgument; nullableInt16sArgument = [NSNumber numberWithShort:-32767]; [cluster writeAttributeNullableInt16sWithValue:nullableInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16S Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt16sValueInRange_285() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82384,12 +82257,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16sNotValueOk_286() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82406,33 +82280,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_287() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt32sArgument; nullableInt32sArgument = [NSNumber numberWithInt:-2147483647L]; [cluster writeAttributeNullableInt32sWithValue:nullableInt32sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32S Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt32sMinValue_288() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82451,37 +82327,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_289() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt32sArgument; nullableInt32sArgument = [NSNumber numberWithInt:-2147483648L]; - [cluster writeAttributeNullableInt32sWithValue:nullableInt32sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32S Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt32sWithValue:nullableInt32sArgument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_290() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82500,33 +82378,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_291() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt32sArgument; nullableInt32sArgument = nil; [cluster writeAttributeNullableInt32sWithValue:nullableInt32sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32S null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt32sNullValue_292() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82544,12 +82424,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32sNullValueRange_293() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82568,12 +82449,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32sNullValueNot_294() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82590,33 +82472,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32sValue_295() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt32sArgument; nullableInt32sArgument = [NSNumber numberWithInt:-2147483647L]; [cluster writeAttributeNullableInt32sWithValue:nullableInt32sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32S Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt32sValueInRange_296() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82635,12 +82519,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32sNotValueOk_297() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82657,33 +82542,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_298() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt64sArgument; nullableInt64sArgument = [NSNumber numberWithLongLong:-9223372036854775807LL]; [cluster writeAttributeNullableInt64sWithValue:nullableInt64sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64S Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt64sMinValue_299() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82702,37 +82589,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_300() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt64sArgument; nullableInt64sArgument = [NSNumber numberWithLongLong:-9223372036854775807LL - 1LL]; - [cluster writeAttributeNullableInt64sWithValue:nullableInt64sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64S Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt64sWithValue:nullableInt64sArgument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_301() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82751,33 +82640,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_302() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt64sArgument; nullableInt64sArgument = nil; [cluster writeAttributeNullableInt64sWithValue:nullableInt64sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64S null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt64sNullValue_303() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82795,12 +82686,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64sNullValueRange_304() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82819,12 +82711,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64sNullValueNot_305() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82841,33 +82734,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64sValue_306() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt64sArgument; nullableInt64sArgument = [NSNumber numberWithLongLong:-9223372036854775807LL]; [cluster writeAttributeNullableInt64sWithValue:nullableInt64sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64S Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableInt64sValueInRange_307() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82886,12 +82781,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64sNotValueOk_308() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82908,33 +82804,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSingleMediumValue_309() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableFloatSingleArgument; nullableFloatSingleArgument = [NSNumber numberWithFloat:0.1f]; [cluster writeAttributeNullableFloatSingleWithValue:nullableFloatSingleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SINGLE medium Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableSingleMediumValue_310() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SINGLE medium Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82953,33 +82851,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSingleLargestValue_311() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableFloatSingleArgument; nullableFloatSingleArgument = [NSNumber numberWithFloat:INFINITY]; [cluster writeAttributeNullableFloatSingleWithValue:nullableFloatSingleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SINGLE largest Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableSingleLargestValue_312() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SINGLE largest Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82998,33 +82898,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSingleSmallestValue_313() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableFloatSingleArgument; nullableFloatSingleArgument = [NSNumber numberWithFloat:-INFINITY]; [cluster writeAttributeNullableFloatSingleWithValue:nullableFloatSingleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SINGLE smallest Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableSingleSmallestValue_314() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SINGLE smallest Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83043,33 +82945,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSingleNullValue_315() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableFloatSingleArgument; nullableFloatSingleArgument = nil; [cluster writeAttributeNullableFloatSingleWithValue:nullableFloatSingleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SINGLE null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableSingleNullValue_316() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SINGLE null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83087,33 +82991,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSingle0Value_317() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableFloatSingleArgument; nullableFloatSingleArgument = [NSNumber numberWithFloat:0.0f]; [cluster writeAttributeNullableFloatSingleWithValue:nullableFloatSingleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SINGLE 0 Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableSingle0Value_318() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SINGLE 0 Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83132,33 +83038,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableDoubleMediumValue_319() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableFloatDoubleArgument; nullableFloatDoubleArgument = [NSNumber numberWithDouble:0.1234567890123]; [cluster writeAttributeNullableFloatDoubleWithValue:nullableFloatDoubleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_DOUBLE medium Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableDoubleMediumValue_320() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_DOUBLE medium Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83177,33 +83085,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableDoubleLargestValue_321() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableFloatDoubleArgument; nullableFloatDoubleArgument = [NSNumber numberWithDouble:INFINITY]; [cluster writeAttributeNullableFloatDoubleWithValue:nullableFloatDoubleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_DOUBLE largest Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableDoubleLargestValue_322() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_DOUBLE largest Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83222,33 +83132,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableDoubleSmallestValue_323() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableFloatDoubleArgument; nullableFloatDoubleArgument = [NSNumber numberWithDouble:-INFINITY]; [cluster writeAttributeNullableFloatDoubleWithValue:nullableFloatDoubleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_DOUBLE smallest Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableDoubleSmallestValue_324() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_DOUBLE smallest Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83267,33 +83179,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableDoubleNullValue_325() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableFloatDoubleArgument; nullableFloatDoubleArgument = nil; [cluster writeAttributeNullableFloatDoubleWithValue:nullableFloatDoubleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_DOUBLE null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableDoubleNullValue_326() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_DOUBLE null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83311,33 +83225,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableDouble0Value_327() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableFloatDoubleArgument; nullableFloatDoubleArgument = [NSNumber numberWithDouble:0]; [cluster writeAttributeNullableFloatDoubleWithValue:nullableFloatDoubleArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_DOUBLE 0 Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableDouble0Value_328() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_DOUBLE 0 Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83356,33 +83272,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum8MinValue_329() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnum8Argument; nullableEnum8Argument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeNullableEnum8WithValue:nullableEnum8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM8 Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableEnum8MinValue_330() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM8 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83401,33 +83319,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_331() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnum8Argument; nullableEnum8Argument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableEnum8WithValue:nullableEnum8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM8 Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_332() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM8 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83446,37 +83366,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_333() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnum8Argument; nullableEnum8Argument = [NSNumber numberWithUnsignedChar:255U]; - [cluster writeAttributeNullableEnum8WithValue:nullableEnum8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM8 Invalid Value Error: %@", err); + [cluster + writeAttributeNullableEnum8WithValue:nullableEnum8Argument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_334() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM8 unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83495,33 +83417,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_335() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnum8Argument; nullableEnum8Argument = nil; [cluster writeAttributeNullableEnum8WithValue:nullableEnum8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM8 null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableEnum8NullValue_336() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM8 null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83539,33 +83463,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum16MinValue_337() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnum16Argument; nullableEnum16Argument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeNullableEnum16WithValue:nullableEnum16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM16 Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableEnum16MinValue_338() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM16 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83584,33 +83510,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_339() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnum16Argument; nullableEnum16Argument = [NSNumber numberWithUnsignedShort:65534U]; [cluster writeAttributeNullableEnum16WithValue:nullableEnum16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM16 Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_340() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM16 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83629,37 +83557,39 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_341() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnum16Argument; nullableEnum16Argument = [NSNumber numberWithUnsignedShort:65535U]; - [cluster writeAttributeNullableEnum16WithValue:nullableEnum16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM16 Invalid Value Error: %@", err); + [cluster + writeAttributeNullableEnum16WithValue:nullableEnum16Argument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_342() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM16 unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83678,33 +83608,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_343() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnum16Argument; nullableEnum16Argument = nil; [cluster writeAttributeNullableEnum16WithValue:nullableEnum16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM16 null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableEnum16NullValue_344() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM16 null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83722,33 +83654,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSimpleEnumMinValue_345() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnumAttrArgument; nullableEnumAttrArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM Min Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableSimpleEnumMinValue_346() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SIMPLE_ENUM Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83767,33 +83701,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSimpleEnumMaxValue_347() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnumAttrArgument; nullableEnumAttrArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM Max Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableSimpleEnumMaxValue_348() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SIMPLE_ENUM Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83812,25 +83748,26 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSimpleEnumInvalidValue_349() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnumAttrArgument; nullableEnumAttrArgument = [NSNumber numberWithUnsignedChar:255U]; - [cluster writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM Invalid Value Error: %@", err); + [cluster + writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument + completionHandler:^(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; } @@ -83838,12 +83775,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableSimpleEnumUnchangedValue_350() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SIMPLE_ENUM unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83865,33 +83803,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSimpleEnumNullValue_351() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnumAttrArgument; nullableEnumAttrArgument = nil; [cluster writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM null Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableSimpleEnumNullValue_352() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SIMPLE_ENUM null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83909,12 +83849,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableSimpleEnumNot3Value_353() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnumAttrWithCompletionHandler:^(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)); @@ -83931,12 +83872,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_354() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_OCTET_STRING Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83956,21 +83898,22 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableOctetString_355() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableOctetStringArgument; nullableOctetStringArgument = [[NSData alloc] initWithBytes:"TestValue" length:9]; [cluster writeAttributeNullableOctetStringWithValue:nullableOctetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_OCTET_STRING Error: %@", err); + completionHandler:^(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; } @@ -83978,12 +83921,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableOctetString_356() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84006,33 +83950,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableOctetString_357() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableOctetStringArgument; nullableOctetStringArgument = nil; [cluster writeAttributeNullableOctetStringWithValue:nullableOctetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_OCTET_STRING Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableOctetString_358() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84050,33 +83996,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableOctetString_359() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableOctetStringArgument; nullableOctetStringArgument = [[NSData alloc] initWithBytes:"" length:0]; [cluster writeAttributeNullableOctetStringWithValue:nullableOctetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_OCTET_STRING Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableOctetString_360() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84096,12 +84044,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableOctetStringNotTestValue_361() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_OCTET_STRING not TestValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84118,12 +84067,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_362() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_CHAR_STRING Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84142,21 +84092,22 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableCharString_363() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableCharStringArgument; nullableCharStringArgument = @"☉T☉"; [cluster writeAttributeNullableCharStringWithValue:nullableCharStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_CHAR_STRING Error: %@", err); + completionHandler:^(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; } @@ -84164,12 +84115,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableCharString_364() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84191,12 +84143,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableCharString_365() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84219,33 +84172,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_366() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableCharStringArgument; nullableCharStringArgument = nil; [cluster writeAttributeNullableCharStringWithValue:nullableCharStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_CHAR_STRING - Value too long Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableCharString_367() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84263,33 +84218,35 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_368() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableCharStringArgument; nullableCharStringArgument = @""; [cluster writeAttributeNullableCharStringWithValue:nullableCharStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_CHAR_STRING - Empty Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeNullableCharString_369() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84308,12 +84265,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableCharStringNott_370() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_CHAR_STRING not ☉T☉ Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84330,12 +84288,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeFromNonexistentEndpoint_371() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(200) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:200 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute from nonexistent endpoint. Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -84349,12 +84308,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeFromNonexistentCluster_372() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute from nonexistent cluster. Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -84368,49 +84328,51 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_373() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init]; - [cluster testSimpleOptionalArgumentRequestWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Send a command that takes an optional parameter but do not set it. " - @"Error: %@", - err); + [cluster + testSimpleOptionalArgumentRequestWithParams:params + completionHandler:^(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; } CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_374() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init]; params.arg1 = [NSNumber numberWithBool:1]; - [cluster testSimpleOptionalArgumentRequestWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Send a command that takes an optional parameter but do not set it. " - @"Error: %@", - err); + [cluster + testSimpleOptionalArgumentRequestWithParams:params + completionHandler:^(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; } @@ -84419,9 +84381,10 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReportSubscribeToListAttribute_375() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); test_TestCluster_list_int8u_Reported = ^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -84447,16 +84410,18 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSubscribeToListAttribute_376() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); uint16_t minIntervalArgument = 2U; uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - [cluster subscribeAttributeListInt8uWithParams:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + [cluster subscribeAttributeListInt8uWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] + maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] + params:params subscriptionEstablished:^{ VerifyOrReturn( testSendClusterTestCluster_375_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); @@ -84478,9 +84443,10 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteSubscribedToListAttribute_377() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id listInt8uArgument; @@ -84493,22 +84459,23 @@ class TestCluster : public TestCommandBridge { listInt8uArgument = temp_0; } [cluster writeAttributeListInt8uWithValue:listInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write subscribed-to list attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCheckForListAttributeReport_378() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); test_TestCluster_list_int8u_Reported = ^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -84533,12 +84500,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadRangeRestrictedUnsigned8BitInteger_379() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read range-restricted unsigned 8-bit integer Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84556,120 +84524,123 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_380() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min value to a range-restricted unsigned 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_381() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:19U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a range-restricted unsigned 8-bit " - @"integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_382() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:101U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a range-restricted unsigned 8-bit " - @"integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_383() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max value to a range-restricted unsigned 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_384() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(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)); @@ -84687,35 +84658,37 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_385() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:20U]; - [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a range-restricted unsigned 8-bit integer " - @"Error: %@", - err); + [cluster + writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_386() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(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)); @@ -84733,35 +84706,37 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_387() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:100U]; - [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a range-restricted unsigned 8-bit integer " - @"Error: %@", - err); + [cluster + writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_388() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(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)); @@ -84779,35 +84754,37 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_389() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:50U]; - [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a range-restricted unsigned 8-bit " - @"integer Error: %@", - err); + [cluster + writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_390() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(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)); @@ -84825,12 +84802,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadRangeRestrictedUnsigned16BitInteger_391() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read range-restricted unsigned 16-bit integer Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84848,120 +84826,123 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_392() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16uArgument; rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min value to a range-restricted unsigned 16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_393() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16uArgument; rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:99U]; [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a range-restricted unsigned 16-bit " - @"integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_394() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16uArgument; rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:1001U]; [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a range-restricted unsigned 16-bit " - @"integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_395() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16uArgument; rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:65535U]; [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max value to a range-restricted unsigned 16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_396() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(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)); @@ -84979,35 +84960,37 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_397() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16uArgument; rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:100U]; - [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a range-restricted unsigned 16-bit integer " - @"Error: %@", - err); + [cluster + writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_398() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(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)); @@ -85025,35 +85008,37 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_399() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16uArgument; rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:1000U]; - [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a range-restricted unsigned 16-bit integer " - @"Error: %@", - err); + [cluster + writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_400() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(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)); @@ -85071,35 +85056,38 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_401() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16uArgument; rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:500U]; - [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a range-restricted unsigned 16-bit " - @"integer Error: %@", - err); + [cluster + writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_402() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(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)); @@ -85117,12 +85105,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadRangeRestrictedSigned8BitInteger_403() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read range-restricted signed 8-bit integer Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85140,118 +85129,123 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned8BitInteger_404() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8sArgument; rangeRestrictedInt8sArgument = [NSNumber numberWithChar:-128]; [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min value to a range-restricted signed 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_405() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8sArgument; rangeRestrictedInt8sArgument = [NSNumber numberWithChar:-41]; - [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a range-restricted signed 8-bit " - @"integer Error: %@", - err); + [cluster + writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completionHandler:^(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; } CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_406() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8sArgument; rangeRestrictedInt8sArgument = [NSNumber numberWithChar:51]; - [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a range-restricted signed 8-bit " - @"integer Error: %@", - err); + [cluster + writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completionHandler:^(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; } CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned8BitInteger_407() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8sArgument; rangeRestrictedInt8sArgument = [NSNumber numberWithChar:127]; [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max value to a range-restricted signed 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_408() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(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)); @@ -85269,36 +85263,36 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_409() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8sArgument; rangeRestrictedInt8sArgument = [NSNumber numberWithChar:-40]; [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Write min valid value to a range-restricted signed 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_410() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(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)); @@ -85316,36 +85310,36 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_411() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8sArgument; rangeRestrictedInt8sArgument = [NSNumber numberWithChar:50]; [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Write max valid value to a range-restricted signed 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_412() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(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)); @@ -85363,35 +85357,37 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_413() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8sArgument; rangeRestrictedInt8sArgument = [NSNumber numberWithChar:6]; - [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a range-restricted signed 8-bit integer " - @"Error: %@", - err); + [cluster + writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_414() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(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)); @@ -85409,12 +85405,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadRangeRestrictedSigned16BitInteger_415() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read range-restricted signed 16-bit integer Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85432,120 +85429,123 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned16BitInteger_416() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16sArgument; rangeRestrictedInt16sArgument = [NSNumber numberWithShort:-32768]; [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min value to a range-restricted signed 16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_417() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16sArgument; rangeRestrictedInt16sArgument = [NSNumber numberWithShort:-151]; [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a range-restricted signed 16-bit " - @"integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_418() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16sArgument; rangeRestrictedInt16sArgument = [NSNumber numberWithShort:201]; [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a range-restricted signed 16-bit " - @"integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned16BitInteger_419() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16sArgument; rangeRestrictedInt16sArgument = [NSNumber numberWithShort:32767]; [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max value to a range-restricted signed 16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_420() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(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)); @@ -85563,35 +85563,37 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_421() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16sArgument; rangeRestrictedInt16sArgument = [NSNumber numberWithShort:-150]; - [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a range-restricted signed 16-bit integer " - @"Error: %@", - err); + [cluster + writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_422() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(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)); @@ -85609,35 +85611,37 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_423() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16sArgument; rangeRestrictedInt16sArgument = [NSNumber numberWithShort:200]; - [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a range-restricted signed 16-bit integer " - @"Error: %@", - err); + [cluster + writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_424() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(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)); @@ -85655,35 +85659,37 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_425() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt16sArgument; rangeRestrictedInt16sArgument = [NSNumber numberWithShort:7]; - [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a range-restricted signed 16-bit " - @"integer Error: %@", - err); + [cluster + writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completionHandler:^(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; } CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_426() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(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)); @@ -85701,1436 +85707,1518 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadNullableRangeRestrictedUnsigned8BitInteger_427() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read nullable range-restricted unsigned 8-bit integer Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_428() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min value to a nullable range-restricted unsigned " - @"8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_429() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:19U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a nullable range-restricted " - @"unsigned 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_430() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:101U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a nullable range-restricted " - @"unsigned 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_431() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max value to a nullable range-restricted unsigned " - @"8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_432() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value has not changed Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_433() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:20U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a nullable range-restricted " - @"unsigned 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_434() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is at min valid Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_435() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:100U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a nullable range-restricted " - @"unsigned 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_436() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is at max valid Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_437() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:50U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a nullable range-restricted " - @"unsigned 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_438() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is at mid valid Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(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; } CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_439() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = nil; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write null value to a nullable range-restricted unsigned " - @"8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_440() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is null Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(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; } CHIP_ERROR TestReadNullableRangeRestrictedUnsigned16BitInteger_441() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read nullable range-restricted unsigned 16-bit integer Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_442() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min value to a nullable range-restricted unsigned " - @"16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_443() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:99U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a nullable range-restricted " - @"unsigned 16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_444() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:1001U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a nullable range-restricted " - @"unsigned 16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_445() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:65534U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max value to a nullable range-restricted unsigned " - @"16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_446() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value has not changed Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_447() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:100U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a nullable range-restricted " - @"unsigned 16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_448() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is at min valid Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_449() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:1000U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a nullable range-restricted " - @"unsigned 16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_450() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is at max valid Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_451() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:500U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a nullable range-restricted " - @"unsigned 16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_452() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is at mid valid Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(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; } CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_453() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = nil; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write null value to a nullable range-restricted unsigned " - @"16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_454() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is null Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(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; } CHIP_ERROR TestReadNullableRangeRestrictedSigned8BitInteger_455() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read nullable range-restricted signed 8-bit integer Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_456() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:-127]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min value to a nullable range-restricted signed 8-bit " - @"integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_457() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:-41]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a nullable range-restricted " - @"signed 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_458() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:51]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a nullable range-restricted " - @"signed 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_459() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:127]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max value to a nullable range-restricted signed 8-bit " - @"integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_460() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 8-bit integer value has not changed Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_461() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:-40]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a nullable range-restricted signed " - @"8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_462() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at min valid Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_463() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:50]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a nullable range-restricted signed " - @"8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_464() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at max valid Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_465() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:6]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a nullable range-restricted " - @"signed 8-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_466() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at mid valid Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(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; } CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_467() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = nil; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write null value to a nullable range-restricted signed 8-bit " - @"integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_468() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at null Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(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; } CHIP_ERROR TestReadNullableRangeRestrictedSigned16BitInteger_469() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read nullable range-restricted signed 16-bit integer Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_470() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:-32767]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min value to a nullable range-restricted signed " - @"16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_471() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:-151]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a nullable range-restricted " - @"signed 16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_472() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:201]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a nullable range-restricted " - @"signed 16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_473() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:32767]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max value to a nullable range-restricted signed " - @"16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_474() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 16-bit integer value has not changed Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_475() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:-150]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a nullable range-restricted signed " - @"16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_476() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 16-bit integer value is at min valid Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_477() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:200]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a nullable range-restricted signed " - @"16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_478() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 16-bit integer value is at max valid Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(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; } CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_479() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:7]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a nullable range-restricted " - @"signed 16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_480() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 16-bit integer value is at mid valid Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(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; } CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_481() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = nil; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write null value to a nullable range-restricted signed " - @"16-bit integer Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_482() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 16-bit integer value is null Error: %@", err); + [cluster + readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(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; } CHIP_ERROR TestWriteAttributeThatReturnsGeneralStatusOnWrite_483() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id generalErrorBooleanArgument; generalErrorBooleanArgument = [NSNumber numberWithBool:false]; [cluster writeAttributeGeneralErrorBooleanWithValue:generalErrorBooleanArgument - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestWriteAttributeThatReturnsClusterSpecificStatusOnWrite_484() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id clusterErrorBooleanArgument; clusterErrorBooleanArgument = [NSNumber numberWithBool:false]; [cluster writeAttributeClusterErrorBooleanWithValue:clusterErrorBooleanArgument - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeThatReturnsGeneralStatusOnRead_485() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneralErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneralErrorBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute that returns general status on read Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -87144,12 +87232,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeThatReturnsClusterSpecificStatusOnRead_486() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterErrorBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read attribute that returns cluster-specific status on read Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -87163,12 +87252,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAcceptedCommandListAttribute_487() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"read AcceptedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -87204,12 +87294,13 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadGeneratedCommandListAttribute_488() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"read GeneratedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -87236,9 +87327,10 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteStructTypedAttribute_489() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id structAttrArgument; @@ -87253,45 +87345,46 @@ class TestCluster : public TestCommandBridge { ((MTRTestClusterClusterSimpleStruct *) structAttrArgument).h = [NSNumber numberWithDouble:3.14159265358979]; [cluster writeAttributeStructAttrWithValue:structAttrArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write struct-typed attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadStructTypedAttribute_490() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeStructAttrWithCompletion:^(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read struct-typed attribute Error: %@", err); + [cluster readAttributeStructAttrWithCompletionHandler:^( + 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; } @@ -87601,7 +87694,6 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -87609,9 +87701,10 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeListWithListOfInt8u_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id listInt8uArgument; @@ -87624,25 +87717,26 @@ class TestConstraints : public TestCommandBridge { listInt8uArgument = temp_0; } [cluster writeAttributeListInt8uWithValue:listInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute LIST With List of INT8U Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeListWithPartialListOfInt8uThatShouldBeInIt_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListInt8uWithCompletionHandler:^(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)); @@ -87659,12 +87753,13 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeListWithPartialListOfInt8uThatShouldNotBeIncluded_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListInt8uWithCompletionHandler:^(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)); @@ -87680,9 +87775,10 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeListBackToDefaultValue_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id listInt8uArgument; @@ -87691,25 +87787,26 @@ class TestConstraints : public TestCommandBridge { listInt8uArgument = temp_0; } [cluster writeAttributeListInt8uWithValue:listInt8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute LIST Back to Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap32DefaultValue_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -87727,33 +87824,35 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap32WithMaskVal1AndMaskVal3_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap32Argument; bitmap32Argument = [NSNumber numberWithUnsignedInt:5UL]; [cluster writeAttributeBitmap32WithValue:bitmap32Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP32 with MaskVal1 and MaskVal3 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskVal2IsNotSet_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletionHandler:^(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)); @@ -87771,12 +87870,13 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskVal1IsSet_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletionHandler:^(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)); @@ -87794,12 +87894,13 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskVal3IsSet_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletionHandler:^(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)); @@ -87817,12 +87918,13 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskval1AndMaskVal3AreSet_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletionHandler:^(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)); @@ -87840,33 +87942,35 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32uValue_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int32uArgument; int32uArgument = [NSNumber numberWithUnsignedInt:5UL]; [cluster writeAttributeInt32uWithValue:int32uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt32uValueMinValueConstraints_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Value MinValue Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -87881,12 +87985,13 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uValueMaxValueConstraints_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Value MaxValue Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -87901,12 +88006,13 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uValueNotValueConstraints_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Value NotValue Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -87921,54 +88027,57 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32uValueBackToDefaultValue_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int32uArgument; int32uArgument = [NSNumber numberWithUnsignedInt:0UL]; [cluster writeAttributeInt32uWithValue:int32uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Value Back to Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWriteAttributeCharStringValue_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = @"** Test **"; [cluster writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeCharStringValueMinLengthConstraints_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value MinLength Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -87982,12 +88091,13 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringValueMaxLengthConstraints_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value MaxLength Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88001,12 +88111,13 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringValueStartsWithConstraints_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value StartsWith Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88020,12 +88131,13 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringValueEndsWithConstraints_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value EndsWith Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88039,33 +88151,35 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValue_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = @"lowercase"; [cluster writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(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)); @@ -88080,33 +88194,35 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValue_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = @"UPPERCASE"; [cluster writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(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)); @@ -88121,33 +88237,35 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValue_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = @"lowUPPER"; [cluster writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(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)); @@ -88162,33 +88280,35 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValue_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = @"ABCDEF012V"; [cluster writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value isHexString Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88202,33 +88322,35 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValue_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = @"ABCDEF0123"; [cluster writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value isHexString Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88242,21 +88364,22 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = @""; [cluster writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Back to Default Value Error: %@", err); + completionHandler:^(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; } @@ -88347,7 +88470,6 @@ class TestDelayCommands : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -88355,7 +88477,6 @@ class TestDelayCommands : public TestCommandBridge { CHIP_ERROR TestWait100ms_1() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -88454,7 +88575,6 @@ class TestLogCommands : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -88462,7 +88582,6 @@ class TestLogCommands : public TestCommandBridge { CHIP_ERROR TestLogASimpleMessage_1() { - chip::app::Clusters::LogCommands::Commands::Log::Type value; value.message = chip::Span("This is a simple messagegarbage: not in length on purpose", 24); return Log("alpha", value); @@ -88470,7 +88589,6 @@ class TestLogCommands : public TestCommandBridge { CHIP_ERROR TestDoASimpleUserPromptMessage_2() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("This is a simple messagegarbage: not in length on purpose", 24); return UserPrompt("alpha", value); @@ -89324,7 +89442,6 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -89333,85 +89450,88 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestSendTestAddArgumentsCommand_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; params.arg1 = [NSNumber numberWithUnsignedChar:3U]; params.arg2 = [NSNumber numberWithUnsignedChar:17U]; [cluster testAddArgumentsWithParams:params - completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestSendTestAddArgumentsCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; params.arg1 = [NSNumber numberWithUnsignedChar:3U]; params.arg2 = [NSNumber numberWithUnsignedChar:17U]; [cluster testAddArgumentsWithParams:params - completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestSendTestAddArgumentsCommand_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; params.arg1 = [NSNumber numberWithUnsignedChar:3U]; params.arg2 = [TestAddArgumentDefaultValue copy]; - [cluster testAddArgumentsWithParams:params - completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + [cluster + testAddArgumentsWithParams:params + completionHandler:^( + 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; } @@ -89419,12 +89539,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBooleanDefaultValue_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BOOLEAN Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89445,33 +89566,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBooleanNotDefaultValue_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id booleanArgument; booleanArgument = [NSNumber numberWithBool:1]; [cluster writeAttributeBooleanWithValue:booleanArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BOOLEAN Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBooleanNotDefaultValue_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BOOLEAN Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89486,33 +89609,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBooleanDefaultValue_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id booleanArgument; booleanArgument = [readAttributeBooleanDefaultValue copy]; [cluster writeAttributeBooleanWithValue:booleanArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BOOLEAN DefaultValue Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBooleanFalse_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BOOLEAN False Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89531,12 +89656,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap8DefaultValue_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89557,33 +89683,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap8NotDefaultValue_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap8Argument; bitmap8Argument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP8 Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap8NotDefaultValue_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP8 Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89598,33 +89726,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap8DefaultValue_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap8Argument; bitmap8Argument = [readAttributeBitmap8DefaultValue copy]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP8 Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap8DefaultValue_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89643,12 +89773,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap16DefaultValue_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89669,33 +89800,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap16NotDefaultValue_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap16Argument; bitmap16Argument = [NSNumber numberWithUnsignedShort:1U]; [cluster writeAttributeBitmap16WithValue:bitmap16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP16 Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap16NotDefaultValue_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP16 Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89710,33 +89843,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap16DefaultValue_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap16Argument; bitmap16Argument = [readAttributeBitmap16DefaultValue copy]; [cluster writeAttributeBitmap16WithValue:bitmap16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP16 Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap16DefaultValue_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89755,12 +89890,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap32DefaultValue_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89781,33 +89917,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap32NotDefaultValue_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap32Argument; bitmap32Argument = [NSNumber numberWithUnsignedInt:1UL]; [cluster writeAttributeBitmap32WithValue:bitmap32Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP32 Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap32NotDefaultValue_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89822,33 +89960,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap32DefaultValue_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap32Argument; bitmap32Argument = [readAttributeBitmap32DefaultValue copy]; [cluster writeAttributeBitmap32WithValue:bitmap32Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP32 Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap32DefaultValue_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89867,12 +90007,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap64DefaultValue_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89893,33 +90034,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap64NotDefaultValue_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap64Argument; bitmap64Argument = [NSNumber numberWithUnsignedLongLong:1ULL]; [cluster writeAttributeBitmap64WithValue:bitmap64Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP64 Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89934,33 +90077,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap64DefaultValue_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap64Argument; bitmap64Argument = [readAttributeBitmap64DefaultValue copy]; [cluster writeAttributeBitmap64WithValue:bitmap64Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP64 Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeBitmap64DefaultValue_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89979,12 +90124,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8uDefaultValue_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90005,33 +90151,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8uNotDefaultValue_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int8uArgument; int8uArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeInt8uWithValue:int8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8U Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt8uNotDefaultValue_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8U Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90046,33 +90194,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8uDefaultValue_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int8uArgument; int8uArgument = [readAttributeInt8uDefaultValue copy]; [cluster writeAttributeInt8uWithValue:int8uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8U Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt8uDefaultValue_33() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90091,12 +90241,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16uDefaultValue_34() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90117,33 +90268,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16uNotDefaultValue_35() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int16uArgument; int16uArgument = [NSNumber numberWithUnsignedShort:1U]; [cluster writeAttributeInt16uWithValue:int16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16U Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt16uNotDefaultValue_36() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16U Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90158,33 +90311,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16uDefaultValue_37() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int16uArgument; int16uArgument = [readAttributeInt16uDefaultValue copy]; [cluster writeAttributeInt16uWithValue:int16uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16U Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt16uDefaultValue_38() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90203,12 +90358,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uDefaultValue_39() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90229,33 +90385,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32uNotDefaultValue_40() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int32uArgument; int32uArgument = [NSNumber numberWithUnsignedInt:1UL]; [cluster writeAttributeInt32uWithValue:int32uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt32uNotDefaultValue_41() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90270,33 +90428,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32uDefaultValue_42() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int32uArgument; int32uArgument = [readAttributeInt32uDefaultValue copy]; [cluster writeAttributeInt32uWithValue:int32uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt32uDefaultValue_43() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90315,12 +90475,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64uDefaultValue_44() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90341,33 +90502,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64uNotDefaultValue_45() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int64uArgument; int64uArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; [cluster writeAttributeInt64uWithValue:int64uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64U Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt64uNotDefaultValue_46() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64U Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90382,33 +90545,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64uDefaultValue_47() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int64uArgument; int64uArgument = [readAttributeInt64uDefaultValue copy]; [cluster writeAttributeInt64uWithValue:int64uArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64U Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt64uDefaultValue_48() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90427,12 +90592,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8sDefaultValue_49() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90453,33 +90619,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8sNotDefaultValue_50() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int8sArgument; int8sArgument = [NSNumber numberWithChar:1]; [cluster writeAttributeInt8sWithValue:int8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8S Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt8sNotDefaultValue_51() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90494,33 +90662,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8sDefaultValue_52() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int8sArgument; int8sArgument = [readAttributeInt8sDefaultValue copy]; [cluster writeAttributeInt8sWithValue:int8sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8S Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt8sDefaultValue_53() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90539,12 +90709,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16sDefaultValue_54() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90565,33 +90736,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16sNotDefaultValue_55() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int16sArgument; int16sArgument = [NSNumber numberWithShort:1]; [cluster writeAttributeInt16sWithValue:int16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16S Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt16sNotDefaultValue_56() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90606,33 +90779,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16sDefaultValue_57() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int16sArgument; int16sArgument = [readAttributeInt16sDefaultValue copy]; [cluster writeAttributeInt16sWithValue:int16sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16S Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt16sDefaultValue_58() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90651,12 +90826,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32sDefaultValue_59() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90677,33 +90853,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32sNotDefaultValue_60() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int32sArgument; int32sArgument = [NSNumber numberWithInt:1L]; [cluster writeAttributeInt32sWithValue:int32sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32S Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt32sNotDefaultValue_61() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90718,33 +90896,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32sDefaultValue_62() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int32sArgument; int32sArgument = [readAttributeInt32sDefaultValue copy]; [cluster writeAttributeInt32sWithValue:int32sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32S Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt32sDefaultValue_63() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90763,12 +90943,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64sDefaultValue_64() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90789,33 +90970,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeIntsNotDefaultValue_65() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int64sArgument; int64sArgument = [NSNumber numberWithLongLong:1LL]; [cluster writeAttributeInt64sWithValue:int64sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INTS Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt64sNotDefaultValue_66() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90830,33 +91013,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64sDefaultValue_67() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int64sArgument; int64sArgument = [readAttributeInt64sDefaultValue copy]; [cluster writeAttributeInt64sWithValue:int64sArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64S Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeInt64sDefaultValue_68() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90875,12 +91060,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum8DefaultValue_69() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90901,33 +91087,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum8NotDefaultValue_70() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id enum8Argument; enum8Argument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeEnum8WithValue:enum8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM8 Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEnum8NotDefaultValue_71() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM8 Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90942,33 +91130,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum8DefaultValue_72() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id enum8Argument; enum8Argument = [readAttributeEnum8DefaultValue copy]; [cluster writeAttributeEnum8WithValue:enum8Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM8 Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEnum8DefaultValue_73() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90987,12 +91177,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum16DefaultValue_74() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91013,33 +91204,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum16NotDefaultValue_75() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id enum16Argument; enum16Argument = [NSNumber numberWithUnsignedShort:1U]; [cluster writeAttributeEnum16WithValue:enum16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM16 Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEnum16NotDefaultValue_76() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM16 Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91054,33 +91247,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum16DefaultValue_77() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id enum16Argument; enum16Argument = [readAttributeEnum16DefaultValue copy]; [cluster writeAttributeEnum16WithValue:enum16Argument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM16 Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEnum16DefaultValue_78() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91099,12 +91294,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochUsDefaultValue_79() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_US Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91125,33 +91321,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochUsNotDefaultValue_80() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id epochUsArgument; epochUsArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; [cluster writeAttributeEpochUsWithValue:epochUsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_US Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEpochUsNotDefaultValue_81() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_US Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91166,33 +91364,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochUsDefaultValue_82() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id epochUsArgument; epochUsArgument = [readAttributeEpochUSDefaultValue copy]; [cluster writeAttributeEpochUsWithValue:epochUsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_US Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEpochUsDefaultValue_83() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_US Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91211,12 +91411,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochSDefaultValue_84() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91237,33 +91438,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochSNotDefaultValue_85() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id epochSArgument; epochSArgument = [NSNumber numberWithUnsignedInt:1UL]; [cluster writeAttributeEpochSWithValue:epochSArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_S Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEpochSNotDefaultValue_86() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91278,33 +91481,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochSDefaultValue_87() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id epochSArgument; epochSArgument = [readAttributeEpochSDefaultValue copy]; [cluster writeAttributeEpochSWithValue:epochSArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_S Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeEpochSDefaultValue_88() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91323,12 +91528,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeVendorIdDefaultValue_89() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor_id Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91349,33 +91555,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeVendorIdNotDefaultValue_90() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id vendorIdArgument; vendorIdArgument = [NSNumber numberWithUnsignedShort:1U]; [cluster writeAttributeVendorIdWithValue:vendorIdArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute vendor_id Not Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeVendorIdNotDefaultValue_91() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor_id Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91390,33 +91598,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeVendorIdDefaultValue_92() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id vendorIdArgument; vendorIdArgument = [readAttributeVendorIdDefaultValue copy]; [cluster writeAttributeVendorIdWithValue:vendorIdArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute vendor_id Default Value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeVendorIdDefaultValue_93() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor_id Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91435,12 +91645,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringDefaultValue_94() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute char_string Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91461,12 +91672,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringDefaultValueAndCompareToSavedValue_95() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(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)); @@ -91484,21 +91696,22 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringNotDefaultValue_96() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = @"NotDefault"; [cluster writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute char_string Not Default Value Error: %@", err); + completionHandler:^(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; } @@ -91506,12 +91719,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringNotDefaultValue_97() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute char_string Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91534,12 +91748,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringNotDefaultValueAndCompareToSavedValue_98() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(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)); @@ -91559,33 +91774,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringNotDefaultValueFromSavedValue_99() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = [readAttributeCharStringNotDefaultValue copy]; [cluster writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute char_string Not Default Value from saved value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeCharStringNotDefaultValueAndCompareToExpectedValue_100() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletionHandler:^(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)); @@ -91603,21 +91820,22 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringDefaultValue_101() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id charStringArgument; charStringArgument = [readAttributeCharStringDefaultValue copy]; [cluster writeAttributeCharStringWithValue:charStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute char_string Default Value Error: %@", err); + completionHandler:^(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; } @@ -91625,12 +91843,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringDefaultValue_102() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute octet_string Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91651,12 +91870,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringDefaultValueAndCompareToSavedValue_103() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletionHandler:^(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)); @@ -91674,21 +91894,22 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValue_104() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"NotDefault" length:10]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute octet_string Not Default Value Error: %@", err); + completionHandler:^(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; } @@ -91696,12 +91917,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringNotDefaultValue_105() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute octet_string Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91725,12 +91947,13 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToSavedValue_106() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletionHandler:^(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)); @@ -91750,34 +91973,35 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValueFromSavedValue_107() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id octetStringArgument; octetStringArgument = [readAttributeOctetStringNotDefaultValue copy]; - [cluster - writeAttributeOctetStringWithValue:octetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute octet_string Not Default Value from saved value Error: %@", err); + [cluster writeAttributeOctetStringWithValue:octetStringArgument + completionHandler:^(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; } CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToExpectedValue_108() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletionHandler:^(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)); @@ -91796,21 +92020,22 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetStringDefaultValue_109() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id octetStringArgument; octetStringArgument = [readAttributeOctetStringDefaultValue copy]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write attribute octet_string Default Value Error: %@", err); + completionHandler:^(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; } @@ -91912,7 +92137,6 @@ class TestConfigVariables : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -91921,60 +92145,62 @@ class TestConfigVariables : public TestCommandBridge { CHIP_ERROR TestSendTestAddArgumentsCommand_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; params.arg1 = [NSNumber numberWithUnsignedChar:3U]; params.arg2 = [NSNumber numberWithUnsignedChar:17U]; [cluster testAddArgumentsWithParams:params - completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestSendTestAddArgumentsCommand_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; params.arg1 = mArg1.HasValue() ? [NSNumber numberWithUnsignedChar:mArg1.Value()] : [NSNumber numberWithUnsignedChar:5U]; params.arg2 = [TestAddArgumentDefaultValue copy]; [cluster testAddArgumentsWithParams:params - completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + completionHandler:^( + 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; } @@ -92086,7 +92312,6 @@ class TestDescriptorCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -92094,12 +92319,13 @@ class TestDescriptorCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeDeviceList_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDeviceTypeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDeviceListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Device list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92119,12 +92345,13 @@ class TestDescriptorCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeServerList_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeServerListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Server list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92169,12 +92396,13 @@ class TestDescriptorCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeClientList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClientListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClientListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Client list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92193,12 +92421,13 @@ class TestDescriptorCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributePartsList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePartsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePartsListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Parts list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92414,7 +92643,6 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -92422,12 +92650,11 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestReadLocation_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read location Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92445,33 +92672,31 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestWriteLocation_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id locationArgument; locationArgument = @"US"; [cluster writeAttributeLocationWithValue:locationArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write location Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackLocation_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back location Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92489,33 +92714,31 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestRestoreInitialLocationValue_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id locationArgument; locationArgument = @"XX"; [cluster writeAttributeLocationWithValue:locationArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Restore initial location value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadAttributeListValue_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read AttributeList value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92558,12 +92781,11 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestReadNodeLabel_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read NodeLabel Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92581,33 +92803,31 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestWriteNodeLabel_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nodeLabelArgument; nodeLabelArgument = @"My node"; [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write NodeLabel Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackNodeLabel_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back NodeLabel Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92625,12 +92845,11 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestReadLocalConfigDisabled_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read LocalConfigDisabled Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92648,33 +92867,31 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestWriteLocalConfigDisabled_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id localConfigDisabledArgument; localConfigDisabledArgument = [NSNumber numberWithBool:true]; [cluster writeAttributeLocalConfigDisabledWithValue:localConfigDisabledArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write LocalConfigDisabled Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackLocalConfigDisabled_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back LocalConfigDisabled Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92692,14 +92909,12 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestRebootTheDevice_12() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestConnectToTheDeviceAgain_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -92707,12 +92922,11 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestReadBackNodeLabelAfterReboot_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back NodeLabel after reboot Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92730,33 +92944,31 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestRestoreInitialNodeLabelValue_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nodeLabelArgument; nodeLabelArgument = @""; [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Restore initial NodeLabel value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackLocalConfigDisabledAfterReboot_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back LocalConfigDisabled after reboot Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92774,21 +92986,20 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestRestoreInitialLocalConfigDisabledValue_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id localConfigDisabledArgument; localConfigDisabledArgument = [NSNumber numberWithBool:false]; [cluster writeAttributeLocalConfigDisabledWithValue:localConfigDisabledArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Restore initial LocalConfigDisabled value Error: %@", err); + completionHandler:^(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; } @@ -92932,7 +93143,6 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -92940,14 +93150,12 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { CHIP_ERROR TestReadNumberOfCommissionedFabrics_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCommissionedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read number of commissioned fabrics Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92967,14 +93175,12 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { CHIP_ERROR TestReadCurrentFabricIndex_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read current fabric index Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92993,30 +93199,27 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { CHIP_ERROR TestOpenCommissioningWindowFromAlpha_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Open commissioning window from alpha Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCommissionFromBeta_4() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = 74565ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); @@ -93025,7 +93228,6 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_5() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = 74565ULL; return WaitForCommissionee("beta", value); @@ -93035,11 +93237,9 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { CHIP_ERROR TestReportSubscribeFabricsAttributeFromBeta_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); test_TestFabricRemovalWhileSubscribed_Fabrics_Reported = ^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -93057,18 +93257,17 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { CHIP_ERROR TestSubscribeFabricsAttributeFromBeta_7() { - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); uint16_t minIntervalArgument = 2U; uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - [cluster subscribeAttributeFabricsWithParams:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + [cluster subscribeAttributeFabricsWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] + maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] + params:params subscriptionEstablished:^{ VerifyOrReturn(testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); @@ -93090,24 +93289,22 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { CHIP_ERROR TestRemoveSingleOwnFabric_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; params.fabricIndex = [ourFabricIndex copy]; [cluster removeFabricWithParams:params - completion:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove single own fabric Error: %@", err); + completionHandler:^( + 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; } @@ -93408,7 +93605,6 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -93416,37 +93612,35 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestWriteBreadcrumb12_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id breadcrumbArgument; breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:137438953472ULL]; [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Breadcrumb (1/2) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackBreadcrumb12_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back Breadcrumb (1/2) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93464,37 +93658,35 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestWriteBreadcrumb22_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id breadcrumbArgument; breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:81ULL]; [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Breadcrumb (2/2) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackBreadcrumb22_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back Breadcrumb (2/2) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93512,14 +93704,12 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestRebootToResetBreadcrumb_5() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestConnectToTheDeviceAgain_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -93527,14 +93717,13 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestReadBackBreadcrumbAfterRebootAndEnsureItWasNotPersisted_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(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)); @@ -93552,37 +93741,35 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestSetBreadcrumbToNonzeroValue_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id breadcrumbArgument; breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Set Breadcrumb to nonzero value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCheckBreadcrumbSetWorked_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check Breadcrumb set worked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93600,14 +93787,13 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestSendCommissioningCompleteWithoutArmedFailSafe_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster commissioningCompleteWithCompletion:^( + [cluster commissioningCompleteWithCompletionHandler:^( MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Send CommissioningComplete without armed fail-safe Error: %@", err); @@ -93626,14 +93812,13 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByInvalidCommissioningComplete_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(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)); @@ -93651,67 +93836,63 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestOpenCommissioningWindowFromAlpha_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestTryToArmFailSafe_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:10U]; params.breadcrumb = [NSNumber numberWithUnsignedLongLong:5000ULL]; [cluster armFailSafeWithParams:params - completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Try to arm fail-safe Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithCommissioningWindowOpen_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(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)); @@ -93729,30 +93910,28 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestResetBreadcrumbTo0SoWeCanCommission_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id breadcrumbArgument; breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:0ULL]; [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Reset Breadcrumb to 0 so we can commission Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCommissionFromBeta_16() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = 74565ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); @@ -93761,7 +93940,6 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_17() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = 74565ULL; return WaitForCommissionee("beta", value); @@ -93769,44 +93947,42 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestArmFailSafe_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:500U]; params.breadcrumb = [NSNumber numberWithUnsignedLongLong:2ULL]; [cluster armFailSafeWithParams:params - completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Arm fail-safe Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCheckBreadcrumbWasProperlySetByArmFailSafe_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check Breadcrumb was properly set by ArmFailSafe Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93824,44 +94000,42 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestTryToArmFailSafeFromWrongFabric_20() { - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:10U]; params.breadcrumb = [NSNumber numberWithUnsignedLongLong:5000ULL]; [cluster armFailSafeWithParams:params - completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Try to arm fail-safe from wrong fabric Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithExistingFailSafeArmed_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(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)); @@ -93879,14 +94053,13 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestSendCommissioningCompleteFromWrongFabric_22() { - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster commissioningCompleteWithCompletion:^( + [cluster commissioningCompleteWithCompletionHandler:^( MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Send CommissioningComplete from wrong fabric Error: %@", err); @@ -93905,14 +94078,13 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByCommissioningCompleteFromWrongFabric_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(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)); @@ -93930,14 +94102,13 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCloseOutTheFailSafeGracefully_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster commissioningCompleteWithCompletion:^( + [cluster commissioningCompleteWithCompletionHandler:^( MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Close out the fail-safe gracefully Error: %@", err); @@ -93956,14 +94127,13 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCheckBreadcrumbWasResetTo0ByCommissioningComplete_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(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)); @@ -93981,44 +94151,42 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestArmFailSafeAgain_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:500U]; params.breadcrumb = [NSNumber numberWithUnsignedLongLong:3ULL]; [cluster armFailSafeWithParams:params - completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Arm fail-safe again Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCheckBreadcrumbWasSetByArmingFailSafeAgain_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(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)); @@ -94036,44 +94204,42 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestForceExpireTheFailSafe_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:0U]; params.breadcrumb = [NSNumber numberWithUnsignedLongLong:4ULL]; [cluster armFailSafeWithParams:params - completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Force-expire the fail-safe Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCheckBreadcrumbWasResetByExpiringTheFailSafe_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletionHandler:^(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)); @@ -94091,21 +94257,21 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestValidatePresenceOfSupportsConcurrentConnection_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Validate presence of SupportsConcurrentConnection Error: %@", err); + [cluster + readAttributeSupportsConcurrentConnectionWithCompletionHandler:^(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; } @@ -94196,7 +94362,6 @@ class TestIdentifyCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -94204,21 +94369,20 @@ class TestIdentifyCluster : public TestCommandBridge { CHIP_ERROR TestSendIdentifyCommandAndExpectSuccessResponse_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; params.identifyTime = [NSNumber numberWithUnsignedShort:0U]; [cluster identifyWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Send Identify command and expect success response Error: %@", err); + completionHandler:^(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; } @@ -94351,7 +94515,6 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -94359,14 +94522,12 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR TestReadNumberOfSupportedFabrics_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSupportedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read number of supported fabrics Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94382,14 +94543,12 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR TestReadNumberOfCommissionedFabrics_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCommissionedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read number of commissioned fabrics Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94406,14 +94565,12 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR TestReadCurrentFabricIndex_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read current fabric index Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94432,130 +94589,121 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR TestRemoveNonexistentFabric_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; params.fabricIndex = [NSNumber numberWithUnsignedChar:243U]; [cluster removeFabricWithParams:params - completion:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove nonexistent fabric Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestReadFabricListBeforeSettingLabel_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeFabricsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read fabric list before setting label Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSetTheFabricLabel_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; params.label = @"Batcave"; [cluster updateFabricLabelWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Set the fabric label Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestReadFabricListAfterSettingLabel_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeFabricsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read fabric list after setting label Error: %@", err); + completionHandler:^(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; } @@ -94857,7 +95005,6 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -94865,12 +95012,13 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestReadDescription_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read Description Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94888,12 +95036,13 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestReadStandardNamespace_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStandardNamespaceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read StandardNamespace Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94912,12 +95061,13 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestReadSupportedModes_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSupportedModesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read SupportedModes Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94953,12 +95103,13 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestReadCurrentMode_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read CurrentMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94976,12 +95127,13 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestReadStartUpMode_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read StartUpMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95000,12 +95152,13 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestReadOnMode_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read OnMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95023,21 +95176,22 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeToSupportedMode_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; params.newMode = [NSNumber numberWithUnsignedChar:4U]; [cluster changeToModeWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Change to Supported Mode Error: %@", err); + completionHandler:^(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; } @@ -95045,12 +95199,13 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestVerifyCurrentModeChange_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Current Mode Change Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95071,36 +95226,35 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeToUnsupportedMode_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; params.newMode = [NSNumber numberWithUnsignedChar:2U]; [cluster changeToModeWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Change to Unsupported Mode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestToggleOnOff_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Toggle OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95113,12 +95267,11 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestToggleOnOff_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Toggle OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95131,12 +95284,13 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestVerifyCurrentModeDoesNotChangeWhenOnModeIsNull_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentModeWithCompletionHandler:^(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)); @@ -95154,46 +95308,47 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeToUnsupportedOnMode_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onModeArgument; onModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeOnModeWithValue:onModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Change to Unsupported OnMode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestChangeOnMode_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onModeArgument; onModeArgument = [NSNumber numberWithUnsignedChar:7U]; [cluster writeAttributeOnModeWithValue:onModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Change OnMode Error: %@", err); + completionHandler:^(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; } @@ -95201,12 +95356,13 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestVerifyOnMode_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify OnMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95228,12 +95384,11 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestToggleOnOff_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Toggle OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95246,12 +95401,11 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestToggleOnOff_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Toggle OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95264,12 +95418,13 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestVerifyCurrentModeChangesIfOnModeIsNotNull_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentModeWithCompletionHandler:^(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)); @@ -95287,58 +95442,60 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeToUnsupportedStartUpMode_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpModeArgument; startUpModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeStartUpModeWithValue:startUpModeArgument - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestChangeToSupportedStartUpMode_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpModeArgument; startUpModeArgument = [NSNumber numberWithUnsignedChar:7U]; [cluster writeAttributeStartUpModeWithValue:startUpModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Change to Supported StartUp Mode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyStartUpModeChange_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify StartUp Mode Change Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95357,77 +95514,76 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeCurrentModeToAnotherValue_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; params.newMode = [NSNumber numberWithUnsignedChar:0U]; [cluster changeToModeWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Change CurrentMode to another value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestChangeOnMode_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onModeArgument; onModeArgument = [NSNumber numberWithUnsignedChar:4U]; [cluster writeAttributeOnModeWithValue:onModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Change On Mode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSetStartUpOnOff_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpOnOffArgument; startUpOnOffArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Set StartUpOnOff Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestRebootTargetDevice_25() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_26() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -95435,12 +95591,13 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestVerifyCurrentModeChangeBasedOnOnModeAsItOverwritesStartUpMode_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentModeWithCompletionHandler:^(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)); @@ -95458,35 +95615,34 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeOnModeToNull_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onModeArgument; onModeArgument = nil; [cluster writeAttributeOnModeWithValue:onModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Change On Mode to Null Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestRebootTargetDevice_29() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_30() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -95494,12 +95650,13 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestVerifyCurrentModeChangeBasedOnNewStartUpMode_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentModeWithCompletionHandler:^(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)); @@ -95615,7 +95772,6 @@ class TestSelfFabricRemoval : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -95623,14 +95779,12 @@ class TestSelfFabricRemoval : public TestCommandBridge { CHIP_ERROR TestReadNumberOfCommissionedFabrics_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCommissionedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read number of commissioned fabrics Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95650,14 +95804,12 @@ class TestSelfFabricRemoval : public TestCommandBridge { CHIP_ERROR TestReadCurrentFabricIndex_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read current fabric index Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95676,24 +95828,22 @@ class TestSelfFabricRemoval : public TestCommandBridge { CHIP_ERROR TestRemoveSingleOwnFabric_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; params.fabricIndex = [ourFabricIndex copy]; [cluster removeFabricWithParams:params - completion:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove single own fabric Error: %@", err); + completionHandler:^( + 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; } @@ -95927,7 +96077,6 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -95935,21 +96084,18 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestStopTheDefaultAccessory_1() { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; return Stop("alpha", value); } CHIP_ERROR TestStartTheDefaultAccessoryWithNoCommandLineOptions_2() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; return Start("alpha", value); } CHIP_ERROR TestStopTheDefaultAccessoryByKey_3() { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; value.registerKey.Emplace(); value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); @@ -95958,7 +96104,6 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestStartTheDefaultAccessoryWithDiscriminatorCommandLineOption_4() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; value.discriminator.Emplace(); value.discriminator.Value() = 1111U; @@ -95967,14 +96112,12 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestStopTheDefaultAccessory_5() { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; return Stop("alpha", value); } CHIP_ERROR TestStartTheDefaultAccessoryWithDiscriminatorAndPortCommandLineOptions_6() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; value.discriminator.Emplace(); value.discriminator.Value() = 1111U; @@ -95985,14 +96128,12 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestStopTheDefaultAccessory_7() { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; return Stop("alpha", value); } CHIP_ERROR TestStartTheDefaultAccessoryWithMinCommissioningTimeoutOnly_8() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; value.minCommissioningTimeout.Emplace(); value.minCommissioningTimeout.Value() = 10U; @@ -96001,14 +96142,12 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestStopTheDefaultAccessory_9() { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; return Stop("alpha", value); } CHIP_ERROR TestStartTheDefaultAccessoryByKeyWithAllCommandLineOptions_10() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; value.registerKey.Emplace(); value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); @@ -96025,7 +96164,6 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestStartASecondAccessoryWithAllCommandLineOptions_11() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; value.registerKey.Emplace(); value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); @@ -96040,7 +96178,6 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestCommissionSecondAccessoryFromAlpha_12() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = 3735928559ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0IX4122-.548G00", 22); @@ -96049,7 +96186,6 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestWaitForTheSecondCommissionedDeviceToBeRetrievedForAlpha_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = 3735928559ULL; return WaitForCommissionee("alpha", value); @@ -96057,7 +96193,6 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestStopTheSecondAccessory_14() { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; value.registerKey.Emplace(); value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); @@ -96066,7 +96201,6 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestStartASecondAccessoryWithDifferentKvs_15() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; value.registerKey.Emplace(); value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); @@ -96081,14 +96215,12 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestRebootTheDefaultAccessory_16() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestRebootTheDefaultAccessoryByKey_17() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; value.registerKey.Emplace(); value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); @@ -96097,7 +96229,6 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestRebootTheSecondAccessory_18() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; value.registerKey.Emplace(); value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); @@ -96106,14 +96237,12 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestFactoryResetTheDefaultAccessory_19() { - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; return FactoryReset("alpha", value); } CHIP_ERROR TestFactoryResetTheDefaultAccessoryByKey_20() { - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; value.registerKey.Emplace(); value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); @@ -96122,7 +96251,6 @@ class TestSystemCommands : public TestCommandBridge { CHIP_ERROR TestFactoryResetTheSecondAccessory_21() { - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; value.registerKey.Emplace(); value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); @@ -96264,7 +96392,6 @@ class TestBinding : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -96272,9 +96399,8 @@ class TestBinding : public TestCommandBridge { CHIP_ERROR TestWriteEmptyBindingTable_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bindingArgument; @@ -96283,48 +96409,46 @@ class TestBinding : public TestCommandBridge { bindingArgument = temp_0; } [cluster writeAttributeBindingWithValue:bindingArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write empty binding table Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadEmptyBindingTable_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeBindingWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read empty binding table Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWriteInvalidBindingTable_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bindingArgument; @@ -96342,27 +96466,25 @@ class TestBinding : public TestCommandBridge { bindingArgument = temp_0; } - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestWriteBindingTableEndpoint1_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bindingArgument; @@ -96386,66 +96508,62 @@ class TestBinding : public TestCommandBridge { bindingArgument = temp_0; } [cluster writeAttributeBindingWithValue:bindingArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write binding table (endpoint 1) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBindingTableEndpoint1_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeBindingWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read binding table (endpoint 1) Error: %@", err); + 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); - 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; } CHIP_ERROR TestWriteBindingTableEndpoint0_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bindingArgument; @@ -96459,89 +96577,85 @@ class TestBinding : public TestCommandBridge { bindingArgument = temp_0; } [cluster writeAttributeBindingWithValue:bindingArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write binding table (endpoint 0) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBindingTableEndpoint0_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeBindingWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read binding table (endpoint 0) Error: %@", err); + 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); - 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; } CHIP_ERROR TestVerifyEndpoint1NotChanged_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster readAttributeBindingWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify endpoint 1 not changed Error: %@", err); + 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); - 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; } @@ -96681,7 +96795,6 @@ class TestUserLabelCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -96689,9 +96802,8 @@ class TestUserLabelCluster : public TestCommandBridge { CHIP_ERROR TestCommitUserLabelList_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id labelListArgument; @@ -96716,25 +96828,24 @@ class TestUserLabelCluster : public TestCommandBridge { labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Commit User Label List Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCommittedUserLabelList_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify committed User Label List Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -96763,9 +96874,8 @@ class TestUserLabelCluster : public TestCommandBridge { CHIP_ERROR TestClearUserLabelList_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id labelListArgument; @@ -96774,25 +96884,24 @@ class TestUserLabelCluster : public TestCommandBridge { labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Clear User Label List Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadUserLabelList_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read User Label List Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -96810,9 +96919,8 @@ class TestUserLabelCluster : public TestCommandBridge { CHIP_ERROR TestWriteUserLabelList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id labelListArgument; @@ -96837,27 +96945,25 @@ class TestUserLabelCluster : public TestCommandBridge { labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write User Label List Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestRebootTargetDevice_6() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_7() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -96865,12 +96971,11 @@ class TestUserLabelCluster : public TestCommandBridge { CHIP_ERROR TestVerifyUserLabelListAfterReboot_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify User Label List after reboot Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -96990,7 +97095,6 @@ class TestUserLabelClusterConstraints : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -96998,9 +97102,8 @@ class TestUserLabelClusterConstraints : public TestCommandBridge { CHIP_ERROR TestAttemptToWriteOverlyLongItemForLabel_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id labelListArgument; @@ -97012,27 +97115,25 @@ class TestUserLabelClusterConstraints : public TestCommandBridge { labelListArgument = temp_0; } - [cluster - writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Attempt to write overly long item for label Error: %@", err); + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(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; } CHIP_ERROR TestAttemptToWriteOverlyLongItemForValue_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id labelListArgument; @@ -97044,18 +97145,17 @@ class TestUserLabelClusterConstraints : public TestCommandBridge { labelListArgument = temp_0; } - [cluster - writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Attempt to write overly long item for value Error: %@", err); + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(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; } @@ -97193,14 +97293,12 @@ class TestArmFailSafe : public TestCommandBridge { CHIP_ERROR TestRebootTargetDevice_0() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } CHIP_ERROR TestWaitForTheAlphaDeviceToBeRetrieved_1() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -97208,73 +97306,69 @@ class TestArmFailSafe : public TestCommandBridge { CHIP_ERROR TestQueryFabricsList_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeFabricsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query fabrics list Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestArmFailSafeOnTargetDeviceWithTimeout0_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:0U]; params.breadcrumb = [NSNumber numberWithUnsignedLongLong:0ULL]; [cluster armFailSafeWithParams:params - completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"ArmFailSafe on target device with timeout 0 Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestReadsNodeLabelMandatoryAttributeOfTargetDevice_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads NodeLabel mandatory attribute of target device Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97292,38 +97386,33 @@ class TestArmFailSafe : public TestCommandBridge { CHIP_ERROR TestInvokeAddTrustedRootCertificateWithoutFailSafe_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; params.rootCertificate = [[NSData alloc] initWithBytes:"00000000" length:8]; [cluster addTrustedRootCertificateWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Invoke AddTrustedRootCertificate without fail-safe Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestInvokeAddNOCWithoutFailSafe_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; @@ -97332,53 +97421,47 @@ class TestArmFailSafe : public TestCommandBridge { length:16]; params.caseAdminSubject = [NSNumber numberWithUnsignedLongLong:1234ULL]; params.adminVendorId = [NSNumber numberWithUnsignedShort:65521U]; - [cluster - addNOCWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Invoke AddNOC without fail-safe Error: %@", err); + [cluster addNOCWithParams:params + completionHandler:^(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; } CHIP_ERROR TestInvokeUpdateNOCWithoutFailSafe_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; params.nocValue = [[NSData alloc] initWithBytes:"00112233" length:8]; [cluster updateNOCWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Invoke UpdateNOC without fail-safe Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestInvokeCSRRequestWithoutFailSafe_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; @@ -97387,15 +97470,14 @@ class TestArmFailSafe : public TestCommandBridge { length:32]; [cluster CSRRequestWithParams:params - completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Invoke CSRRequest without fail-safe Error: %@", err); + completionHandler:^(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; } @@ -97647,7 +97729,6 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -97655,33 +97736,35 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestWriteFanMode_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id fanModeArgument; fanModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeFanModeWithValue:fanModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write fan mode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackFanMode_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFanModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back fan mode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97699,33 +97782,35 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestWriteFanModeSequence_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id fanModeSequenceArgument; fanModeSequenceArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeFanModeSequenceWithValue:fanModeSequenceArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write fan mode sequence Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackFanModeSequence_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFanModeSequenceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back fan mode sequence Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97743,33 +97828,35 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestWritePercentSetting_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id percentSettingArgument; percentSettingArgument = [NSNumber numberWithUnsignedChar:84U]; [cluster writeAttributePercentSettingWithValue:percentSettingArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write percent setting Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackPercentSetting_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97788,12 +97875,13 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestReadBackSpeedSetting_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97812,12 +97900,13 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestReadBackSpeedCurrent_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed current Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97835,33 +97924,35 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestWritePercentSetting_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id percentSettingArgument; percentSettingArgument = nil; [cluster writeAttributePercentSettingWithValue:percentSettingArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write percent setting Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackPercentSetting_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97880,33 +97971,35 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestWriteSpeedSetting_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id speedSettingArgument; speedSettingArgument = [NSNumber numberWithUnsignedChar:73U]; [cluster writeAttributeSpeedSettingWithValue:speedSettingArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write speed setting Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackSpeedSetting_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97925,12 +98018,13 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestReadBackPercentSetting_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97949,12 +98043,13 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestReadBackPercentCurrent_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent current Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97972,33 +98067,35 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestWriteSpeedSetting_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id speedSettingArgument; speedSettingArgument = nil; [cluster writeAttributeSpeedSettingWithValue:speedSettingArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write speed setting Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackSpeedSetting_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98017,33 +98114,35 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestWriteFanMode_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id fanModeArgument; fanModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeFanModeWithValue:fanModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write fan mode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackPercentSetting_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98062,12 +98161,13 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestReadBackPercentCurrent_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent current Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98085,12 +98185,13 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestReadBackSpeedSetting_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98109,12 +98210,13 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestReadBackSpeedCurrent_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed current Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98132,33 +98234,35 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestWriteFanMode_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id fanModeArgument; fanModeArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeFanModeWithValue:fanModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write fan mode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackPercentSetting_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98176,12 +98280,13 @@ class TestFanControl : public TestCommandBridge { CHIP_ERROR TestReadBackSpeedSetting_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98351,7 +98456,6 @@ class TestAccessControlConstraints : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -98359,9 +98463,10 @@ class TestAccessControlConstraints : public TestCommandBridge { CHIP_ERROR TestConstraintErrorPaseReservedForFutureTcAcl24Step29_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -98390,26 +98495,27 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Constraint error: PASE reserved for future (TC-ACL-2.4 step 29) Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestConstraintErrorInvalidCombinationAdministerGroupTcAcl24Step31_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -98439,27 +98545,26 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } [cluster - writeAttributeACLWithValue:aclArgument - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestConstraintErrorInvalidAuthModeTcAcl24Step33_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -98488,26 +98593,27 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid auth mode (TC-ACL-2.4 step 33) Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestConstraintErrorInvalidSubjectTcAcl24Step34_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -98537,26 +98643,27 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid subject (TC-ACL-2.4 step 34) Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestConstraintErrorInvalidTargetTcAcl24Step38_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -98590,26 +98697,27 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid target (TC-ACL-2.4 step 38) Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestConstraintErrorTargetHasBothEndpointAndDeviceTypeTcAcl24Step42_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -98644,27 +98752,26 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } [cluster - writeAttributeACLWithValue:aclArgument - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestConstraintErrorInvalidPrivilegeValueStep32_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -98690,77 +98797,77 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid privilege value step 32) Error: %@", err); + [cluster + writeAttributeAclWithValue:aclArgument + completionHandler:^(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; } CHIP_ERROR TestConstraintErrorInvalidSubject0xFFFFFfffFfffFfffTcAcl24Step35_8() { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + aclArgument = temp_0; + } + [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(); + }]; + + return CHIP_NO_ERROR; + } + CHIP_ERROR TestConstraintErrorInvalidSubject0xFFFFFffd00000000TcAcl24Step36_9() + { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRAccessControlClusterAccessControlEntry alloc] init]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - aclArgument = temp_0; - } - [cluster - writeAttributeACLWithValue:aclArgument - 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; - } - - CHIP_ERROR TestConstraintErrorInvalidSubject0xFFFFFffd00000000TcAcl24Step36_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -98791,27 +98898,26 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } [cluster - writeAttributeACLWithValue:aclArgument - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestConstraintErrorInvalidSubject0xFFFFFfffFfff0000TcAcl24Step37_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id aclArgument; @@ -98842,18 +98948,16 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } [cluster - writeAttributeACLWithValue:aclArgument - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } @@ -99161,7 +99265,6 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -99169,9 +99272,10 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestSendsAMoveToLevelCommandToSetCurrentLevelToMinValue_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -99180,20 +99284,19 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends a MoveToLevel command to set CurrentLevel to min value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWait100Ms_2() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -99201,12 +99304,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99225,28 +99329,28 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestWriteOnOffTransitionTimeAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onOffTransitionTimeArgument; onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write OnOffTransitionTime attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWait100Ms_5() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -99254,12 +99358,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestReadOnOffTransitionTimeAttribute_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read OnOffTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99277,28 +99382,28 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestWriteOnLevelAttribute_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onLevelArgument; onLevelArgument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeOnLevelWithValue:onLevelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write OnLevel attribute Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWait100Ms_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -99306,12 +99411,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestReadOnLevelAttribute_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read OnLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99330,12 +99436,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestReadMinValueAttribute_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read MinValue attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99353,12 +99460,11 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestSendOnCommand_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99371,12 +99477,11 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -99394,7 +99499,6 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestWaitOnOffTransitionTime_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -99402,12 +99506,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestIfOnLevelIsDefinedCheckCurrentLevelIsOnLevelValue_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(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)); @@ -99426,12 +99531,11 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestSendOffCommand_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99444,12 +99548,11 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -99467,7 +99570,6 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestWaitOnOffTransitionTime_17() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 0UL; return WaitForMs("alpha", value); @@ -99475,12 +99577,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestIfOnLevelIsDefinedCheckCurrentLevelIsMinValue_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(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)); @@ -99499,9 +99602,10 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestSendsAMoveToLevelCommandToSetCurrentLevelToAMidValue_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; @@ -99510,20 +99614,19 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends a MoveToLevel command to set CurrentLevel to a mid value Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWait100Ms_20() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -99531,12 +99634,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99555,28 +99659,28 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestSetOnLevelAttributeToNull_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onLevelArgument; onLevelArgument = nil; [cluster writeAttributeOnLevelWithValue:onLevelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Set OnLevel attribute to null Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWait100Ms_23() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -99584,12 +99688,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestReadOnLevelAttribute_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read OnLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99607,12 +99712,11 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestSendOnCommand_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99625,12 +99729,11 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -99648,7 +99751,6 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestWaitOnOffTransitionTime_27() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); @@ -99656,12 +99758,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestIfOnLevelIsNotDefinedCheckCurrentLevelIsRestored_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(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)); @@ -99680,12 +99783,11 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestSendOffCommand_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99698,12 +99800,11 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletionHandler:^(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)); @@ -99721,7 +99822,6 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestWaitOnOffTransitionTime_31() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 0UL; return WaitForMs("alpha", value); @@ -99729,12 +99829,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { CHIP_ERROR TestIfOnLevelIsNotDefinedCheckCurrentLevelIsRestored_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletionHandler:^(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)); @@ -100029,7 +100130,6 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForAlpha_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -100037,14 +100137,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestGetAlphasFabricIndex_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Get alpha's fabric index Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100062,14 +100160,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckThatCommissioningWindowIsNotOpen_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWindowStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that commissioning window is not open Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100087,14 +100183,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckThatThereIsNoAdminFabricIndex_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that there is no AdminFabricIndex Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100112,14 +100206,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckThatThereIsNoAdminVendorId_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that there is no AdminVendorId Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100137,37 +100229,33 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestOpenCommissioningWindowFromAlpha_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCheckThatCommissioningWindowIsOpen_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWindowStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that commissioning window is open Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100185,14 +100273,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckTheAdminFabricIndex_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check the AdminFabricIndex Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100211,14 +100297,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckTheAdminVendorIdIsNotNull_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check the AdminVendorId is not null Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100235,14 +100319,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCloseCommissioningWindow_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster revokeCommissioningWithCompletion:^(NSError * _Nullable err) { + [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Close Commissioning Window Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100255,14 +100337,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckThatCommissioningWindowIsAgainNotOpen_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWindowStatusWithCompletionHandler:^(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)); @@ -100280,14 +100360,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckThatAgainThereIsNoAdminFabricIndex_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that again there is no AdminFabricIndex Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100305,14 +100383,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckThatAgainThereIsNoAdminVendorId_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that again there is no AdminVendorId Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100330,30 +100406,27 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestOpenCommissioningWindowFromAlphaAgain_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha again Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCommissionFromBeta_14() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); @@ -100362,7 +100435,6 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_15() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee("beta", value); @@ -100370,14 +100442,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckThatCommissioningWindowIsNotOpenForTheThirdTime_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWindowStatusWithCompletionHandler:^(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)); @@ -100395,14 +100465,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckThatThereIsNoAdminFabricIndexForTheThirdTime_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(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)); @@ -100420,14 +100488,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckThatThereIsNoAdminVendorIdForTheThirdTime_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminVendorIdWithCompletionHandler:^(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)); @@ -100445,14 +100511,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestGetBetasFabricIndex_19() { - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Get beta's fabric index Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100470,37 +100534,33 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestOpenCommissioningWindowFromBeta_20() { - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from beta Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCheckThatCommissioningWindowIsOpenAgain_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWindowStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that commissioning window is open again Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100518,14 +100578,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckTheAdminFabricIndexAgain_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check the AdminFabricIndex again Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100545,14 +100603,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckTheAdminVendorIdIsNotNullAgain_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check the AdminVendorId is not null again Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100572,39 +100628,35 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestRemoveBetaFabric_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; params.fabricIndex = mBetaIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mBetaIndex.Value()] : [NSNumber numberWithUnsignedChar:2U]; [cluster removeFabricWithParams:params - completion:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove beta fabric Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCheckThatCommissioningWindowIsStillOpen_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWindowStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that commissioning window is still open Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100622,14 +100674,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckTheAdminFabricIndexGotReset_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check the AdminFabricIndex got reset Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100647,14 +100697,12 @@ class TestCommissioningWindow : public TestCommandBridge { CHIP_ERROR TestCheckTheAdminVendorIdDidNotGetReset_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check the AdminVendorId did not get reset Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100882,14 +100930,12 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestStopTargetDevice_0() { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; return Stop("alpha", value); } CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; value.discriminator.Emplace(); value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; @@ -100898,7 +100944,6 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForAlpha_2() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -100906,7 +100951,6 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestCommissionFromAlphaWhenTheCommissioningWindowIsNotOpened_3() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeIdForDuplicateCommissioning.HasValue() ? mNodeIdForDuplicateCommissioning.Value() : 17ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); @@ -100915,30 +100959,27 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestOpenCommissioningWindowFromAlpha_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCommissionFromAlphaAgain_5() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeIdForDuplicateCommissioning.HasValue() ? mNodeIdForDuplicateCommissioning.Value() : 17ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); @@ -100947,42 +100988,38 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestCheckThatWeJustHaveTheOneFabricAndDidNotAddANewOne_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = false; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:false]; [cluster readAttributeFabricsWithParams:params - 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); + 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); - 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; } CHIP_ERROR TestCloseCommissioningWindowAfterFailedCommissioning_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster revokeCommissioningWithCompletion:^(NSError * _Nullable err) { + [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Close Commissioning Window after failed commissioning Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100995,30 +101032,27 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestOpenCommissioningWindowFromAlphaAgain_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha again Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCommissionFromBeta_9() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); @@ -101027,7 +101061,6 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_10() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee("beta", value); @@ -101035,30 +101068,27 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestOpenCommissioningWindowFromBeta_11() { - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterAdministratorCommissioning * cluster = + [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from beta Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCommissionFromGamma_12() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); @@ -101067,7 +101097,6 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForGamma_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; return WaitForCommissionee("gamma", value); @@ -101076,12 +101105,11 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeNodeLabelFromAlpha_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"read the mandatory attribute: NodeLabel from alpha Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101102,33 +101130,31 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestWriteTheMandatoryAttributeNodeLabelFromBeta_15() { - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nodeLabelArgument; nodeLabelArgument = @"written from beta"; [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"write the mandatory attribute NodeLabel from beta Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheMandatoryAttributeNodeLabelFromGamma_16() { - MTRBaseDevice * device = GetDevice("gamma"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"read the mandatory attribute: NodeLabel from gamma Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101143,21 +101169,20 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestWriteTheMandatoryAttributeNodeLabelBackToDefault_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nodeLabelArgument; nodeLabelArgument = [readFromAlpha copy]; [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"write the mandatory attribute NodeLabel back to default Error: %@", err); + completionHandler:^(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; } @@ -101352,7 +101377,6 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -101360,14 +101384,13 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101386,14 +101409,13 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101412,14 +101434,13 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDGSWSF00WatermarksEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -101433,14 +101454,13 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101460,14 +101480,13 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeThreadMetricsInAttributeList_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(ThreadMetrics) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101483,14 +101502,13 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeCurrentHeapFreeInAttributeList_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(CurrentHeapFree) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101506,14 +101524,13 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeCurrentHeapUsedInAttributeList_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(CurrentHeapUsed) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101529,14 +101546,13 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentAttributeCurrentHeapHighWatermarkInAttributeList_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -101552,14 +101568,13 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101575,14 +101590,13 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101601,14 +101615,13 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListFromDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; + MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101753,7 +101766,6 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -101761,12 +101773,11 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestSetOnOffAttributeToFalse_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Set OnOff Attribute to false Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101781,9 +101792,8 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestReportSubscribeOnOffAttribute_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); test_TestSubscribe_OnOff_OnOff_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -101805,16 +101815,16 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestSubscribeOnOffAttribute_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); uint16_t minIntervalArgument = 2U; uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - [cluster subscribeAttributeOnOffWithParams:params + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + [cluster subscribeAttributeOnOffWithMinInterval:[NSNumber numberWithUnsignedInt:minIntervalArgument] + maxInterval:[NSNumber numberWithUnsignedInt:maxIntervalArgument] + params:params subscriptionEstablished:^{ VerifyOrReturn( testSendClusterTestSubscribe_OnOff_2_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); @@ -101836,12 +101846,11 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestTurnOnTheLightToSeeAttributeChange_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn On the light to see attribute change Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101854,9 +101863,8 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestCheckForAttributeReport_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); test_TestSubscribe_OnOff_OnOff_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -101877,12 +101885,11 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestTurnOffTheLightToSeeAttributeChange_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Turn Off the light to see attribute change Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101895,9 +101902,8 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestCheckForAttributeReport_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); test_TestSubscribe_OnOff_OnOff_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -102856,7 +102862,6 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -102864,71 +102869,70 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadAvailableUserSlotAndVerifyResponseFields_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read available user slot and verify response fields Error: %@", err); + completionHandler:^(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; } @@ -102936,81 +102940,76 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestGetNumberOfSupportedUsersAndVerifyDefaultValue_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get number of supported users and verify default value Error: %@", err); + [cluster + readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^(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; } CHIP_ERROR TestReadFailsForUserWithIndex0_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster - getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read fails for user with index 0 Error: %@", err); + [cluster getUserWithParams:params + completionHandler:^(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; } CHIP_ERROR TestReadFailsForUserWithIndexGreaterThanNumberOfUsersSupported_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; - [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); + [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); - 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; } CHIP_ERROR TestCreateNewUserWithDefaultParameters_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -103022,99 +103021,97 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create new user with default parameters Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheUserBackAndVerifyItsFields_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and verify its fields Error: %@", err); + 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)); + 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; } CHIP_ERROR TestSetUserAtTheOccupiedIndexFailsWithAppropriateResponse_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -103125,25 +103122,23 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userStatus = nil; params.userType = nil; params.credentialRule = nil; - [cluster - setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Set user at the occupied index fails with appropriate response Error: %@", err); + [cluster setUserWithParams:params + completionHandler:^(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; } CHIP_ERROR TestModifyUserNameForExistingUser_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -103155,99 +103150,97 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Modify userName for existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheModifiedUserBackAndVerifyItsFields_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the modified user back and verify its fields Error: %@", err); + 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)); + 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; } CHIP_ERROR TestModifyUserUniqueIdForExistingUser_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -103259,100 +103252,98 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Modify userUniqueId for existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheModifiedUserBackAndVerifyItsFields_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestModifyUserStatusForExistingUser_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -103364,100 +103355,98 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Modify userStatus for existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheModifiedUserBackAndVerifyItsFields_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestModifyUserTypeForExistingUser_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -103469,100 +103458,98 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:6U]; params.credentialRule = nil; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Modify userType for existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheModifiedUserBackAndVerifyItsFields_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestModifyCredentialRuleForExistingUser_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -103574,100 +103561,98 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = [NSNumber numberWithUnsignedChar:2U]; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Modify credentialRule for existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheModifiedUserBackAndVerifyItsFields_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestModifyAllFieldsForExistingUser_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -103679,100 +103664,98 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:1U]; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Modify all fields for existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheModifiedUserBackAndVerifyItsFields_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestAddAnotherUserWithNonDefaultFields_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -103784,100 +103767,98 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:1U]; params.credentialRule = [NSNumber numberWithUnsignedChar:2U]; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Add another user with non-default fields Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheNewUserBackAndVerifyItsFields_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestTryToAddAUserWithUserStatus0_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -103888,96 +103869,93 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userStatus = [NSNumber numberWithUnsignedChar:0U]; params.userType = nil; params.credentialRule = nil; - [cluster - setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to add a user with userStatus 0 Error: %@", err); + [cluster setUserWithParams:params + completionHandler:^(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; } CHIP_ERROR TestMakeSureTheUserDidNotGetCreated_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure the user did not get created Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestTryToAddAUserWithUserStatus2_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -103988,96 +103966,93 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userStatus = [NSNumber numberWithUnsignedChar:2U]; params.userType = nil; params.credentialRule = nil; - [cluster - setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to add a user with userStatus 2 Error: %@", err); + [cluster setUserWithParams:params + completionHandler:^(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; } CHIP_ERROR TestMakeSureTheUserDidNotGetCreated_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure the user did not get created Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestTryToAddAUserWithUserStatus3_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -104089,100 +104064,98 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to add a user with userStatus 3 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheNewThirdUserBackAndVerifyItsFields_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateUserInTheLastSlot_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -104194,99 +104167,97 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create user in the last slot Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheLastUserBackAndVerifyItsFields_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NumberOfTotalUsersSupported copy]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the last user back and verify its fields Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestUserCreationInThe0SlotFails_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -104297,25 +104268,23 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userStatus = nil; params.userType = nil; params.credentialRule = nil; - [cluster - setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"User creation in the 0 slot fails Error: %@", err); + [cluster setUserWithParams:params + completionHandler:^(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; } CHIP_ERROR TestUserCreationInTheOutOfBoundsSlotFails_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -104326,118 +104295,114 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userStatus = nil; params.userType = nil; params.credentialRule = nil; - [cluster - setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"User creation in the out-of-bounds slot fails Error: %@", err); + [cluster setUserWithParams:params + completionHandler:^(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; } CHIP_ERROR TestClearFirstUser_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear first user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadClearedUserAndVerifyItIsAvailable_33() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read cleared user and verify it is available Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewUserInTheClearedSlot_34() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -104449,302 +104414,292 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create new user in the cleared slot Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheUserInThePreviouslyClearedSlotAndVerifyItsFields_35() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestClearUserWithIndex0Fails_36() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster - clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear user with index 0 fails Error: %@", err); + [cluster clearUserWithParams:params + completionHandler:^(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; } CHIP_ERROR TestClearUserWithOutOfBoundsIndexFails_37() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; - [cluster - clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear user with out-of-bounds index fails Error: %@", err); + [cluster clearUserWithParams:params + completionHandler:^(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; } CHIP_ERROR TestClearAllUsers_38() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear all users Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadFirstClearedUserAndVerifyItIsAvailable_39() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read first cleared user and verify it is available Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadLastClearedUserAndVerifyItIsAvailable_40() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NumberOfTotalUsersSupported copy]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read last cleared user and verify it is available Error: %@", err); + completionHandler:^(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; } @@ -104752,35 +104707,34 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestGetNumberOfSupportedPinCredentialsAndVerifyDefaultValue_41() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get number of supported PIN credentials and verify default value Error: %@", err); + [cluster + readAttributeNumberOfPINUsersSupportedWithCompletionHandler:^(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; } CHIP_ERROR TestCheckThatPinCredentialDoesNotExist_42() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -104789,48 +104743,47 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Check that PIN credential does not exist Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestReadingPinCredentialWithIndex0ReturnsNoCredential_43() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -104839,48 +104792,47 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Reading PIN credential with index 0 returns no credential Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestReadingPinCredentialWithOutOfBoundsIndexReturnsNoCredential_44() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -104889,50 +104841,48 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfPINUsersSupported unsignedShortValue] + 1U]; - [cluster - getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Reading PIN credential with out-of-bounds index returns no credential Error: %@", err); + [cluster getCredentialStatusWithParams:params + completionHandler:^( + 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; } CHIP_ERROR TestVerifyThatAUserWithUserStatus0CannotBeAddedViaSetCredential_45() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -104947,38 +104897,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify that a user with UserStatus = 0 cannot be added via SetCredential Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatAUserWithUserStatus2CannotBeAddedViaSetCredential_46() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -104993,38 +104942,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify that a user with UserStatus = 2 cannot be added via SetCredential Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewPinCredentialAndUser_47() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -105039,121 +104987,119 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedUser_48() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestVerifyCreatedPinCredential_49() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -105162,51 +105108,50 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created PIN credential Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateNewPinCredentialAndUserWithIndex0Fails_50() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -105221,38 +105166,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and user with index 0 fails Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewPinCredentialAndUserWithOutOfBoundsIndexFails_51() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -105268,28 +105212,28 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and user with out-of-bounds index fails Error: %@", err); + completionHandler:^(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; } @@ -105297,35 +105241,34 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestGetNumberOfSupportedRfidCredentialsAndVerifyDefaultValue_52() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get number of supported RFID credentials and verify default value Error: %@", err); + [cluster + readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:^(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; } CHIP_ERROR TestReadingRfidCredentialWithIndex0ReturnsNoCredentialDuplicateWithBugWorkaround_53() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -105334,45 +105277,44 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Reading RFID credential with index 0 returns no credential duplicate with bug " - @"workaround Error: %@", - err); + completionHandler:^( + 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; } CHIP_ERROR TestReadingRfidCredentialWithOutOfBoundsIndexReturnsNoCredential_54() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -105381,50 +105323,48 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfRFIDUsersSupported unsignedShortValue] + 1U]; - [cluster - getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Reading RFID credential with out-of-bounds index returns no credential Error: %@", err); + [cluster getCredentialStatusWithParams:params + completionHandler:^( + 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; } CHIP_ERROR TestCheckThatRfidCredentialDoesNotExist_55() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -105433,48 +105373,47 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Check that RFID credential does not exist Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateNewRfidCredentialAndAddItToExistingUser_56() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -105489,177 +105428,174 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential and add it to existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyModifiedUser_57() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify modified user Error: %@", err); + 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(); + }]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + return CHIP_NO_ERROR; + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + CHIP_ERROR TestVerifyCreatedCredential_58() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); - } + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.credential = [[MTRDoorLockClusterDlCredential alloc] init]; + ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; + ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + [cluster getCredentialStatusWithParams:params + completionHandler:^( + MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify created credential Error: %@", err); - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - 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.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; - } - - CHIP_ERROR TestVerifyCreatedCredential_58() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[MTRDoorLockClusterDlCredential alloc] init]; - ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; - ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; - - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created credential Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - 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.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; } CHIP_ERROR TestCreateNewRfidCredentialAndUserWithIndex0Fails_59() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -105674,38 +105610,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential and user with index 0 fails Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewRfidCredentialAndUserWithOutOfBoundsIndexFails_60() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -105721,37 +105656,36 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential and user with out-of-bounds index fails Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewCredentialAndTryToAddItTo0User_61() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -105766,38 +105700,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new credential and try to add it to 0 user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewCredentialAndTryToAddItToOutOfBoundsUser_62() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -105812,38 +105745,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new credential and try to add it to out-of-bounds user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewPinWithTooShortData_63() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -105858,38 +105790,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN with too short data Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewPinWithTooLongData_64() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -105904,38 +105835,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN with too long data Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewRfidWithTooShortData_65() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -105950,38 +105880,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID with too short data Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewPinWithProgrammingUserTypeFails_66() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -105996,38 +105925,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:3U]; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN with Programming user type fails Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewRfidWithTooShortData_67() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -106042,38 +105970,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID with too short data Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewPinCredentialWithDataTheWouldCauseDuplicate_68() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -106088,38 +106015,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential with data the would cause duplicate Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewRfidCredentialWithDataTheWouldCauseDuplicate_69() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -106134,38 +106060,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential with data the would cause duplicate Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestModifyCredentialDataOfExistingPinCredential_70() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -106180,38 +106105,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Modify credentialData of existing PIN credential Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatCredentialWasChangedByCreatingNewCredentialWithOldData_71() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -106226,39 +106150,38 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify that credential was changed by creating new credential with old data Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatCredentialWasChangedByCreatingNewCredentialWithNewData_72() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -106273,38 +106196,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify that credential was changed by creating new credential with new data Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewRfidCredentialAndAddItToExistingUser_73() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -106319,129 +106241,128 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential and add it to existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyModifiedUser_74() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify modified user Error: %@", err); + [cluster + getUserWithParams:params + completionHandler:^(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; } CHIP_ERROR TestCreateNewRfidCredentialAndAddItToExistingUser_75() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -106456,133 +106377,132 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential and add it to existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyModifiedUser_76() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify modified user Error: %@", err); + [cluster + getUserWithParams:params + completionHandler:^(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; } CHIP_ERROR TestClearFirstPinCredential_77() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -106591,22 +106511,21 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear first PIN credential Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackTheCredentialAndMakeSureItIsDeleted_78() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -106615,140 +106534,139 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Read back the credential and make sure it is deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestReadTheUserBackAndMakeSurePinCredentialIsDeleted_79() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and make sure PIN credential is deleted Error: %@", err); + [cluster + getUserWithParams:params + completionHandler:^(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; } CHIP_ERROR TestClearTheSecondPinCredential_80() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -106757,22 +106675,21 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear the second PIN credential Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackTheCredentialAndMakeSureItIsDeleted_81() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -106781,120 +106698,118 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Read back the credential and make sure it is deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestReadTheUserBackAndMakeSureRelatedUserIsDeleted_82() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and make sure related user is deleted Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewRfidCredentialWithUser_83() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -106909,39 +106824,38 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential with user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestClearAllTheRfidCredentials_84() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -106950,22 +106864,21 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear all the RFID credentials Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackTheFistRfidCredentialAndMakeSureItIsDeleted_85() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -106974,49 +106887,48 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - 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)); + completionHandler:^( + MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read back the fist 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(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - NextTest(); - }]; + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestReadBackTheSecondRfidCredentialAndMakeSureItIsDeleted_86() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -107025,49 +106937,48 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Read back the second RFID credential and make sure it is deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestReadBackTheThirdRfidCredentialAndMakeSureItIsDeleted_87() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -107076,203 +106987,199 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:4U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Read back the third RFID credential and make sure it is deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestReadTheUserRelatedWithFirstRfidBackAndMakeSureItHasOnlyPinCredential_88() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheUserRelatedWithSecondRfidBackAndMakeSureItIsDeleted_89() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user related with second RFID back and make sure it is deleted Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewPinCredentialWithUser_90() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -107287,39 +107194,38 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential with user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewRfidCredentialWithUser_91() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -107334,39 +107240,38 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential with user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateAnotherRfidCredentialWithUser_92() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -107381,60 +107286,58 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create another RFID credential with user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestClearAllTheCredentials_93() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; params.credential = nil; [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear all the credentials Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadBackTheFirstPinCredentialAndMakeSureItIsDeleted_94() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -107443,48 +107346,47 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Read back the first PIN credential and make sure it is deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestReadBackTheFirstRfidCredentialAndMakeSureItIsDeleted_95() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -107493,48 +107395,47 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Read back the first RFID credential and make sure it is deleted Error: %@", err); + 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)); + 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; } CHIP_ERROR TestReadBackTheSecondPinCredentialAndMakeSureItIsDeleted_96() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -107543,332 +107444,327 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:6U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Read back the second PIN credential and make sure it is deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestReadTheUserRelatedWithFirstPinBackAndMakeSureItIsDeleted_97() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user related with first PIN back and make sure it is deleted Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheUserRelatedWithFirstRfidBackAndMakeSureItIsDeleted_98() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user related with first RFID back and make sure it is deleted Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheUserRelatedWithSecondPinBackAndMakeSureItIsDeleted_99() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user related with second PIN back and make sure it is deleted Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheUserRelatedWithLastRfidBackAndMakeSureItIsDeleted_100() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:4U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user related with last RFID back and make sure it is deleted Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewProgrammingPinCredentialWithInvalidIndex_101() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -107883,37 +107779,36 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new Programming PIN credential with invalid index Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewProgrammingPinCredentialWithValidIndex_102() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -107928,120 +107823,118 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new Programming PIN credential with valid index Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedUser_103() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestVerifyCreatedProgrammingPinCredential_104() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -108050,51 +107943,50 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created programming PIN credential Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestModifyTheProgrammingPinCredential_105() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -108109,37 +108001,36 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Modify the Programming PIN credential Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestClearingProgrammingPinFails_106() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -108147,26 +108038,25 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0U]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clearing Programming PIN fails Error: %@", err); + [cluster + clearCredentialWithParams:params + completionHandler:^(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; } CHIP_ERROR TestClearingProgrammingPinWithInvalidIndexFails_107() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -108174,26 +108064,25 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0U]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clearing Programming PIN with invalid index fails Error: %@", err); + [cluster + clearCredentialWithParams:params + completionHandler:^(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; } CHIP_ERROR TestClearingPinCredentialWithZeroIndexFails_108() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -108201,26 +108090,25 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clearing PIN credential with zero index fails Error: %@", err); + [cluster + clearCredentialWithParams:params + completionHandler:^(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; } CHIP_ERROR TestClearingPinCredentialWithOutOfBoundIndexFails_109() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -108229,26 +108117,25 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfPINUsersSupported unsignedShortValue] + 1U]; - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clearing PIN credential with out-of-bound index fails Error: %@", err); + [cluster + clearCredentialWithParams:params + completionHandler:^(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; } CHIP_ERROR TestClearingRfidCredentialWithZeroIndexFails_110() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -108256,26 +108143,25 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clearing RFID credential with zero index fails Error: %@", err); + [cluster + clearCredentialWithParams:params + completionHandler:^(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; } CHIP_ERROR TestClearingRfidCredentialWithOutOfBoundIndexFails_111() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -108284,118 +108170,115 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfRFIDUsersSupported unsignedShortValue] + 1U]; - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clearing RFID credential with out-of-bound index fails Error: %@", err); + [cluster + clearCredentialWithParams:params + completionHandler:^(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; } CHIP_ERROR TestClearTheProgrammingPinUser_112() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear the Programming PIN user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestMakeSureProgrammingPinUserIsDeleted_113() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure Programming PIN user is deleted Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestMakeSureProgrammingPinCredentialIsDeleted_114() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -108404,48 +108287,47 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure programming PIN credential is deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateNewPinCredentialAndUser_115() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -108460,39 +108342,38 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateSecondPinCredentialAndAddItToExistingUser_116() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -108507,38 +108388,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create second PIN credential and add it to existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateThirdPinCredentialAndAddItToExistingUser_117() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -108553,38 +108433,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create third PIN credential and add it to existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateFourthPinCredentialAndAddItToExistingUser_118() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -108599,38 +108478,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create fourth PIN credential and add it to existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateFifthPinCredentialAndAddItToExistingUser_119() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -108645,38 +108523,37 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create fifth PIN credential and add it to existing user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestTryToCreateSixthPinCredentialAndMakeSureItFails_120() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -108691,50 +108568,49 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Try to create sixth PIN credential and make sure it fails Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestFinalCleanUp_121() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Final clean-up Error: %@", err); + completionHandler:^(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; } @@ -109079,7 +108955,6 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -109087,32 +108962,30 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestTryToUnlockTheDoorWithoutPin_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door without PIN Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToUnlocked_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletionHandler:^(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)); @@ -109131,32 +109004,30 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestTryToLockTheDoorWithoutAPin_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; [cluster lockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to lock the door without a PIN Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToLocked_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletionHandler:^(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)); @@ -109175,9 +109046,8 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestCreateNewPinCredentialAndLockUnlockUser_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -109192,89 +109062,85 @@ class DL_LockUnlock : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSetTheWrongCodeEntryLimitToBigValueSoThatWeCanTestIncorrectPinEntry_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:20U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Set the WrongCodeEntryLimit to big value so that we can test " - @"incorrect PIN entry Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestTryToUnlockTheDoorWithInvalidPin_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"000000" length:6]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with invalid PIN Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToLocked_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletionHandler:^(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)); @@ -109293,33 +109159,31 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestTryToUnlockTheDoorWithValidPin_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with valid PIN Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToUnlocked_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletionHandler:^(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)); @@ -109338,36 +109202,32 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestTryToLockTheDoorWithInvalidPin_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"000000" length:6]; - [cluster - lockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to lock the door with invalid PIN Error: %@", err); + [cluster lockDoorWithParams:params + completionHandler:^(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; } CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToUnlocked_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletionHandler:^(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)); @@ -109386,33 +109246,31 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestTryToLockTheDoorWithValidPin_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster lockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to lock the door with valid PIN Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToLocked_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletionHandler:^(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)); @@ -109431,215 +109289,199 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestSetOperatingModeToNoRemoteLockUnlock_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operatingModeArgument; operatingModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeOperatingModeWithValue:operatingModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Set OperatingMode to NoRemoteLockUnlock Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestTryToUnlockTheDoorWhenOperatingModeIsNoRemoteLockUnlock_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door when OperatingMode is NoRemoteLockUnlock Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestSetOperatingModeToNormal_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operatingModeArgument; operatingModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOperatingModeWithValue:operatingModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Set OperatingMode to Normal Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheLockoutTimeout_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the lockout timeout Error: %@", err); + [cluster + readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:^(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; } CHIP_ERROR TestSetTheWrongCodeEntryLimitToSmallValueSoWeCanTestLockout_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Set the WrongCodeEntryLimit to small value so we can test lockout Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestTryToUnlockTheDoorWithInvalidPinForTheFirstTime_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"000000" length:6]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with invalid PIN for the first time Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestTryToUnlockTheDoorWithInvalidPinForTheSecondTime_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"000000" length:6]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with invalid PIN for the second time Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestTryToUnlockTheDoorWithInvalidPinForTheThirdTime_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"000000" length:6]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with invalid PIN for the third time Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestTryToUnlockTheDoorWithValidPinAndMakeSureItFailsDueToLockout_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with valid PIN and make sure it fails due to lockout Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWaitForTheLockoutToEnd_24() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); @@ -109647,33 +109489,31 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestTryToUnlockTheDoorWithValidPinAndMakeSureItSucceeds_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with valid PIN and make sure it succeeds Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToUnlocked_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletionHandler:^(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)); @@ -109692,30 +109532,28 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestLockTheDoorBackPriorToNextTests_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster lockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Lock the door back prior to next tests Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateADisabledUserAndCredential_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -109730,66 +109568,63 @@ class DL_LockUnlock : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create a disabled user and credential Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestTryToUnlockTheDoorWithDisabledUserPin_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"654321" length:6]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with disabled user PIN Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToLocked_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletionHandler:^(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)); @@ -109808,33 +109643,31 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestUnlockTheDoorWithEnabledUserPin_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Unlock the door with enabled user PIN Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToUnlocked_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletionHandler:^(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)); @@ -109853,36 +109686,32 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestTryToLockTheDoorWithDisabledUserPin_33() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"654321" length:6]; - [cluster - lockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Try to lock the door with disabled user PIN Error: %@", err); + [cluster lockDoorWithParams:params + completionHandler:^(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; } CHIP_ERROR TestVerifyThatLockStateAttributeValueStaysUnlocked_34() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletionHandler:^(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)); @@ -109901,33 +109730,31 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestLockTheDoorWithEnabledUserPin_35() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster lockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Lock the door with enabled user PIN Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToLocked_36() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletionHandler:^(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)); @@ -109946,21 +109773,20 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestCleanAllTheUsersAndCredentials_37() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clean all the users and credentials Error: %@", err); + completionHandler:^(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; } @@ -110934,7 +110760,6 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -110942,9 +110767,8 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateNewPinCredentialAndScheduleUser_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -110959,30 +110783,30 @@ class DL_Schedules : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and schedule user Error: %@", err); + completionHandler:^(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; } @@ -110990,26 +110814,26 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetNumberOfSupportedUsers_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get number of supported users Error: %@", err); + [cluster + readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^(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; } @@ -111017,12 +110841,11 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetMaxNumberOfWeekDaySchedulesForUserAndVerifyDefaultValue_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( + [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Get Max number of Week Day schedules for user and verify default value Error: %@", err); @@ -111045,12 +110868,11 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetMaxNumberOfYearDaySchedulesForUserAndVerifyDefaultValue_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( + [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Get Max number of Year Day schedules for user and verify default value Error: %@", err); @@ -111073,36 +110895,34 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetMaxNumberOfHolidaySchedulesAndVerifyDefaultValue_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get Max number of Holiday schedules and verify default value Error: %@", err); + [cluster readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:^( + 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; } CHIP_ERROR TestCreateWeekDayScheduleWith0Index_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111113,26 +110933,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleWithOutOfBoundsIndex_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111143,26 +110962,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleWith0UserIndex_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111173,26 +110991,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleWithOutOfBoundsUserIndex_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111203,26 +111020,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleForNonExistingUser_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111233,26 +111049,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleWith0DaysMask_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111263,26 +111078,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleForSundayAndMonday_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111293,26 +111107,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleForSundayWednesdayAndSaturday_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111323,26 +111136,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleWithInvalidStartHour_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111353,26 +111165,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleWithInvalidStartMinute_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111383,26 +111194,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:60U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleWithInvalidEndHour_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111413,26 +111223,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:24U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleWithInvalidEndMinute_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111443,26 +111252,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:60U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleWithStartHourLaterThatEndHour_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111473,26 +111281,25 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateWeekDayScheduleWithStartMinuteLaterThatEndMinuteWhenHoursAreEqual_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -111503,258 +111310,250 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:50U]; params.endHour = [NSNumber numberWithUnsignedChar:15U]; params.endMinute = [NSNumber numberWithUnsignedChar:49U]; - [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); + [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); - 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; } CHIP_ERROR TestMakeSureThatPreviousOperationsDidNotCreateASchedule_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that previous operations did not create a schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestGetWeekDayScheduleWith0Index_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Week Day schedule with 0 index Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestGetWeekDayScheduleWithOutOfBoundsIndex_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Week Day schedule with out-of-bounds index Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestGetWeekDayScheduleWith0UserIndex_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Week Day schedule with 0 user index Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestGetWeekDayScheduleWithOutOfBoundsUserIndex_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Week Day schedule with out-of-bounds user index Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestGetWeekDayScheduleWithNonExistingUserIndex_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Week Day schedule with non-existing user index Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateYearDayScheduleWith0Index_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -111762,26 +111561,25 @@ class DL_Schedules : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateYearDayScheduleWithOutOfBoundsIndex_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -111789,26 +111587,25 @@ class DL_Schedules : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateYearDayScheduleWith0UserIndex_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -111816,26 +111613,25 @@ class DL_Schedules : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:0U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateYearDayScheduleWithOutOfBoundsUserIndex_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -111843,26 +111639,25 @@ 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 - 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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateYearDayScheduleForNonExistingUser_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -111870,26 +111665,25 @@ class DL_Schedules : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:2U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - [cluster setYearDayScheduleWithParams:params - completion:^(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(); - }]; + [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; } CHIP_ERROR TestCreateYearDayScheduleWithStartHourLaterThatEndHour_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -111897,256 +111691,249 @@ class DL_Schedules : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345688UL]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestMakeSureThatPreviousOperationsDidNotCreateASchedule_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that previous operations did not create a schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestGetYearDayScheduleWith0Index_33() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Year Day schedule with 0 index Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestGetYearDayScheduleWithOutOfBoundsIndex_34() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Year Day schedule with out-of-bounds index Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestGetYearDayScheduleWith0UserIndex_35() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Year Day schedule with 0 user index Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestGetYearDayScheduleWithOutOfBoundsUserIndex_36() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Year Day schedule with out-of-bounds user index Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestGetYearDayScheduleWithNonExistingUserIndex_37() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Year Day schedule with non-existing user index Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateHolidayScheduleWith0Index_38() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; @@ -112154,26 +111941,25 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateHolidayScheduleWithOutOfBoundsIndex_39() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; @@ -112181,26 +111967,25 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateHolidayScheduleWithStartHourLaterThatEndHour_40() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; @@ -112208,26 +111993,25 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345688UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateHolidayScheduleWithInvalidOperatingMode_41() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; @@ -112235,123 +112019,119 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:5U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestMakeSureThatPreviousOperationsDidNotCreateASchedule_42() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that previous operations did not create a schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestGetHolidayScheduleWith0Index_43() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:0U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Holiday schedule with 0 index Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestGetHolidayScheduleWithOutOfBoundsIndex_44() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfHolidaySchedulesSupported unsignedCharValue] + 1U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Holiday schedule with out-of-bounds index Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateHolidayScheduleWithValidParameters_45() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; @@ -112360,69 +112140,67 @@ class DL_Schedules : public TestCommandBridge { params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; [cluster setHolidayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create Holiday schedule with valid parameters Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedSchedule_46() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateWeekDayScheduleWithValidParameters_47() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -112434,85 +112212,83 @@ class DL_Schedules : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with valid parameters Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedSchedule_48() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateYearDayScheduleWithValidParameters_49() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -112521,854 +112297,819 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; [cluster setYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule with valid parameters Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedSchedule_50() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestClearWeekDayScheduleWith0Index_51() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestClearWeekDayScheduleWithOutOfBoundsIndex_52() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestClearWeekDayScheduleWith0UserIndex_53() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestClearWeekDayScheduleWithOutOfBoundsUserIndex_54() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestClearWeekDayScheduleWithNonExistingUser_55() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestMakeSureThatWeekDayScheduleWasNotDeleted_56() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that week day schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatYearDayScheduleWasNotDeleted_57() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that year day schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatHolidayScheduleWasNotDeleted_58() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that holiday schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestClearYearDayScheduleWith0Index_59() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestClearYearDayScheduleWithOutOfBoundsIndex_60() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestClearYearDayScheduleWith0UserIndex_61() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestClearYearDayScheduleWithOutOfBoundsUserIndex_62() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestClearYearDayScheduleWithNonExistingUser_63() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestMakeSureThatWeekDayScheduleWasNotDeleted_64() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that week day schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatYearDayScheduleWasNotDeleted_65() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that year day schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatHolidayScheduleWasNotDeleted_66() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that holiday schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestClearHolidayScheduleWith0Index_67() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestClearHolidayScheduleWithOutOfBoundsIndex_68() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestMakeSureThatWeekDayScheduleWasNotDeleted_69() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that week day schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatYearDayScheduleWasNotDeleted_70() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that year day schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatHolidayScheduleWasNotDeleted_71() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that holiday schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateAnotherWeekDayScheduleWithValidParameters_72() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -113380,85 +113121,83 @@ class DL_Schedules : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:23U]; params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create another Week Day schedule with valid parameters Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedWeekDaySchedule_73() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created week day schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateAnotherYearDayScheduleWithValidParameters_74() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -113467,70 +113206,68 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; [cluster setYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create another Year Day schedule with valid parameters Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedYearDaySchedule_75() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created year day schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateAnotherHolidayScheduleWithValidParameters_76() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; @@ -113539,379 +113276,369 @@ class DL_Schedules : public TestCommandBridge { params.localEndTime = [NSNumber numberWithUnsignedInt:1234567UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:1U]; [cluster setHolidayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create another Holiday schedule with valid parameters Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedHolidaySchedule_77() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created holiday schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestClearASingleWeekDayScheduleForTheFirstUser_78() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear a single week day schedule for the first user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyClearedWeekDaySchedule_79() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify cleared week day schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestClearAllRemainingWeekDaySchedulesForTheFirstUser_80() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:254U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear all remaining week day schedules for the first user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyClearedWeekSchedule_81() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify cleared week schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatFirstYearDayScheduleWasNotDeleted_82() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that first year day schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatSecondYearDayScheduleWasNotDeleted_83() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that second year day schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatFirstHolidayScheduleWasNotDeleted_84() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that first holiday schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatSecondHolidayScheduleWasNotDeleted_85() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that second holiday schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateAnotherWeekDayScheduleWithValidParameters_86() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -113923,227 +113650,220 @@ class DL_Schedules : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:23U]; params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create another Week Day schedule with valid parameters Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestClearASingleYearDayScheduleForTheFirstUser_87() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear a single year day schedule for the first user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyClearedYearDaySchedule_88() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify cleared year day schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestClearAllRemainingYearSchedulesForTheFirstUser_89() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:254U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear all remaining year schedules for the first user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyThatSecondYearDayScheduleWasCleared_90() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify that second year day schedule was cleared Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestVerifyCreatedWeekDaySchedule_91() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created week day schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestClearAllRemainingWeekDaySchedulesForTheFirstUser_92() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:254U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear all remaining week day schedules for the first user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateNewUserWithoutCredentialSoWeCanAddMoreSchedulesToIt_93() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -114155,22 +113875,21 @@ class DL_Schedules : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create new user without credential so we can add more schedules to it Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateWeekDayScheduleWithValidParametersForFirstUser_94() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -114182,85 +113901,83 @@ class DL_Schedules : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:23U]; params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with valid parameters for first user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedWeekDayScheduleForFirstUser_95() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created week day schedule for first user Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateYearDayScheduleForFirstUser_96() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -114269,70 +113986,68 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; [cluster setYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule for first user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedYearDayScheduleForFirst_97() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created year day schedule for first Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateWeekDayScheduleWithValidParametersForSecondUser_98() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -114344,85 +114059,83 @@ class DL_Schedules : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:23U]; params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with valid parameters for second user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedWeekDayScheduleForFirstUser_99() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created week day schedule for first user Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateYearDayScheduleForSecondUser_100() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -114431,337 +114144,328 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:55555UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:7777777UL]; [cluster setYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule for second user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedYearDayScheduleForFirst_101() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created year day schedule for first Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCleanupTheUser_102() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestMakeSureClearingFirstUserAlsoClearedWeekDaySchedules_103() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure clearing first user also cleared week day schedules Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureClearingFirstUserAlsoClearedYearDaySchedules_104() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure clearing first user also cleared year day schedules Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureClearingSecondUserAlsoClearedWeekDaySchedules_105() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure clearing second user also cleared week day schedules Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureClearingSecondUserAlsoClearedYearDaySchedules_106() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure clearing second user also cleared year day schedules Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatFirstHolidayScheduleWasNotDeleted_107() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that first holiday schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatSecondHolidayScheduleWasNotDeleted_108() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that second holiday schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateAnotherHolidayScheduleAtTheLastSlot_109() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; @@ -114770,70 +114474,67 @@ class DL_Schedules : public TestCommandBridge { params.localEndTime = [NSNumber numberWithUnsignedInt:100UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:4U]; [cluster setHolidayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create another Holiday schedule at the last slot Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedHolidaySchedule_110() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NumberOfHolidaySchedulesSupported copy]; - [cluster - getHolidayScheduleWithParams:params - completion:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify Created Holiday Schedule Error: %@", err); + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + 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; } CHIP_ERROR TestCreateNewPinCredentialAndScheduleUser_111() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -114848,39 +114549,38 @@ class DL_Schedules : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and schedule user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateWeekDayScheduleForFirstUser_112() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -114892,22 +114592,21 @@ class DL_Schedules : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:23U]; params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule for first user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCreateYearDayScheduleForFirstUser_113() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -114916,522 +114615,507 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; [cluster setYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule for first user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestClearASingleHolidaySchedule_114() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster clearHolidayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear a single holiday schedule Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestMakeSureThatFirstHolidayScheduleWasNotDeleted_115() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that first holiday schedule was not deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatSecondHolidayScheduleWasDeleted_116() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that second holiday schedule was deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatThirdHolidayScheduleWasNotDeleted_117() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NumberOfHolidaySchedulesSupported copy]; - [cluster - getHolidayScheduleWithParams:params - completion:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that third holiday schedule was not deleted Error: %@", err); + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureClearingHolidayScheduleDidNotClearWeekDaySchedule_118() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure clearing holiday schedule did not clear week day schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureClearingHolidayScheduleDidNotClearYearDaySchedule_119() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure clearing holiday schedule did not clear year day schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestClearAllRemainingHolidaySchedules_120() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:254U]; [cluster clearHolidayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear all remaining holiday schedules Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestMakeSureThatFirstHolidayIsStillDeleted_121() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that first holiday is still deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatSecondHolidayScheduleWasDeleted_122() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that second holiday schedule was deleted Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureThatThirdHolidayScheduleWasNotDeleted_123() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NumberOfHolidaySchedulesSupported copy]; - [cluster - getHolidayScheduleWithParams:params - completion:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that third holiday schedule was not deleted Error: %@", err); + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureClearingHolidayScheduleDidNotClearWeekDaySchedule_124() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure clearing holiday schedule did not clear week day schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestMakeSureClearingHolidayScheduleDidNotClearYearDaySchedule_125() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure clearing holiday schedule did not clear year day schedule Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestFinalCleanup_126() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Final Cleanup Error: %@", err); + completionHandler:^(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; } @@ -115982,7 +115666,6 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -115990,12 +115673,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116014,12 +115696,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116038,12 +115719,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDrlksf00pinEnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -116057,12 +115737,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDrlksf01ridEnsureFeaturemapHasTheCorrectBitSet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -116076,12 +115755,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDrlksf02fgpEnsureFeaturemapHasTheCorrectBitSet_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -116095,12 +115773,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDrlksf04wdschEnsureFeaturemapHasTheCorrectBitSet_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -116114,12 +115791,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDrlksf05dpsEnsureFeaturemapHasTheCorrectBitSet_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -116133,12 +115809,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDrlksf06faceEnsureFeaturemapHasTheCorrectBitSet_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -116152,12 +115827,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDrlksf07cotaEnsureFeaturemapHasTheCorrectBitSet_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -116171,12 +115845,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDrlksf08usrEnsureFeaturemapHasTheCorrectBitSet_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -116190,12 +115863,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDRLKSF0aYDSCHEnsureFeaturemapHasTheCorrectBitSet_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -116209,12 +115881,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenDRLKSF0bHDSCHEnsureFeaturemapHasTheCorrectBitSet_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -116228,12 +115899,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116258,12 +115928,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentDRLKSF05AttributesInAttributeList_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -116279,12 +115948,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentDRLKSF08AttributesInAttributeList_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -116302,12 +115970,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentDRLKSF00AttributesInAttributeList_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -116325,12 +115992,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentDRLKSF01AttributesInAttributeList_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -116348,12 +116014,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentDRLKSF04AttributeInAttributeList_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -116369,12 +116034,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentDRLKSF0aAttributeInAttributeList_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -116390,12 +116054,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentDRLKSF0bAttributeInAttributeList_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -116411,12 +116074,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -116433,12 +116095,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(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)); @@ -116454,12 +116115,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeLanguageInAttributeList_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(Language) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116475,12 +116135,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeLEDSettingsInAttributeList_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(LEDSettings) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116496,12 +116155,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeAutoRelockTimeInAttributeList_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(AutoRelockTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116517,12 +116175,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeSoundVolumeInAttributeList_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(SoundVolume) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116538,12 +116195,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(DefaultConfigurationRegister) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116559,12 +116215,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(EnableLocalProgramming) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116580,12 +116235,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(EnableOneTouchLocking) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116601,12 +116255,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(EnableInsideStatusLED) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116622,12 +116275,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(EnablePrivacyModeButton) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116643,12 +116295,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_32() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(LocalProgrammingFeatures) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116664,12 +116315,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_33() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116686,12 +116336,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_34() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -116709,12 +116358,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF0aInAcceptedCommandList_35() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -116732,12 +116380,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF0bInAcceptedCommandList_36() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -116755,12 +116402,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_37() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -116781,12 +116427,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_38() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(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)); @@ -116802,12 +116447,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_39() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(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)); @@ -116823,12 +116467,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF0aInGeneratedCommandList_40() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(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)); @@ -116844,12 +116487,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF0bInGeneratedCommandList_41() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(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)); @@ -116865,12 +116507,11 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_42() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(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)); @@ -117251,7 +116892,6 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -117259,9 +116899,8 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { CHIP_ERROR TestCreateNewUser_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -117273,100 +116912,98 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create new user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheUserBackAndVerifyItsFields_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateNewPinCredentialAndLockUnlockUser_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -117381,38 +117018,37 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedPinCredential_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -117421,313 +117057,295 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created PIN credential Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:false]; [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value " - @"as False on the DUT Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:false]; - [cluster - writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes the RequirePINforRemoteOperation attribute value as False " + [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument + completionHandler:^(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; } CHIP_ERROR TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); + [cluster + readAttributeRequirePINforRemoteOperationWithCompletionHandler:^(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; } CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutPINCode_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; [cluster lockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT without PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithValidPINCode_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster lockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT with valid PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value " - @"as False on the DUT Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; - [cluster - writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes the RequirePINforRemoteOperation attribute value as False " + [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument + completionHandler:^(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; } CHIP_ERROR TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); + [cluster + readAttributeRequirePINforRemoteOperationWithCompletionHandler:^(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; } CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithValidPINCode_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster lockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT with valid PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutValidPINCode_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"645321" length:6]; - [cluster - lockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT without valid PINCode Error: %@", err); + [cluster lockDoorWithParams:params + completionHandler:^(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; } CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutAnyArgumentPINCode_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - [cluster - lockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT without any argument PINCode Error: %@", err); + [cluster lockDoorWithParams:params + completionHandler:^(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; } CHIP_ERROR TestThReadsTheWrongCodeEntryLimitAttributeFromTheDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWrongCodeEntryLimitWithCompletionHandler:^(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)); @@ -117741,7 +117359,6 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { CHIP_ERROR TestThSendsAnUnlockDoorCommandFromTheDutWithInvalidPINCodeRepeatThisStepPIXITDRLKWrongCodeEntryLimitTimesAndVerifyThatDutSendsFailureResponseToTheTh_17() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -117751,7 +117368,6 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { CHIP_ERROR TestThSendsAnUnlockDoorCommandFromUser1ToTheDutWithTheValidPINCodeAndVerifyTheDutResponse_18() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -117762,7 +117378,6 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForPIXITDRLKUserCodeTemporaryDisableTimeTHThenSendsAnUnlockDoorCommandFromUser1ToTheDutWithTheValidPINCode_19() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -117772,68 +117387,66 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAsBetween1And255OnTheDutAndVerifyThatTheDutSendsSuccessResponse_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAsBetween1And255OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - 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); + 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); - 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; } CHIP_ERROR TestThReadsTheUserCodeTemporaryDisableTimeAttributeFromTheDut_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the UserCodeTemporaryDisableTime attribute from the DUT Error: %@", err); + [cluster + readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:^(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; } @@ -117841,24 +117454,23 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { CHIP_ERROR TestThWritesUserCodeTemporaryDisableTimeAttributeValueAsBetween1And255OnTheDutAndVerifyThatTheDutSendsSuccessResponse_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id userCodeTemporaryDisableTimeArgument; userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; - [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); + [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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -117866,58 +117478,55 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { CHIP_ERROR TestThWritesUserCodeTemporaryDisableTimeAttributeValueAsBetween1And255OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id userCodeTemporaryDisableTimeArgument; userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; - [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); + [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); - 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; } CHIP_ERROR TestCleanTheCreatedUser_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clean the created user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCleanupTheCreatedCredential_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -117926,13 +117535,13 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created credential Error: %@", err); + completionHandler:^(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; } @@ -118398,7 +118007,6 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -118406,9 +118014,8 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { CHIP_ERROR TestCreateNewUser_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -118420,100 +118027,98 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create new user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheUserBackAndVerifyItsFields_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateNewPinCredentialAndLockUnlockUser_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -118528,38 +118133,37 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedPinCredential_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -118568,511 +118172,484 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created PIN credential Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:false]; [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value " - @"as False on the DUT Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:false]; - [cluster - writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes the RequirePINforRemoteOperation attribute value as False " + [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument + completionHandler:^(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; } CHIP_ERROR TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); + [cluster + readAttributeRequirePINforRemoteOperationWithCompletionHandler:^(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; } CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithoutPINCode_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT without PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithValidPINCode_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with valid PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value " - @"as False on the DUT Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; - [cluster - writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes the RequirePINforRemoteOperation attribute value as False " + [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument + completionHandler:^(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; } CHIP_ERROR TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); + [cluster + readAttributeRequirePINforRemoteOperationWithCompletionHandler:^(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; } CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithValidPINCode_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with valid PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithInvalidPINCode_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"1234568" length:7]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithoutPINCode_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT without PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyThatTheDutSendsSuccessResponse_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - 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); + 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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and " - @"verify DUT responds with UNSUPPORTED_WRITE Error: %@", - err); + completionHandler:^(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; } CHIP_ERROR TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyThatTheDutSendsSuccessResponse_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id userCodeTemporaryDisableTimeArgument; userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; - [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); + [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); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyThatTheDutSendsSuccessResponse_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id userCodeTemporaryDisableTimeArgument; userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; - [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); + [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); - 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; } CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithInvalidPINCode_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"1234568" length:7]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithInvalidPINCode_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"1234568" length:7]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithInvalidPINCode_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"1234568" length:7]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithInvalidPINCode_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"1234568" length:7]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsTheUserCodeTemporaryDisableTimeAttributeFromTheDutAndCheckAttributeIsTriggered_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the UserCodeTemporaryDisableTime attribute from the DUT and check attribute is triggered Error: %@", err); @@ -119091,136 +118668,121 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithValidPINCode_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with valid PINCode Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id autoRelockTimeArgument; autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:10UL]; - [cluster - writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes AutoRelockTime attribute value as 10 seconds on the DUT Error: %@", err); + [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument + completionHandler:^(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; } CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_27() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id autoRelockTimeArgument; autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; - [cluster - writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); + [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument + completionHandler:^(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; } CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id autoRelockTimeArgument; autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:10UL]; [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes AutoRelockTime attribute value as 10 seconds on the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id autoRelockTimeArgument; autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThReadsTheAutoRelockTimeAttributeFromTheDut_30() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAutoRelockTimeWithCompletionHandler:^(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)); @@ -119238,12 +118800,11 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { CHIP_ERROR TestThReadsTheAutoRelockTimeAttributeFromTheDut_31() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAutoRelockTimeWithCompletionHandler:^(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)); @@ -119261,7 +118822,6 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithValidPINCodeAndVerifyThatDutSendsSuccessResponseToTheTh_32() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -119271,7 +118831,6 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { CHIP_ERROR TestThReadsLockStateAttributeAfterAutoRelockTimeExpiresAndVerifyThatTheDutIsLocked_33() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -119281,30 +118840,28 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { CHIP_ERROR TestCleanupTheCreatedUser_34() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCleanTheCreatedCredential_35() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -119313,13 +118870,13 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clean the created credential Error: %@", err); + completionHandler:^(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; } @@ -119504,7 +119061,6 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -119512,9 +119068,8 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { CHIP_ERROR TestCreateNewUser_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -119526,100 +119081,98 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create new user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheUserBackAndVerifyItsFields_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestCreateNewPinCredentialAndLockUnlockUser_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -119634,38 +119187,37 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestVerifyCreatedPinCredential_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -119674,121 +119226,113 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created PIN credential Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id autoRelockTimeArgument; autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; - [cluster - writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); + [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument + completionHandler:^(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; } CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id autoRelockTimeArgument; autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsTheUnlockWithTimeoutArgumentValueAs60Seconds_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; params.timeout = [NSNumber numberWithUnsignedShort:60U]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockWithTimeoutWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the Unlock with Timeout argument value as 60 seconds Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWait60s_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 60000UL; return WaitForMs("alpha", value); @@ -119796,12 +119340,11 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { CHIP_ERROR TestThReadsLockStateAttribute_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads LockState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -119820,30 +119363,28 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { CHIP_ERROR TestCleanupTheCreatedUser_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCleanTheCreatedCredential_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -119852,13 +119393,13 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clean the created credential Error: %@", err); + completionHandler:^(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; } @@ -120051,7 +119592,6 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -120059,9 +119599,8 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { CHIP_ERROR TestCreateNewUser_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -120073,91 +119612,90 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create new user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheUserBackAndVerifyItsFields_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } @@ -120165,12 +119703,11 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { CHIP_ERROR TestThReadsNumberOfWeekDaySchedulesSupportedPerUserAttribute_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( + [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute Error: %@", err); @@ -120193,12 +119730,12 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NumberOfTotalUsers Supported attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -120217,9 +119754,8 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { CHIP_ERROR TestThSendSetWeekDayScheduleCommand_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -120231,22 +119767,21 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:16U]; params.endMinute = [NSNumber numberWithUnsignedChar:55U]; [cluster setWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendGetWeekDayScheduleCommandToDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; @@ -120254,67 +119789,65 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestThSendSetWeekDayScheduleCommand_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; @@ -120325,176 +119858,172 @@ 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 - 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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestThSendGetWeekDayScheduleCommandToDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestThSendsClearWeekDayScheduleCommandToDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Week Day Schedule Command to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsGetWeekDayScheduleCommandToDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Week Day Schedule Command to DUT Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCleanupTheCreatedUser_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); + completionHandler:^(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; } @@ -120749,7 +120278,6 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -120757,9 +120285,8 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { CHIP_ERROR TestCreateNewUser_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -120771,91 +120298,90 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create new user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheUserBackAndVerifyItsFields_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } @@ -120863,12 +120389,11 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { CHIP_ERROR TestThReadsNumberOfYearDaySchedulesSupportedPerUserAttribute_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( + [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NumberOfYearDay SchedulesSupportedPerUser attribute Error: %@", err); @@ -120891,12 +120416,12 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAttribute_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NumberOfTotalUsers Supported attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -120915,9 +120440,8 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { CHIP_ERROR TestThSendsSetYearDayScheduleCommandToDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -120926,76 +120450,74 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:960UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:1980UL]; [cluster setYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestThSendSetYearDayScheduleCommandToDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -121003,72 +120525,70 @@ 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 - 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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:15U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestCreateAUserWithUserIndexAs5_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -121080,137 +120600,133 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create a user with userIndex as 5 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NumberOfYearDaySchedulesSupportedPerUser copy]; params.userIndex = [NSNumber numberWithUnsignedShort:5U]; - [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + [cluster + getYearDayScheduleWithParams:params + completionHandler:^( + 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; } CHIP_ERROR TestThSendsClearYearDayScheduleToDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Year Day Schedule to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestThSendsSetYearDayScheduleCommandToDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; @@ -121219,136 +120735,131 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:1080UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:2100UL]; [cluster setYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestThSendsClearYearDayScheduleToDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; - [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(); - }]; + [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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestClearAYearDayScheduleForTheFirstUser_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear a year day schedule for the first user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCleanupTheCreatedUser_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); + completionHandler:^(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; } @@ -121643,7 +121154,6 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -121651,9 +121161,8 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { CHIP_ERROR TestCreateNewUserWithDefaultParameters_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -121665,91 +121174,90 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create new user with default parameters Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadTheUserBackAndVerifyItsFields_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } @@ -121757,12 +121265,12 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAttributeAndSavesForFutureUse_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^( + 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)); @@ -121781,9 +121289,8 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { CHIP_ERROR TestThSendsSetCredentialCommandToDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -121798,38 +121305,37 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsGetCredentialStatusCommand_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -121838,47 +121344,46 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestThSendsSetCredentialCommandToDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -121893,38 +121398,37 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:10U]; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsSetCredentialCommandToDut_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -121939,29 +121443,29 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); + completionHandler:^(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; } @@ -121969,7 +121473,6 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { CHIP_ERROR TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithStatusAsDuplicateOrOccupied_8() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -121980,7 +121483,6 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { CHIP_ERROR TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_9() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -121991,7 +121493,6 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { CHIP_ERROR TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_10() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); @@ -122001,9 +121502,8 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { CHIP_ERROR TestThSendsClearCredentialCommandToDut_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -122012,22 +121512,21 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Credential Command to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsGetCredentialStatusCommandToDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -122036,48 +121535,47 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command to DUT Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestThSendsSetUserCommandToDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; @@ -122089,22 +121587,21 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Set User Command to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsSetCredentialCommandToDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; @@ -122119,38 +121616,37 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsClearCredentialCommandToDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -122159,22 +121655,21 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Credential Command to DUT Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestThSendsGetCredentialStatusCommand_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -122183,48 +121678,47 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestThSendsGetCredentialStatusCommand_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; @@ -122233,48 +121727,47 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestThSendsClearCredentialCommandToDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; @@ -122282,59 +121775,57 @@ 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 - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Credential Command to DUT Error: %@", err); + [cluster + clearCredentialWithParams:params + completionHandler:^(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; } CHIP_ERROR TestCleanupTheFirstCreatedUser_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the first created user Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestCleanupTheSecondCreatedUser_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the second created user Error: %@", err); + completionHandler:^(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; } @@ -122600,7 +122091,6 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -122608,103 +122098,101 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestViewGroup0Invalid_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:0U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Group 0 (invalid) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestViewFirstGroupNotFound_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View First Group (not found) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestAddFirstGroupNoKeys_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; params.groupName = @"Group #1"; [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add First Group (no keys) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestAddKeySet_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; @@ -122727,22 +122215,23 @@ class TestGroupsCluster : public TestCommandBridge { [NSNumber numberWithUnsignedLongLong:1110002ULL]; [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Add KeySet Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestWriteGroupKeys_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id groupKeyMapArgument; @@ -122761,121 +122250,117 @@ class TestGroupsCluster : public TestCommandBridge { groupKeyMapArgument = temp_0; } [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestAddFirstGroupNew_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; params.groupName = @"Group #1"; [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add First Group (new) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestViewFirstGroupNew_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View First Group (new) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestViewSecondGroupNotFound_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Second Group (not found) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestGetGroupMembership1All_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterGetGroupMembershipParams alloc] init]; @@ -122884,205 +122369,199 @@ class TestGroupsCluster : public TestCommandBridge { params.groupList = temp_0; } [cluster getGroupMembershipWithParams:params - completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Group Membership 1 (all) Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestAddSecondGroupNew_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; params.groupName = @"Group #2"; [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Second Group (new) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestViewSecondGroupNew_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Second Group (new) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestViewGroup3NotFound_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:32767U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Group 3 (not found) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestViewFirstGroupExisting_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View First Group (existing) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestViewSecondGroupExisting_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Second Group (existing) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestGetGroupMembership2_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterGetGroupMembershipParams alloc] init]; @@ -123094,194 +122573,188 @@ class TestGroupsCluster : public TestCommandBridge { params.groupList = temp_0; } [cluster getGroupMembershipWithParams:params - completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Group Membership 2 Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestRemoveGroup0Invalid_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:0U]; [cluster removeGroupWithParams:params - completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove Group 0 (invalid) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestRemoveGroup4NotFound_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:260U]; [cluster removeGroupWithParams:params - completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove Group 4 (not found) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestRemoveSecondGroupExisting_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; [cluster removeGroupWithParams:params - completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove Second Group (existing) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestViewFirstGroupNotRemoved_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View First Group (not removed) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestViewSecondGroupRemoved_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Second Group (removed) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestGetGroupMembership3_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterGetGroupMembershipParams alloc] init]; @@ -123294,37 +122767,36 @@ class TestGroupsCluster : public TestCommandBridge { params.groupList = temp_0; } [cluster getGroupMembershipWithParams:params - completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Group Membership 3 Error: %@", err); + completionHandler:^( + 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; } CHIP_ERROR TestRemoveAll_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { + [cluster removeAllGroupsWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Remove All Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -123337,102 +122809,98 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestViewFirstGroupRemoved_23() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View First Group (removed) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestViewSecondGroupStillRemoved_24() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Second Group (still removed) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestViewGroup3Removed_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:32767U]; [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Group 3 (removed) Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestGetGroupMembership4_26() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterGetGroupMembershipParams alloc] init]; @@ -123446,24 +122914,24 @@ class TestGroupsCluster : public TestCommandBridge { params.groupList = temp_0; } [cluster getGroupMembershipWithParams:params - completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Group Membership 4 Error: %@", err); + completionHandler:^( + 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; } @@ -123694,7 +123162,6 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -123702,12 +123169,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestReadMaxGroupsPerFabric_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxGroupsPerFabricWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read maxGroupsPerFabric Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -123722,12 +123190,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestReadMaxGroupKeysPerFabric_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxGroupKeysPerFabricWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read maxGroupKeysPerFabric Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -123742,9 +123211,10 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestKeySetWrite1_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; @@ -123767,22 +123237,23 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { [NSNumber numberWithUnsignedLongLong:1110002ULL]; [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 1 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestKeySetWrite2_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; @@ -123805,71 +123276,73 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { [NSNumber numberWithUnsignedLongLong:2110002ULL]; [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 2 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestKeySetRead_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; [cluster keySetReadWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestWriteGroupKeysInvalid_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id groupKeyMapArgument; @@ -123883,26 +123356,26 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { groupKeyMapArgument = temp_0; } [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestWriteGroupKeysTooMany_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id groupKeyMapArgument; @@ -123931,26 +123404,26 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { groupKeyMapArgument = temp_0; } [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestWriteGroupKeys_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id groupKeyMapArgument; @@ -123974,345 +123447,334 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { groupKeyMapArgument = temp_0; } [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadGroupKeys_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; + MTRReadParams * params = [[MTRReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Group Keys Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestAddGroup1_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; params.groupName = @"Group #1"; [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 1 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestAddGroup2_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; params.groupName = @"Group #2"; [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 2 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadGroupTable_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable Error: %@", err); + 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); - 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; } CHIP_ERROR TestKeySetRemove1_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Remove 1 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestKeySetReadRemoved_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; [cluster keySetReadWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestKeySetReadNotRemoved_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; [cluster keySetReadWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR TestRemoveGroup1_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; [cluster removeGroupWithParams:params - completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove Group 1 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestReadGroupTable2_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable 2 Error: %@", err); + 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); - 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; } CHIP_ERROR TestRemoveAll_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { + [cluster removeAllGroupsWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Remove All Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -124325,73 +123787,74 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestReadGroupTable3_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.fabricFiltered = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable 3 Error: %@", err); + 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); - 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; } CHIP_ERROR TestKeySetRemove2_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Remove 2 Error: %@", err); + completionHandler:^(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; } CHIP_ERROR TestKeySetReadAlsoRemoved_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpoint:@(0) queue:mCallbackQueue]; + MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; [cluster keySetReadWithParams:params - 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(); - }]; + 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(); + }]; return CHIP_NO_ERROR; } @@ -124525,7 +123988,6 @@ class Test_TC_G_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); @@ -124533,12 +123995,11 @@ class Test_TC_G_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -124557,12 +124018,11 @@ class Test_TC_G_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -124581,12 +124041,11 @@ class Test_TC_G_1_1 : public TestCommandBridge { CHIP_ERROR TestGivenGsf00EnsureFeaturemapHasTheCorrectBitSet_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletionHandler:^(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)); @@ -124600,12 +124059,11 @@ class Test_TC_G_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAttributeListFromDut_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -124626,12 +124084,11 @@ class Test_TC_G_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsAcceptedCommandListFromDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -124652,12 +124109,11 @@ class Test_TC_G_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsGeneratedCommandListFromDut_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); diff --git a/zzz_generated/dynamic-bridge-app/zap-generated/gen_tokens.h b/zzz_generated/dynamic-bridge-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/dynamic-bridge-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/light-switch-app/zap-generated/gen_tokens.h b/zzz_generated/light-switch-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/light-switch-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/lighting-app/nxp/zap-generated/gen_tokens.h b/zzz_generated/lighting-app/nxp/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/lighting-app/nxp/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/lighting-app/zap-generated/gen_tokens.h b/zzz_generated/lighting-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/lighting-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/lock-app/zap-generated/gen_tokens.h b/zzz_generated/lock-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/lock-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/log-source-app/zap-generated/gen_tokens.h b/zzz_generated/log-source-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/log-source-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/ota-provider-app/zap-generated/gen_tokens.h b/zzz_generated/ota-provider-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/ota-provider-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/ota-requestor-app/zap-generated/gen_tokens.h b/zzz_generated/ota-requestor-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/ota-requestor-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/placeholder/app1/zap-generated/gen_tokens.h b/zzz_generated/placeholder/app1/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/placeholder/app1/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/placeholder/app2/zap-generated/gen_tokens.h b/zzz_generated/placeholder/app2/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/placeholder/app2/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/pump-app/zap-generated/gen_tokens.h b/zzz_generated/pump-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/pump-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/pump-controller-app/zap-generated/gen_tokens.h b/zzz_generated/pump-controller-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/pump-controller-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/temperature-measurement-app/zap-generated/gen_tokens.h b/zzz_generated/temperature-measurement-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/temperature-measurement-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/thermostat/zap-generated/gen_tokens.h b/zzz_generated/thermostat/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/thermostat/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/tv-app/zap-generated/gen_tokens.h b/zzz_generated/tv-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/tv-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/tv-casting-app/zap-generated/gen_tokens.h b/zzz_generated/tv-casting-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/tv-casting-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false) diff --git a/zzz_generated/window-app/zap-generated/gen_tokens.h b/zzz_generated/window-app/zap-generated/gen_tokens.h deleted file mode 100644 index dcc229f5b2c306..00000000000000 --- a/zzz_generated/window-app/zap-generated/gen_tokens.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -// This file contains the tokens for attributes stored in flash - -// Identifier tags for tokens - -// Types for the tokens -#ifdef DEFINETYPES -#endif // DEFINETYPES - -// Actual token definitions -#ifdef DEFINETOKENS -#endif // DEFINETOKENS - -// Macro snippet that loads all the attributes from tokens -#define GENERATED_TOKEN_LOADER(endpoint) \ - do \ - { \ - } while (false) - -// Macro snippet that saves the attribute to token -#define GENERATED_TOKEN_SAVER \ - do \ - { \ - } while (false)